/* ==========================================================================
   Brastos Sodas — product page · v4 (05-page-product.md)
   --------------------------------------------------------------------------
   Owner: P-pdp. Only the blocks that exist on preke.html and nowhere else:
   breadcrumb, the two-column product article (gallery / buy-box), variant
   tiles, the quantity row, the availability line, the "about" grid with the
   farm box and the storage <details>. Everything shared (header, cards,
   stepper, chips, sections, footer, drawer) is base.css; the conflict chip
   (.od-conflict, inside Orderday's compact line) is orderday-skin.css. Tokens only.

   Motion: --t-colour on colour, --t-press on :active. No layout property is
   animated: the storage block is a native <details> (open/closed, no height
   tween) and the add → "in cart" swap is a `hidden` toggle.
   ========================================================================== */

/* ---------- breadcrumb: base.css .crumbs; the page only sets its offset from the header ---------- */
[data-pdp="crumb"] { padding-top: var(--sp-4); }
/* an unknown ?id= (js/pdp.js notFound): one sentence, one action */
.pdp-notfound { display: grid; gap: var(--sp-5); justify-items: start; padding-block: var(--sec-y); }

/* ---------- the product article: gallery 6 / buy-box 6 ≥ 900 ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--sp-8); align-items: start; padding-top: var(--sp-5); }   /* the .sec below carries the --sec-y gap — one step, not two */

/* gallery — one photo on --photo-ground, radius --rad-m; thumbs on the same ground ONLY when a product has ≥ 2 images
   (no product does today — the row is not rendered, QA2 design Y6) */
.pdp__gallery { display: grid; gap: var(--sp-3); }
.pdp__pic { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--rad-m); background: var(--photo-ground); display: grid; place-items: center; }
.pdp__pic img { width: 100%; height: 100%; object-fit: cover; }
.pdp__pic .card__pending { font-size: var(--fz-meta); color: var(--ink-muted); }
.pdp__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); list-style: none; padding: 0; }
.pdp__thumb { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--rad-m); background: var(--photo-ground); }
.pdp__thumb button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumb.is-on { outline: 1px solid var(--line-strong); outline-offset: -1px; }
.pdp__thumb button:focus-visible { outline: var(--focus-ring-w) solid var(--focus); outline-offset: var(--focus-ring-offset); }

/* buy-box — the element order is the deliverable (05 §3) */
.pdp__buy { display: grid; gap: var(--sp-5); }
.pdp__head { display: grid; gap: var(--sp-2); }
.pdp__producer { justify-self: start; font-size: var(--fz-ui); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--t-colour) var(--ease-out); }
a.pdp__producer:hover { color: var(--forest); }
span.pdp__producer { text-decoration: none; }   /* a bought-in brand is a fact, not a link — never dressed as one */
.pdp__pricing { display: grid; gap: var(--sp-1); }
.pdp__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--sp-3); font-variant-numeric: tabular-nums lining-nums; }
.pdp__price .price { font-size: var(--fz-moment); line-height: var(--lh-moment); }
.pdp__price .unit, .pdp__price .was { font-size: var(--fz-body); }
.pdp__pack, .pdp__stock { font-size: var(--fz-meta); color: var(--ink-soft); }

/* the form: variants → quantity → add */
.pdp__form { display: grid; gap: var(--sp-4); }
.vt { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--sp-2); }
.vt__legend { padding: 0; margin-bottom: var(--sp-1); font-size: var(--fz-meta); font-weight: 500; color: var(--ink-soft); }
.vt__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-2); }
/* a tile: weight · price · €/kg (Edenmoor); selected = ink keyline, never a fill — one accent per view */
.vt__tile { position: relative; display: grid; gap: 2px; min-height: var(--target-min); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-strong); border-radius: var(--rad-m); background: var(--surface); cursor: pointer; font-variant-numeric: tabular-nums lining-nums;
  transition: background-color var(--t-colour), border-color var(--t-colour), transform var(--t-press); transition-timing-function: var(--ease-out); }
.vt__tile:hover { background: var(--ground-nest); border-color: var(--ink); }
.vt__tile:active { transform: scale(.985); }
.vt__tile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.vt__w { font-weight: 600; font-size: var(--fz-ui); }
.vt__p { font-weight: 600; font-size: var(--fz-price); }
.vt__u { font-size: var(--fz-meta); color: var(--ink-soft); }
.vt__tile:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }   /* an inset keyline, not an elevation */
.vt__tile:has(input:focus-visible) { outline: var(--focus-ring-w) solid var(--focus); outline-offset: var(--focus-ring-offset); }

.pdp__qty { display: flex; align-items: center; gap: var(--sp-3); }
.pdp__qty-label { font-size: var(--fz-meta); font-weight: 500; color: var(--ink-soft); min-width: 5ch; }
.pdp__qty .stepper { width: max-content; }
.pdp__qty .stepper input { width: 5ch; }
.pdp__qty-unit { font-size: var(--fz-ui); color: var(--ink-soft); }
.pdp__qty-total { margin-left: auto; font-size: var(--fz-price); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }   /* `≈ 1,75 €` beside the stepper (QA2 design Y7) */
.pdp__note { margin-top: calc(-1 * var(--sp-2)); font-size: var(--fz-meta); color: var(--ink-soft); }
.pdp__add { display: grid; gap: var(--sp-2); }
.pdp__add .btn { min-height: 48px; }

/* the availability line — the selector's `compact` variant (orderday-skin.css owns the text
   and the link); this is only its box on the buy-box */
.pdp__fulfil { padding: var(--sp-2) var(--sp-4); border-radius: var(--rad-m); background: var(--chrome); font-variant-numeric: tabular-nums lining-nums; }
.fc__ico { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; }
.fc__ico svg { width: 20px; height: 20px; }

.pdp__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: calc(-1 * var(--sp-3)); }
.pdp__chips:empty { display: none; }
.pdp__why { margin-top: calc(-1 * var(--sp-4)); font-size: var(--fz-meta); color: var(--ink-soft); }
.pdp__guarantee { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fz-meta); color: var(--ink-soft); line-height: var(--lh-body); }
.pdp__guarantee .fc__ico { color: var(--success-ink); }
.pdp__guarantee .link { font-size: inherit; white-space: normal; }

/* ---------- below: description + storage / the farm box, on the same 6 / 6 columns ---------- */
.pdp-more__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--sp-8); align-items: start; }
.pdp-more__text { display: grid; gap: var(--sp-6); }
.pdp-more__about { display: grid; gap: var(--sp-3); max-width: var(--measure); }
.pdp__desc { font-size: var(--fz-lead); line-height: var(--lh-lead); max-width: var(--measure-lead); }
.eyebrow { font-size: var(--fz-meta); font-weight: 500; color: var(--ink-soft); }

.acc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 56px; padding-block: var(--sp-3); cursor: pointer; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary h2 { font-family: var(--ff-body); font-size: var(--fz-h3); font-weight: 600; line-height: var(--lh-tight); }
.acc__chev { display: grid; place-items: center; flex: none; width: var(--sp-6); height: var(--sp-6); border-radius: var(--rad-pill); color: var(--ink); transition: transform var(--t-colour) var(--ease-out), background-color var(--t-colour) var(--ease-out); }
.acc__chev svg { width: 20px; height: 20px; }
.acc summary:hover .acc__chev { background: var(--chrome); }
.acc[open] .acc__chev { transform: rotate(180deg); }
.acc summary:focus-visible { outline: var(--focus-ring-w) solid var(--focus); outline-offset: var(--focus-ring-offset); }
.acc__body { display: grid; gap: var(--sp-3); padding-bottom: var(--sp-5); max-width: var(--measure); }
.pdp__placeholder { color: var(--ink-soft); }

/* the farm box: logo on a flat tint (never on photography), name, place, this-week line, link */
.farmbox { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--sp-5); align-items: start; padding: var(--sp-5); border-radius: var(--rad-l); background: var(--chrome); }
.farmbox__pic { width: 96px; aspect-ratio: 1; border-radius: var(--rad-m); overflow: hidden; background: var(--photo-ground); display: grid; place-items: center; padding: var(--sp-2); }
.farmbox__pic img { width: 100%; height: 100%; object-fit: contain; }
.farmbox__body { display: grid; gap: var(--sp-2); }
.farmbox h2 { font-family: var(--ff-body); font-size: var(--fz-h3); font-weight: 600; line-height: var(--lh-tight); }
.farmbox .farm__week { margin-top: 0; }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .pdp, .pdp-more__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .pdp { padding-top: var(--sp-4); }
}
@media (max-width: 599px) {
  .pdp { gap: var(--sp-5); }
  .pdp__buy { gap: var(--sp-4); }
  .pdp__thumbs { display: none; }   /* real thumbs (≥ 2 images) stay out of the fold on a phone; the photo is swiped instead (theme) */
  .farmbox { grid-template-columns: 72px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4); }
  .farmbox__pic { width: 72px; }
}
