/* =====================================================================
   shop-product.css — pagina-eigen CSS voor de productpagina (page-product.php)
   ---------------------------------------------------------------------
   Bouwt uitsluitend voort op de tokens en componenten uit shop.css.
   Geen eigen knoppen, kaarten of stalen: alleen de opbouw van dit scherm
   en de plekken waar de oude styles.css nog overschreven moet worden.
   ===================================================================== */

/* ---------------------------------------------------------------
   1  Hoofdraster 58/42
   --------------------------------------------------------------- */
.pdp__grid {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: 48px;
  align-items: start;
}
.pdp__media { min-width: 0; }
.pdp__info  { min-width: 0; }

/* ---------------------------------------------------------------
   2  Beeldvlak en miniaturen
   --------------------------------------------------------------- */
/* .bb-pdp-img staat ook in de oude styles.css; die regels worden hier
   volledig vervangen. De klasse blijft staan omdat bsw-bricks.js er de
   vergrootweergave aan hangt. */
.pdp__stage.bb-pdp-img {
  position: relative;
  /* Eén cel die het hele vlak vult. Zonder expliciete rij en kolom bepaalt de
     foto zelf de celbreedte, en dan valt width:100% terug op de eigen grootte
     van de foto in plaats van op het beeldvlak. */
  display: grid; grid-template: 1fr / 1fr; place-items: center;
  aspect-ratio: 1;
  padding: 64px;
  background: var(--off);
  border: 1px solid var(--gray-line);
  border-radius: var(--r-lg);
  cursor: zoom-in;
  overflow: hidden;
}
/* De onderdeelfoto's zijn ongeveer 200px breed. Het beeldvlak is veel groter,
   dus de foto mag meeschalen, maar niet verder dan ongeveer twee keer zijn
   eigen grootte: daarboven wordt hij zichtbaar zacht. */
.pdp__stage.bb-pdp-img img {
  width: 100%; max-width: 400px;
  height: auto; max-height: 100%;
  object-fit: contain; display: block;
}
.pdp__colorlabel {
  position: absolute; top: 16px; left: 16px;
  display: none;
  padding: 4px 10px; border-radius: var(--r-xs);
  background: var(--navy); color: var(--cream);
  font-size: 12px; font-weight: 700; line-height: 1.4;
}
.pdp__thumbs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 12px;
}
.pdp__thumb {
  position: relative; aspect-ratio: 1; padding: 10px;
  display: grid; grid-template: 1fr / 1fr; place-items: center;
  background: var(--off); border: 1px solid var(--gray-line);
  border-radius: var(--r-sm); cursor: pointer;
  transition: border-color 160ms ease-out;
}
.pdp__thumb img { width: 100%; max-width: 150px; height: auto; max-height: 100%; object-fit: contain; display: block; }
.pdp__thumb:hover { border-color: var(--gray-3); }
.pdp__thumb.is-active { border: 2px solid var(--navy); padding: 9px; }

/* ---------------------------------------------------------------
   3  Kop, identificatie, kleurregel
   --------------------------------------------------------------- */
.pdp__kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
}
.pdp__kicker a { color: var(--text-muted); }
.pdp__kicker a:hover { color: var(--navy); }
.pdp__title.bsw-h1 { margin: 8px 0 12px; overflow-wrap: anywhere; }

.pdp__ids { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pdp__id {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--gray-line); border-radius: 8px; background: var(--white);
  font-family: var(--font-body); cursor: pointer;
  transition: background 160ms ease-out;
}
.pdp__id:hover { background: var(--off); }
.pdp__id-label { font-size: 12px; color: var(--text-muted); }
.pdp__id-val { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--navy); }
.pdp__id svg { width: 14px; height: 14px; flex: none; stroke: var(--text-muted); }

.pdp__rating {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 14px; font-size: 13px; color: var(--text-2);
}
.pdp__rating:hover { text-decoration: none; color: var(--navy); }
/* Sterren als getekende vorm: amber vulling met een navy omlijning, want
   amber tegen een licht vlak haalt 4.5:1 nooit. */
.pdp__stars { display: inline-flex; gap: 1px; line-height: 0; flex: none; }
.pdp__star { width: 16px; height: 16px; flex: none; fill: var(--gray-3); stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; }
.pdp__star.is-on { fill: var(--yellow); }

.pdp__colorline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 15px; color: var(--navy); margin-bottom: 20px;
}
.pdp__colorlink { font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------
   4  Prijskaart
   --------------------------------------------------------------- */
.pdp__buy {
  background: var(--cream); border: 1px solid var(--cream-3);
  border-radius: var(--r-md); padding: 20px;
}
.pdp__pricerow { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.pdp__unit { font-size: 14px; color: var(--text-2); }

.pdp__tiers { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pdp__tier {
  flex: 1 1 96px; min-width: 0;
  background: var(--white); border: 1px solid var(--cream-3);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.pdp__tier-q { font-size: 12px; color: var(--text-2); }
.pdp__tier-p { font-family: var(--font-mono); font-size: 14px; font-weight: 500; margin-top: 2px; color: var(--navy); }

.pdp__stock {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  font-size: 15px; font-weight: 700; color: var(--success);
}
.pdp__stock.is-low { color: var(--danger); }
.pdp__stock svg { width: 18px; height: 18px; flex: none; }

.pdp__cartrow { display: flex; gap: 10px; margin-top: 16px; }
.pdp__cartrow .bsw-stepper--pdp { flex: none; }
.pdp__add { flex: 1; min-width: 0; }
.pdp__flash { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--danger); }

/* Het aantalveld is een gewoon number-veld zodat het formulier ook zonder
   JavaScript werkt. De pijltjes van de browser horen niet in het ontwerp. */
.bsw-stepper__val[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.bsw-stepper__val[type="number"]::-webkit-outer-spin-button,
.bsw-stepper__val[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bsw-stepper__val:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }

/* Geen voorraad */
.pdp__buy--out { background: var(--white); border-color: var(--gray-line); }
.pdp__outh {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  line-height: 1.3; margin: 0; color: var(--navy);
}
.pdp__outp { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 8px 0 16px; }
.pdp__notify { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp__notify .bsw-input { flex: 1 1 200px; min-width: 0; }
.pdp__notify .bsw-btn { flex: none; }
.pdp__notifymsg { margin-top: 10px; font-size: 13px; font-weight: 700; }
.pdp__notifymsg.is-ok  { color: var(--success); }
.pdp__notifymsg.is-err { color: var(--danger); }

/* ---------------------------------------------------------------
   5  Beloftes
   --------------------------------------------------------------- */
.pdp__promises {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.pdp__promises li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-2);
}
.pdp__promises svg { width: 20px; height: 20px; flex: none; stroke: var(--navy); }

/* ---------------------------------------------------------------
   6  Specificatietabel
   --------------------------------------------------------------- */
.pdp__spec { width: 100%; border-collapse: collapse; margin-top: 24px; }
.pdp__spec tr { border-bottom: 1px solid var(--gray-2); }
.pdp__spec-l { padding: 10px 12px 10px 0; font-size: 14px; color: var(--text-muted); width: 180px; }
.pdp__spec-v { padding: 10px 0; font-size: 14px; color: var(--navy); overflow-wrap: anywhere; }
.pdp__spec-v a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.pdp__spec-v .bsw-mono { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }

/* ---------------------------------------------------------------
   7  Uitklap: in welke sets zit dit onderdeel
   --------------------------------------------------------------- */
.pdp__sets {
  border: 1px solid var(--gray-line); border-radius: var(--r-md);
  background: var(--white); margin-top: 20px;
}
.pdp__sets > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 18px; cursor: pointer;
  font-size: 15px; font-weight: 700; color: var(--navy);
  list-style: none;
}
.pdp__sets > summary::-webkit-details-marker { display: none; }
.pdp__sets > summary svg {
  width: 18px; height: 18px; flex: none; stroke: var(--navy);
  transition: transform 160ms ease-out;
}
.pdp__sets[open] > summary svg { transform: rotate(180deg); }
.pdp__sets-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 2px; }
.pdp__setrow {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0; font-size: 14px; color: var(--navy);
}
.pdp__setrow:hover { text-decoration: none; background: var(--off); }
.pdp__setnr { font-family: var(--font-mono); font-weight: 500; color: var(--navy); flex: none; }
.pdp__setname { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdp__setqty { font-family: var(--font-mono); color: var(--text-muted); flex: none; }
.pdp__setsall { margin-top: 8px; align-self: flex-start; }

/* ---------------------------------------------------------------
   8  Secties onder de vouw
   --------------------------------------------------------------- */
.pdp-sec {
  margin-top: 64px; border-top: 1px solid var(--gray-line); padding-top: 32px;
}
.pdp-sec .bsw-h2 { margin: 0 0 4px; }
.pdp-sec__lead { margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--text-muted); max-width: 680px; }
.pdp-sec__count { font-family: var(--font-body); font-weight: 400; font-size: 14px; color: var(--text-muted); }
.pdp-sec__hint {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--cream); color: var(--navy); font-size: 12px;
}

/* ---------------------------------------------------------------
   9  Kleurenstrook
   --------------------------------------------------------------- */
.pdp-colors { display: flex; flex-wrap: wrap; gap: 20px; }
.pdp-color {
  width: 96px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; border: 0; background: transparent; padding: 4px 0;
  font-family: var(--font-body); cursor: pointer;
}
.pdp-color__name { font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.pdp-color__price { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.pdp-color.is-selected .bsw-swatch {
  box-shadow: inset 0 0 0 1px rgba(27,42,78,0.18), 0 0 0 2px #FFFFFF, 0 0 0 4px var(--yellow);
}

.pdp-colors-more { margin-top: 24px; }
.pdp-colors-more > summary {
  display: inline-flex; list-style: none; cursor: pointer;
}
.pdp-colors-more > summary::-webkit-details-marker { display: none; }
.pdp-colors-more[open] > summary { margin-bottom: 24px; }

/* ---------------------------------------------------------------
   10  De kleuren- en conditielijst (koopfunctie)
   --------------------------------------------------------------- */
.pdp-listings { margin-top: 32px; }
.pdp-listings .bsw-table { min-width: 720px; }
.pdp-listings.bb-pdp-listings tbody tr { cursor: pointer; }
.pdp-listings.bb-pdp-listings tbody tr:hover { background: var(--off); }
.pdp-listings.bb-pdp-listings tbody tr.is-selected {
  background: var(--cream);
  box-shadow: inset 3px 0 0 0 var(--yellow);
}
.pdp-listings__color { display: inline-flex; align-items: center; gap: 8px; }
.pdp-listings__thumb {
  width: 32px; height: 32px; flex: none; object-fit: contain;
  background: var(--off); border-radius: var(--r-xs);
}
.pdp-listings__price { font-family: var(--font-mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.pdp-listings__tiers { display: inline-block; margin-left: 6px; position: relative; }
.pdp-listings__tiers > summary {
  cursor: pointer; color: var(--text-2); font-size: 12px; list-style: none;
  text-decoration: underline; text-underline-offset: 2px;
}
.pdp-listings__tiers > summary::-webkit-details-marker { display: none; }
.pdp-listings__tierbox {
  position: absolute; right: 0; z-index: 5; margin-top: 4px;
  background: var(--white); border: 1px solid var(--gray-line);
  border-radius: var(--r-sm); padding: 8px 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--navy);
  white-space: nowrap; box-shadow: var(--sh-2);
}
.pdp-listings__actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pdp-listings__form { display: flex; align-items: center; gap: 8px; }
.pdp-listings__form .bsw-stepper { flex: none; }
.pdp-listings__wanted { margin: 0; }
.pdp-listings__wanted .bsw-btn-text { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.pdp-listings__wanted svg { flex: none; }

/* De laagvoorraad-melding stond in het template zelf, hij hoort hier. */
.bb-lowstock {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 3px;
  font-size: 11px; font-weight: 700; color: var(--danger); line-height: 1.2;
}
.bb-lowstock svg { width: 13px; height: 13px; flex: none; }

/* ---------------------------------------------------------------
   11  Kaarten in de onderste secties
   --------------------------------------------------------------- */
/* De hele kaart is één link; de titel is dan geen knop maar een span. */
a.pdp-linkcard { color: var(--navy); }
a.pdp-linkcard:hover { text-decoration: none; color: var(--navy); }
a.pdp-linkcard:hover .bsw-card__title { text-decoration: underline; }
.pdp-linkcard .bsw-card__img { display: grid; place-items: center; }
.pdp-linkcard .bsw-card__img img,
.bsw-card__img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pdp-card__h { margin: 0; font-size: inherit; font-weight: inherit; }
.pdp-card__meta { font-size: 13px; color: var(--text-muted); }
.pdp-card__meta .bsw-mono { font-family: var(--font-mono); font-size: 12px; }
.bsw-card__actions .pdp-card__form { flex: 1; display: flex; min-width: 0; }
.bsw-card__actions .pdp-card__form .bsw-card__buy { width: 100%; }
a.bsw-card__buy { text-decoration: none; }
a.bsw-card__buy:hover { text-decoration: none; }

/* ---------------------------------------------------------------
   12  Overige sets, compacte lijst
   --------------------------------------------------------------- */
.pdp-moresets { margin-top: 16px; }
.pdp-moresets > summary {
  display: inline-block; cursor: pointer; list-style: none;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--gray-soft); font-size: 14px; font-weight: 700; color: var(--navy);
}
.pdp-moresets > summary::-webkit-details-marker { display: none; }
.pdp-moresets .bb-more-sets-close { display: none; }
.pdp-moresets[open] .bb-more-sets-open { display: none; }
.pdp-moresets[open] .bb-more-sets-close { display: inline; }
.pdp-moresets .bb-more-sets-list {
  list-style: none; padding: 16px 0 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px;
}
.pdp-moresets .bb-more-sets-list li {
  font-size: 13px; line-height: 1.45;
  border-bottom: 1px solid var(--gray-line); padding: 6px 0;
}
.pdp-moresets .bb-more-sets-list a { color: var(--navy); }
.pdp-moresets__meta { color: var(--text-muted); font-size: 12px; }
.pdp-moresets__capped { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }

/* ---------------------------------------------------------------
   13  Setnummer-band
   --------------------------------------------------------------- */
.pdp-setband {
  margin-top: 48px; padding: 40px 24px;
  background-color: var(--navy); border-radius: var(--r-lg);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.pdp-setband .bsw-h2--band { font-size: 22px; margin: 0; }
.pdp-setband__p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--cream-3); max-width: 520px; }
.pdp-setband__form {
  display: flex; gap: 10px; margin-top: 20px; width: 100%; max-width: 520px;
}
.pdp-setband__form .bsw-input { flex: 1; min-width: 0; border-color: transparent; }
.pdp-setband__form .bsw-btn { flex: none; }

/* ---------------------------------------------------------------
   14  Responsief
   --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .pdp__grid { gap: 32px; }
  .pdp__stage.bb-pdp-img { padding: 48px; }
}

@media (max-width: 900px) {
  .pdp__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pdp__stage.bb-pdp-img { padding: 32px; }
  .pdp-sec { margin-top: 48px; padding-top: 24px; }
  .pdp__spec-l { width: 42%; }
}

@media (max-width: 640px) {
  .pdp__stage.bb-pdp-img { padding: 24px; border-radius: var(--r-md); }
  .pdp__thumbs { gap: 8px; }
  .pdp__buy { padding: 16px; }
  .pdp__cartrow { flex-wrap: wrap; }
  .pdp__add { flex: 1 1 160px; }
  .pdp-colors { gap: 12px; }
  .pdp-color { width: 84px; }
  .pdp-setband { padding: 28px 16px; }
  .pdp-setband__form { flex-direction: column; }
  /* flex: none, anders krimpt het veld in de kolomrichting tot zijn inhoud. */
  .pdp-setband__form .bsw-input { flex: none; width: 100%; }
  .pdp-setband__form .bsw-btn { width: 100%; }
  .pdp-moresets .bb-more-sets-list { grid-template-columns: minmax(0, 1fr); }
  .pdp-sec__lead { font-size: 13px; }
}
