/* ==========================*/
/* EduDisplay Webshop CSS    */
/* Update: 2026-08-20       */
/* ==========================*/

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/*
 * Webshop: zelfde kleur-/foto-achtergrond als contact/FAQ/signin (.starter-hero-bg
 * in style_edudisplay_hero_bg.css). Alleen layout-overrides hieronder.
 *
 * Onder vaste site-header: main > .section:first-child uit base matcht niet als er whitespace
 * vóór <section> in de template staat (tekstknooppunt is dan :first-child). Zelfde marge als FAQ.
 */
body.starter-site .webshop-page .webshop-section.starter-hero-bg.section {
    overflow: visible;
    padding-top: calc(4.8rem + var(--spacing-xl));
}

.webshop-page .webshop-section.starter-hero-bg {
    padding-bottom: 6rem;
    align-items: stretch;
}

.webshop-page .webshop-section .webshop-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--spacing-md, 1em);
    padding-right: var(--spacing-md, 1em);
    box-sizing: border-box;
    flex: 0 1 auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

/* Breadcrumb in content (niet in <header>): header nav is op webshop verborgen → zou menutje verbergen */
body.starter-site #webshop .webshop-breadcrumb {
    margin: 0.5rem auto 0.65rem;
    padding: 0.38rem 0.9rem;
    font-size: 0.78rem;
    line-height: 1.35;
    gap: 0.28em 0.45em;
}

/*
 * Globale `header { position: fixed }` (site-nav) raakt ook <header class="webshop-header">.
 * Zonder reset blijft titel/intro “plakken” en valt over het productgrid.
 */
.webshop-page .webshop-header {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    margin-bottom: 1.35rem;
    text-align: center;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    z-index: auto;
    padding: 0;
    min-width: 0;
    transform: none;
    transition: none;
}

/* .section-title uit starter levert titel + oranje streep; geen dubbele h1-styling */
.webshop-page .webshop-title {
    margin-bottom: 0.65rem;
}

.webshop-intro {
    margin: 0 auto 1.65rem;
    max-width: 42em;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.55;
    text-align: center;
}

.webshop-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
    width: 100%;
}

/* Panel zoals .combined-offer / auth-kaarten (contact, sign-in) */
.webshop-card {
    border-radius: var(--border-radius, 6px);
    overflow: hidden;
    border: 1.5px solid rgba(60, 188, 180, 0.18);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    background: rgba(35, 45, 61, 0.98);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
    .webshop-card {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

.webshop-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
    border-color: rgba(60, 188, 180, 0.32);
}

.webshop-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
}

.webshop-card-thumb {
    display: block;
    width: 100%;
    height: 100%;
}

.webshop-card-thumb > picture,
.webshop-lightbox-slides > picture {
    display: contents;
}

.webshop-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.webshop-card-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 4px;
}

/* Kleurknoppen: onder .webshop-page voor voldoende specificiteit */
.webshop-page .webshop-color-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    padding: 0.4rem 0.5rem;
    margin: 0 0 0.6rem 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.webshop-page .webshop-color-btn {
    padding: 0.25rem 0.4rem;
    min-height: 1.35rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    /* Kleuren via data-bg/data-fg + webshop.js (CSSOM; geen inline style=) */
    background-clip: padding-box;
}

.webshop-page .webshop-color-btn:hover,
.webshop-page .webshop-color-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    filter: brightness(1.1);
    outline: none;
}

.webshop-page .webshop-color-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.webshop-page .webshop-color-btn.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.webshop-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.webshop-card-title {
    margin-bottom: 0.5rem;
    color: var(--text-color, #e0e0e0);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.webshop-card-description {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.webshop-card-specs {
    margin-bottom: 1rem;
}

.webshop-card-specs dd {
    margin: 0 0 0.35rem 0;
    padding-left: 1rem;
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.webshop-card-specs dd::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color, #3CBCB4);
}

.webshop-card-price {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--secondary-color, #3CBCB4);
    font-size: 0.95rem;
}

.webshop-card-cta {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: var(--primary-color, #FF5722);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--border-radius, 6px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.webshop-card-cta:hover,
.webshop-card-cta:focus-visible {
    background: var(--primary-color-light, #fa7045);
    color: #fff;
    transform: translateY(-1px);
}

.webshop-footer-text {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 48em;
    margin-left: auto;
    margin-right: auto;
}

.webshop-footer-text a {
    color: var(--secondary-color, #3CBCB4);
    text-decoration: none;
}

.webshop-footer-text a:hover {
    text-decoration: underline;
}

/* Alleen hoofdnav verbergen — niet elke <nav> (breadcrumb in header zou anders verdwijnen) */
body:has(.webshop-page) header nav#primary-navigation {
    display: none;
}

/* Lightbox */
.webshop-lightbox-curtain {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.94);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

body.webshop-lightbox-open .webshop-lightbox-curtain,
body:has(.webshop-lightbox:target) .webshop-lightbox-curtain {
    opacity: 1;
    pointer-events: auto;
}

.webshop-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.webshop-lightbox:target {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.webshop-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.webshop-lightbox-slides {
    position: relative;
    max-width: 85vw;
    max-height: 70vh;
}

.webshop-lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: none;
}

.webshop-lightbox-img.active {
    display: block;
}

.webshop-lightbox-caption {
    color: #fff;
    font-size: 1rem;
    text-align: center;
}

.webshop-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.webshop-lightbox-close:hover,
.webshop-lightbox-close:focus-visible {
    color: var(--secondary-color, #3CBCB4);
}

.webshop-lightbox-prev,
.webshop-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    padding: 0.5rem;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.webshop-lightbox-prev {
    left: -3rem;
}

.webshop-lightbox-next {
    right: -3rem;
}

.webshop-lightbox-prev:hover,
.webshop-lightbox-next:hover,
.webshop-lightbox-prev:focus-visible,
.webshop-lightbox-next:focus-visible {
    background: rgba(0, 0, 0, 0.7);
    color: var(--secondary-color, #3CBCB4);
}

@media (max-width: 768px) {
    .webshop-page .webshop-section.starter-hero-bg {
        padding-bottom: 4rem;
    }

    .webshop-intro {
        font-size: 1rem;
        text-align: left;
    }

    .webshop-grid {
        grid-template-columns: 1fr;
    }
    .webshop-lightbox-prev {
        left: 0.5rem;
    }
    .webshop-lightbox-next {
        right: 0.5rem;
    }
}
