/* ═══════════════════════════════════════════════════════════════
   MorphiToys — Productdetail ("zacht-tactiel toy-craft")
   Pagina-specifiek. Classes geprefixt (.product-*, .galerij-*,
   .koop-*, .aantal-*, .usp-*, .beschrijving-*). Gedeelde component-
   classes (.product-kaart, .btn, .eyebrow, .pill …) NIET herdefiniëren.
   ═══════════════════════════════════════════════════════════════ */

.product-detail { position: relative; padding-top: clamp(20px, 3vw, 34px); }

/* Zwevende decor-blobs (zacht, achter de inhoud) */
.product-blob { position: absolute; z-index: 0; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
    filter: blur(8px); opacity: .5; pointer-events: none; }
.product-blob-1 { width: clamp(180px, 26vw, 360px); aspect-ratio: 1; top: -40px; right: -60px;
    background: radial-gradient(circle at 35% 30%, var(--sun-100), var(--sun)); opacity: .35; }
.product-blob-2 { width: clamp(160px, 22vw, 300px); aspect-ratio: 1; top: 38%; left: -70px;
    background: radial-gradient(circle at 40% 35%, var(--teal-100), var(--teal)); opacity: .22; }

.product-detail .kruimels { position: relative; z-index: 1; }
.product-detail .kruimels [aria-current] { color: var(--ink-soft); }

/* ── Twee-koloms grid ────────────────────────────────────────── */
.product-kolommen {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
}

/* ── Galerij ─────────────────────────────────────────────────── */
.product-galerij { display: flex; flex-direction: column; gap: 16px; }

.galerij-well {
    position: relative; aspect-ratio: 1; border-radius: var(--r-xl); overflow: hidden;
    display: flex; align-items: center; justify-content: center; padding: clamp(20px, 5%, 48px);
    background:
        radial-gradient(130% 120% at 28% 16%, #fff 0%, transparent 58%),
        linear-gradient(158deg, var(--canvas-2), #E4ECF8);
    box-shadow: var(--sh-md);
    border: 1px solid var(--border);
}
.galerij-well #hoofdfoto,
.galerij-well .galerij-leeg {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 22px 30px rgba(20,32,74,.20));
    transition: transform .5s var(--veer);
}
.galerij-well:hover #hoofdfoto { transform: scale(1.04) rotate(-1.5deg); }
.galerij-leeg { color: var(--grape); opacity: .3; display: grid; place-items: center; }

/* Sticker-badges in de well */
.galerij-sticker {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-display); font-weight: 600; font-size: var(--t-xs);
    color: var(--grape-700); background: rgba(255,255,255,.86); backdrop-filter: blur(6px);
    padding: 7px 13px; border-radius: var(--r-pill); box-shadow: var(--sh-sm);
    transform: rotate(3deg);
}
.galerij-sticker .icoon { color: var(--sun); }
.sale-badge.galerij-sale { top: 16px; left: 16px; right: auto; z-index: 2; font-size: .82rem;
    background: var(--coral); }
.sale-badge.galerij-sale .icoon { color: #fff; }

/* Thumbnails (JS wisselt #hoofdfoto + togglet .actief) */
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
.thumbs button {
    flex: 0 0 auto; width: clamp(64px, 9vw, 84px); aspect-ratio: 1; padding: 8px;
    border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--border-sterk);
    display: flex; align-items: center; justify-content: center; min-height: 44px;
    transition: border-color .2s, transform .25s var(--veer), box-shadow .25s var(--vloei);
}
.thumbs button img { width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 6px 8px rgba(20,32,74,.14)); }
.thumbs button:hover { transform: translateY(-3px); box-shadow: var(--sh-sm); border-color: var(--grape-100); }
.thumbs button.actief { border-color: var(--grape); box-shadow: 0 0 0 3px var(--grape-100); }

/* ── Product-info (sticky koop-box op desktop) ───────────────── */
.product-info {
    position: sticky; top: 96px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-md);
    padding: clamp(22px, 3vw, 38px);
}
.info-kop { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.info-kop .eyebrow { align-self: flex-start; }
.info-kop .eyebrow .icoon { color: var(--grape); }
.product-info h1 { font-size: var(--t-3xl); }

/* Prijs (#product-prijs — JS herschrijft textContent bij variantwissel) */
.product-info .prijs.groot { font-size: clamp(2rem, 5vw, 2.7rem); color: var(--ink);
    margin: 0; line-height: 1.05; }
.product-info .prijs.groot s { font-size: .5em; color: var(--ink-faint); }
.prijs-noot { display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-display); font-weight: 600; font-size: var(--t-sm);
    color: var(--ink-soft); margin-top: 6px; }
.prijs-noot .icoon { color: var(--ok); }

/* Tactiele voorraad-pill */
.voorraad-pill {
    display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 4px;
    font-family: var(--font-display); font-weight: 600; font-size: var(--t-sm);
    color: #15623a; background: var(--ok-bg);
    padding: 10px 16px; border-radius: var(--r-pill);
    line-height: 1.3;
}
.voorraad-stip { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok);
    box-shadow: 0 0 0 4px rgba(30,158,90,.18); }
@media (prefers-reduced-motion: no-preference) {
    .voorraad-stip { animation: voorraad-puls 2.4s var(--vloei) infinite; }
    @keyframes voorraad-puls { 0%,100% { box-shadow: 0 0 0 0 rgba(30,158,90,.34); }
        60% { box-shadow: 0 0 0 6px rgba(30,158,90,0); } }
}

.korte-beschrijving { color: var(--ink-soft); font-size: var(--t-base); margin: 18px 0 4px; }

/* ── Koopformulier ───────────────────────────────────────────── */
.koop-form { margin-top: 22px; }
.koop-veld { margin-bottom: 18px; }
.koop-veld .form-label { margin-bottom: 0; }
.koop-veld select { margin-top: 8px; }

.koop-rij { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }

/* Aantal-stepper (input[name=aantal] blijft de bron) */
.aantal-stepper {
    flex: 0 0 auto; display: inline-flex; align-items: stretch;
    background: var(--surface); border: 2px solid var(--border-sterk); border-radius: var(--r-pill);
    overflow: hidden; min-height: 58px;
}
.aantal-stepper:focus-within { border-color: var(--grape); box-shadow: 0 0 0 4px var(--grape-100); }
.aantal-stepper .stap-knop {
    flex: none; width: 48px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--grape); transition: background .18s, color .18s, transform .18s var(--veer);
}
.aantal-stepper .stap-knop:hover { background: var(--grape-100); }
.aantal-stepper .stap-knop:active { transform: scale(.9); }
.aantal-stepper input[name=aantal] {
    width: 52px; margin: 0; padding: 0 4px; text-align: center;
    border: none; border-radius: 0; min-height: auto; background: transparent;
    font-family: var(--font-display); font-weight: 600; font-size: var(--t-lg); color: var(--ink);
    -moz-appearance: textfield; appearance: textfield;
}
.aantal-stepper input[name=aantal]:focus { outline: none; box-shadow: none; }
.aantal-stepper input[name=aantal]::-webkit-outer-spin-button,
.aantal-stepper input[name=aantal]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.koop-knop { flex: 1 1 auto; }

.koop-gerust { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    font-family: var(--font-display); font-weight: 500; font-size: var(--t-sm); color: var(--ink-faint); }
.koop-gerust .icoon { color: var(--teal); }

/* ── Zelf-samengestelde bundel-configurator ────────────────────── */
.bundel-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.bundel-kop strong { font-family: var(--font-display); font-size: var(--t-lg); color: var(--ink); }
.bundel-teller { font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.bundel-teller .bundel-gekozen { color: var(--coral-ink); }
.bundel-voortgang { height: 8px; border-radius: var(--r-pill); background: var(--grape-100); overflow: hidden; margin-bottom: 12px; }
.bundel-voortgang-vul { display: block; height: 100%; width: 0; border-radius: inherit;
    background: linear-gradient(90deg, #F9A527, #EE6A12); transition: width .3s var(--vloei); }
.bundel-akties { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.bundel-kiezer { list-style: none; margin: 0 0 18px; padding: 8px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 10px;
    max-height: 380px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--canvas-2); }
.bundel-diertje { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 8px 6px 8px; border-radius: var(--r-md); background: var(--surface);
    border: 1.5px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.bundel-diertje.is-gekozen { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral-100); }
.bundel-diertje-foto { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
    display: grid; place-items: center; color: var(--grape); cursor: zoom-in; -webkit-tap-highlight-color: transparent;
    background: radial-gradient(120% 120% at 30% 20%, #fff, transparent 60%), linear-gradient(160deg, var(--canvas-2), #E4ECF8); }
.bundel-diertje-foto img { width: 90%; height: 90%; object-fit: contain; pointer-events: none; }
.bundel-diertje-foto::after { content: ''; position: absolute; bottom: 4px; left: 4px; width: 17px; height: 17px; border-radius: 50%;
    background: rgba(24,35,82,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center/10px no-repeat;
    opacity: .78; transition: opacity .15s, transform .15s; pointer-events: none; }
.bundel-diertje-foto:hover::after { opacity: 1; transform: scale(1.12); }
.bundel-badge { position: absolute; top: 3px; right: 3px; min-width: 20px; height: 20px; padding: 0 5px;
    display: grid; place-items: center; border-radius: var(--r-pill);
    background: var(--coral); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 12px; box-shadow: var(--sh-sm); }
.bundel-diertje-naam { font-size: 11px; line-height: 1.2; text-align: center; color: var(--ink-soft);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bundel-stappers { display: flex; align-items: center; gap: 8px; }
.bundel-stappers button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
    border: 1.5px solid var(--border-sterk); background: var(--surface); color: var(--grape); cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s; }
.bundel-plus { background: var(--coral-100); border-color: transparent; color: var(--coral-ink); }
.bundel-stappers button:hover:not(:disabled) { transform: scale(1.08); border-color: var(--coral); color: var(--coral-ink); }
.bundel-stappers button:disabled { opacity: .35; cursor: not-allowed; }
.bundel-toevoegen:disabled { opacity: .55; cursor: not-allowed; }

/* Lightbox — diertje groot bekijken */
html.lb-open { overflow: hidden; }
.bundel-lightbox { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(12, 20, 48, .74); animation: lb-in .18s ease; }
.bundel-lightbox[hidden] { display: none; }
.bundel-lightbox-kaart { position: relative; width: 100%; max-width: min(400px, 92vw);
    background: var(--surface); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 30px);
    text-align: center; box-shadow: 0 30px 80px rgba(9, 16, 40, .5); }
.bundel-lightbox-foto { width: 100%; max-width: 300px; margin: 0 auto 4px; border-radius: var(--r-md);
    background: radial-gradient(120% 120% at 30% 20%, #fff, transparent 60%), linear-gradient(160deg, var(--canvas-2), #E4ECF8); }
.bundel-lightbox-foto[hidden] { display: none; }
.bundel-lightbox-naam { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 3.6vw, 1.42rem);
    color: var(--grape); margin: 14px 0 18px; }
.bundel-lightbox-sluit { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: grid; place-items: center;
    border: none; border-radius: 50%; background: var(--canvas-2); color: var(--grape); cursor: pointer; transition: background .15s; }
.bundel-lightbox-sluit:hover { background: var(--grape-100); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 480px) {
    .bundel-kiezer { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-height: 340px; }
    .bundel-stappers { gap: 12px; }
    .bundel-stappers button { width: 34px; height: 34px; }
    .bundel-diertje-foto::after { width: 20px; height: 20px; background-size: 12px; opacity: .85; }
}

/* AJAX-knop staten (main.js zet .laadt / .gelukt) */
.koop-knop.laadt { opacity: .8; cursor: progress; }
.koop-knop.gelukt { background: var(--ok); box-shadow: 0 16px 34px rgba(30,158,90,.32); }
.koop-knop.gelukt:hover { background: var(--ok); }

/* ── Trust-USP's ─────────────────────────────────────────────── */
.product-usps { list-style: none; padding: 18px 0 0; margin: 22px 0 0;
    border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.product-usps li { display: flex; align-items: center; gap: 13px;
    font-family: var(--font-display); font-weight: 500; font-size: var(--t-sm); color: var(--ink); }
.usp-icoon { flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r-md);
    background: var(--grape-100); color: var(--grape); }
.product-usps li:nth-child(2) .usp-icoon { background: var(--teal-100); color: #0A6f7c; }
.product-usps li:nth-child(3) .usp-icoon { background: var(--coral-100); color: var(--coral-ink); }

/* ── Beschrijving (vertrouwde admin-HTML) ────────────────────── */
.product-beschrijving { position: relative; z-index: 1; max-width: 75ch;
    margin-top: clamp(48px, 7vw, 88px); }
.beschrijving-kop { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.beschrijving-kop .eyebrow { align-self: flex-start; }
.product-beschrijving h2 { font-size: var(--t-2xl); }
.beschrijving-tekst { color: var(--ink-soft); font-size: var(--t-lg); line-height: 1.75; }
.beschrijving-tekst > * + * { margin-top: 1em; }
.beschrijving-tekst h2, .beschrijving-tekst h3, .beschrijving-tekst h4 {
    color: var(--ink); margin-top: 1.4em; }
.beschrijving-tekst h3 { font-size: var(--t-xl); }
.beschrijving-tekst h4 { font-size: var(--t-lg); }
.beschrijving-tekst a { color: var(--grape); font-weight: 700;
    text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 3px; }
.beschrijving-tekst a:hover { color: var(--grape-700); }
.beschrijving-tekst ul, .beschrijving-tekst ol { padding-left: 1.3em; }
.beschrijving-tekst li { margin: .4em 0; }
.beschrijving-tekst ul { list-style: none; padding-left: 0; }
.beschrijving-tekst ul li { position: relative; padding-left: 30px; }
.beschrijving-tekst ul li::before { content: ''; position: absolute; left: 4px; top: .62em;
    width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.beschrijving-tekst img { border-radius: var(--r-lg); box-shadow: var(--sh-sm); margin-block: 1.2em; }
.beschrijving-tekst strong { color: var(--ink); }
.beschrijving-tekst blockquote { border-left: 4px solid var(--sun); padding-left: 18px;
    color: var(--ink); font-family: var(--font-display); font-size: var(--t-lg); }

/* ── Gerelateerd (gebruikt GEDEELDE .product-kaart) ──────────── */
.gerelateerd {
    position: relative; z-index: 1; isolation: isolate; overflow: hidden;
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    margin-top: clamp(54px, 8vw, 96px);
    padding: clamp(46px, 6vw, 82px) var(--pad-x) clamp(50px, 7vw, 90px);
    background: radial-gradient(120% 135% at 50% 0%, #3E82E6 0%, #2A6AD6 40%, #1C55BE 78%, #1544A0 100%);
}
.gerelateerd > * { max-width: var(--wrap); margin-inline: auto; }
.gerelateerd .eyebrow { margin-bottom: 12px; background: rgba(255, 255, 255, .16); color: #fff; }
.gerelateerd .eyebrow .icoon { color: var(--sun); }
.gerelateerd h2, .gerelateerd .sectie-kop h2 { color: #fff; }
.gerelateerd .sier { color: var(--sun); }
.gerelateerd .sectie-kop p { color: #E7EEFB; }
.gerelateerd .alles-link { color: #fff; }
.gerelateerd .product-kaart, .gerelateerd .product-kaart h3 { color: #fff; }
.gerelateerd .prijs { color: var(--sun); }

/* ═══ Responsief ═════════════════════════════════════════════ */

/* Tablet & kleiner: één kolom, koop-box niet meer sticky */
@media (max-width: 900px) {
    .product-kolommen { grid-template-columns: 1fr; gap: clamp(22px, 5vw, 36px); }
    .product-info { position: static; }
    .galerij-well { max-width: 560px; margin-inline: auto; width: 100%; }
    .product-galerij { align-items: stretch; }
}

/* Telefoon: koop-rij stapelt netjes, knop op volle breedte */
@media (max-width: 540px) {
    .product-info { padding: 20px 18px; border-radius: var(--r-lg); }
    .koop-rij { gap: 12px; }
    .aantal-stepper { min-height: 56px; }
    .koop-knop { width: 100%; }
    .galerij-well { padding: 18px; }
    .thumbs button { width: 60px; }
}

/* Heel smal: blobs uit om horizontale ruis te voorkomen */
@media (max-width: 380px) {
    .product-blob { display: none; }
}

/* Grote schermen: iets ruimere galerij-verhouding */
@media (min-width: 1280px) {
    .product-kolommen { gap: 72px; }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .galerij-well:hover #hoofdfoto { transform: none; }
    .voorraad-stip { animation: none; }
}
