/* Webshop-tegels: gelijke kaarten en minder tekst boven de producten op mobiel. Override op styles.css. */

/* Foto's met witte achtergrond (products.json: "witteAchtergrond": true) nemen de kleur van de tegel over */
.tegel-wit > img { mix-blend-mode: multiply; object-fit: contain; }

@media (max-width: 720px) {
  /* Naam boven, prijs onderaan op dezelfde hoogte, ook als een naam op twee regels staat */
  .uitgelicht-item { grid-template-rows: auto 1fr auto; }

  /* Boven de producten alleen label en titel; de uitleg komt vanzelf als je een tegel opent */
  body[data-pagina="webshop"] section { padding-top: 40px; }
  body[data-pagina="webshop"] section:first-child { padding-top: 20px; }
  body[data-pagina="webshop"] .intro { display: none; }
  body[data-pagina="webshop"] .label { margin-bottom: 10px; }
  body[data-pagina="webshop"] .pagina-titel,
  body[data-pagina="webshop"] h2 { margin-bottom: 0; font-size: clamp(1.7rem, 7.5vw, 2.1rem); }
  body[data-pagina="webshop"] .grid { margin-top: 16px; }
}

/* Platte hangers in reeksen: filterknoppen en per reeks een kop met een carrousel (app.js: tekenReeksen, railHtml; rails.js) */
.reeksen { margin-top: 28px; }
.reeks-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.reeks-knop { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(23, 35, 46, .22); border-radius: 999px; background: rgba(255, 255, 255, .6); color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; }
.reeks-knop span, .reeks-kop span { font-family: var(--sans, inherit); font-style: normal; font-size: .8rem; font-weight: 600; opacity: .6; }
.reeks-knop:hover { border-color: var(--teal); }
.reeks-knop:focus-visible, .reeks-alles:focus-visible, .rail-pijl:focus-visible, .rail:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.reeks-knop[aria-pressed="true"] { background: var(--teal-soft, #0b6b61); border-color: transparent; color: #fff; }
.reeks { margin-top: 40px; scroll-margin-top: 90px; }
.reeks[hidden] { display: none; }
.reeks-kopregel { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.reeks-kop { display: flex; align-items: baseline; gap: 10px; font-size: 1.55rem; font-style: italic; }
.reeks-alles { flex: none; min-height: 36px; padding: 0 4px; border: 0; background: none; color: var(--teal-soft, #0b6b61); font: inherit; font-size: .92rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.een-reeks .reeks-kopregel { display: none; }
/* Past de hele reeks al in beeld, dan valt er niets uit te klappen */
.reeks:not(.raster):has(.rail-past) .reeks-alles { display: none; }

/* De carrousel: tegels naast elkaar, een stukje van de volgende steekt uit zodat je ziet dat er meer is.
   Op een telefoon loopt hij tot de rand van het scherm; met een muis zijn er pijltjes en kun je slepen. */
.rail-host { margin-top: 28px; }
.rail-wrap { position: relative; margin-top: 16px; }
.rail { --tegels: 3.6; display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - (var(--tegels) - 1) * var(--gap)) / var(--tegels)); gap: var(--gap); margin: 0; padding: 8px 4px 22px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; min-width: 0; }
.rail-sleept { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.rail-sleept a { pointer-events: none; }
.rail a, .rail img, .rail canvas { -webkit-user-drag: none; }
/* Een zachte rand aan de kant waar nog meer staat */
.rail-wrap:not(.rail-past):not(.rail-eind) .rail { mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.rail-wrap:not(.rail-past):not(.rail-begin) .rail { mask-image: linear-gradient(90deg, transparent, #000 40px); }
.rail-wrap:not(.rail-past):not(.rail-begin):not(.rail-eind) .rail { mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 56px), transparent); }
/* Pijltjes: alleen met een muis; een telefoon veegt */
.rail-pijl { display: none; position: absolute; top: 34%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; padding: 0 0 3px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font: 400 1.7rem/1 var(--sans, inherit); box-shadow: 0 2px 6px rgba(23, 35, 46, .2), 0 10px 24px -8px rgba(23, 35, 46, .35); cursor: pointer; transition: transform .15s, opacity .2s; }
.rail-pijl:hover { transform: scale(1.08); }
.rail-terug { left: -14px; }
.rail-verder { right: -14px; }
@media (hover: hover) and (pointer: fine) {
  .rail-wrap:not(.rail-past) .rail-pijl { display: block; }
  .rail-wrap.rail-begin .rail-terug, .rail-wrap.rail-eind .rail-verder { opacity: 0; pointer-events: none; }
  .rail { cursor: grab; }
}
/* Voortgangsbalk onder de rij */
.rail-balk { position: relative; height: 3px; margin: 0 4px; border-radius: 3px; background: rgba(23, 35, 46, .12); }
.rail-balk i { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; border-radius: 3px; background: var(--teal-soft, #0b6b61); transition: left .12s linear; }
.rail-past .rail-balk { display: none; }
@media (max-width: 1000px) { .rail { --tegels: 2.6; } }

/* "Alles bekijken": dezelfde tegels als raster, onder elkaar */
.reeks.raster .rail-wrap { margin-top: 16px; }
.reeks.raster .rail { display: grid; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; mask-image: none; scroll-snap-type: none; padding: 0; cursor: auto; }
.reeks.raster .rail-pijl, .reeks.raster .rail-balk { display: none; }
@media (max-width: 1000px) { .reeks.raster .rail { grid-template-columns: repeat(3, 1fr); } }

.uitgelicht-item[hidden] { display: none; }
@media (max-width: 720px) {
  .reeksen { margin-top: 16px; }
  .reeks { margin-top: 28px; }
  body[data-pagina="webshop"] .reeks-kop { font-size: 1.35rem; }
  /* Tot aan de rand van het scherm, ruim twee tegels in beeld: de derde kijkt om de hoek */
  .rail-wrap { margin: 12px -16px 0; }
  .rail { --tegels: 2.25; gap: 12px; padding: 6px 16px 18px; scroll-padding-inline: 16px; }
  .rail-balk { margin: 0 16px; }
  .reeks.raster .rail { grid-template-columns: repeat(2, 1fr); padding: 0 16px; }
  body[data-pagina="webshop"] .rail-host { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .rail-pijl, .rail-balk i { transition: none; } }

/* Mix en match: een slanke balk in plaats van een lijst, zodat de hangers meteen in beeld komen */
.mixmatch { display: flex; align-items: center; gap: 14px; max-width: 46em; margin: 22px 0 0; padding: 12px 18px 12px 12px; border: 1px solid rgba(14, 143, 129, .35); border-radius: 16px; background: rgba(255, 255, 255, .62); }
.mixmatch-badge { flex: none; display: grid; place-content: center; justify-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--teal-soft, #0b6b61); color: #fff; font-weight: 700; font-size: 1.02rem; line-height: 1.05; letter-spacing: -.01em; }
.mixmatch-badge small { font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.mixmatch[hidden] { display: none; }
.mixmatch-kop { display: block; font-size: 1rem; }
.mixmatch-noot { margin: 2px 0 0; font-size: .88rem; line-height: 1.4; color: var(--ash); }
@media (max-width: 720px) {
  .mixmatch { margin-top: 14px; padding: 10px 14px 10px 10px; gap: 12px; }
  .mixmatch-badge { width: 48px; height: 48px; font-size: .92rem; }
  .mixmatch-kop { font-size: .95rem; }
  .mixmatch-noot { font-size: .82rem; }
}

/* Winkelbalk: zoeken, sorteren, soort en kleur, plakt onder de kop (app.js: startWinkelBalk). */
.winkelbalk { position: sticky; top: var(--kop-hoogte, 60px); z-index: 20; margin-bottom: 6px; padding: 8px 24px 4px; background: rgba(246, 241, 227, .94); backdrop-filter: blur(8px); }
.wb-rij { display: flex; gap: 8px; align-items: center; }
.wb-zoek { flex: 1 1 auto; min-width: 0; }
.wb-zoek input, .wb-sorteer select { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid rgba(23, 35, 46, .22); border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink); font: inherit; font-size: 1rem; }
.wb-zoek input { max-width: 420px; }
.wb-sorteer { flex: none; }
.wb-sorteer select { width: auto; padding-right: 10px; font-size: .92rem; font-weight: 600; }
.wb-zoek input:focus-visible, .wb-sorteer select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wb-kleurknop { display: none; flex: none; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(23, 35, 46, .22); border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.wb-kleurknop[aria-expanded="true"] { border-color: var(--teal); }
#wb-kleurtel { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--teal); color: #fff; font-size: .75rem; text-align: center; }
#wb-kleurtel[hidden] { display: none; }
.wb-chips { display: flex; gap: 8px; margin-top: 8px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.wb-chips::-webkit-scrollbar { display: none; }
.wb-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(23, 35, 46, .22); border-radius: 999px; background: rgba(255, 255, 255, .6); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.wb-chip span { font-size: .78rem; opacity: .6; }
.wb-chip:hover { border-color: var(--teal); }
.wb-chip:focus-visible, .wb-telling button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wb-chip[aria-pressed="true"] { background: var(--teal-soft, #0b6b61); border-color: transparent; color: #fff; }
.wb-telling { margin: 10px 0 0; padding-inline: 24px; font-size: .9rem; color: var(--ash); }
.wb-telling button { min-height: 32px; padding: 0 6px; border: 0; background: none; color: var(--teal-soft, #0b6b61); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.winkelbalk .kleurfilter { position: static; padding: 6px 0 2px; background: none; backdrop-filter: none; }

/* Mandbalk onderin (alleen telefoon) en terug-naar-boven */
.mandbalk, .naar-boven { display: none; }
@media (max-width: 720px) {
  .winkelbalk { padding-inline: 16px; }
  .wb-kleurknop { display: inline-flex; }
  .winkelbalk .kleurfilter { display: none; }
  .winkelbalk.kleur-open .kleurfilter:not(:empty) { display: flex; }
  .wb-zoek input { max-width: none; }
  .wb-sorteer select { max-width: 128px; padding-inline: 12px 4px; font-size: .88rem; }
  .wb-telling { padding-inline: 16px; }
  .mandbalk { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 10px 30px rgba(13, 23, 32, .35); }
  .mandbalk[hidden] { display: none; }
  .mandbalk-ga { text-decoration: underline; text-underline-offset: 3px; }
  .mandbalk.puls { animation: mand-puls .6s ease; }
  body.heeft-mandbalk main { padding-bottom: 84px; }
  body:has(.detail:not([hidden])) .mandbalk, body:has(.detail:not([hidden])) .naar-boven { display: none; }
  .naar-boven { position: fixed; z-index: 65; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgba(23, 35, 46, .22); border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--ink); font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 14px rgba(23, 35, 46, .2); }
  .naar-boven:not([hidden]) { display: flex; }
  body.heeft-mandbalk .naar-boven { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* De melding na "In mandje" staat in het duimbereik: boven de mandbalk, of boven de bestelbalk in het detailvenster */
  #toast { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateY(16px); }
  body.heeft-mandbalk #toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body:has(.detail:not([hidden])) #toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Kleurfilter boven de webshop: een of meer kleuren kiezen (app.js: tekenKleurFilter). Zonder keuze wisselen de tegels door het vaste palet.
   Eén rij kleine knoppen die zijdelings scrolt, zonder zichtbare scrollbalk. */
.kleurfilter { position: sticky; top: var(--kop-hoogte, 60px); z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(246, 241, 227, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.kleurfilter:empty { display: none; }
.kf-label { flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .55; }
/* Padding in de rij zodat de schaduw en het ringetje van de knoppen niet worden afgesneden door overflow */
.kf-rij { display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; padding: 4px 2px; margin: -4px -2px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.kf-rij::-webkit-scrollbar { display: none; }
.kf-knop { flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 16px 0 8px; border: 1px solid rgba(23, 35, 46, .12); border-radius: 999px; background: rgba(255, 255, 255, .78); color: var(--ink); font: inherit; font-size: .86rem; font-weight: 600; letter-spacing: .01em; cursor: pointer; box-shadow: 0 1px 2px rgba(23, 35, 46, .06); transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
/* De kleurstaal: een egaal rond vlak met een dun randje, zodat ook wit en geel zichtbaar blijven */
.kf-knop i { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(23, 35, 46, .22); transition: box-shadow .18s ease, transform .18s ease; }
.kf-knop:hover { transform: translateY(-1px); border-color: rgba(23, 35, 46, .3); background: #fff; box-shadow: 0 4px 10px rgba(23, 35, 46, .12); }
.kf-knop:hover i { transform: scale(1.08); }
.kf-knop:active { transform: translateY(0) scale(.97); }
.kf-knop:focus-visible, .kf-wis:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.kf-knop[aria-pressed="true"] { background: var(--teal-soft, #0b7a6e); border-color: var(--teal-soft, #0b7a6e); color: #fff; box-shadow: 0 4px 12px rgba(11, 122, 110, .35); }
.kf-knop[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px rgba(23, 35, 46, .22), 0 0 0 2px var(--teal-soft, #0b7a6e), 0 0 0 3.5px #fff; }
.kf-wis { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 1px solid rgba(23, 35, 46, .18); border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background-color .18s ease; }
.kf-wis::before { content: "\00d7"; font-size: 1.1em; line-height: 1; }
.kf-wis:hover { background: rgba(255, 255, 255, .8); }
.kf-wis[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .kf-knop, .kf-knop i, .kf-wis { transition: none; }
  .kf-knop:hover, .kf-knop:hover i, .kf-knop:active { transform: none; }
}
@media (max-width: 720px) {
  /* Geen negatieve marge: main heeft zelf geen opvulling, dus die liet de pagina 16px breder worden dan het scherm */
  .kleurfilter { margin: 0; padding: 8px 16px; }
  .kf-label { display: none; }
  .kf-knop { min-height: 36px; font-size: .84rem; }
}

/* De winkelbalk staat onder de uitleg en plakt pas aan de kop als je eraan voorbij scrolt; de lijst eronder sluit er strak op aan. */
.winkel-lijst { padding-top: 12px; }
@media (max-width: 720px) { body[data-pagina="webshop"] .winkel-lijst { padding-top: 8px; } }
.wb-kleurhint { margin: 4px 0 0; padding-inline: 24px; font-size: .88rem; color: var(--ash); }
@media (max-width: 720px) { .wb-kleurhint { padding-inline: 16px; } }

/* De mixbalk (korting) onderin gaat voor: dan is er geen aparte mandbalk, en melding en knop zitten erboven. */
@media (max-width: 720px) {
  body.mixbalk-aan .mandbalk { display: none; }
  body.mixbalk-aan .naar-boven, body.mixbalk-aan.heeft-mandbalk .naar-boven { bottom: calc(112px + env(safe-area-inset-bottom)); }
  body.mixbalk-aan #toast, body.mixbalk-aan.heeft-mandbalk #toast { bottom: calc(112px + env(safe-area-inset-bottom)); }
  body.mixbalk-aan.heeft-mandbalk main { padding-bottom: 0; }
}
