/* =========================================================================
   Products — /produk/ and every product detail page.
   One showcase card per product (light or ink), image in a padded white frame,
   guaranteed-contrast text in both variants, quick navigation between products.
   Loaded after unify.css.
   ========================================================================= */

:root {
  --pd-pad: clamp(1.25rem, .75rem + 3vw, 4rem);
  --pd-gap: clamp(1.25rem, .75rem + 2.5vw, 4rem);
  --pd-ink-text: rgba(255, 255, 255, .82);
}

/* ---------- section wrapper: stacked showcase cards ---------- */
.product { scroll-margin-top: calc(var(--header-h) + 24px); }
.product-stack, .section > .container > .product:first-child { margin-top: 0; }

/* ---------- the showcase card (both variants) ---------- */
.product {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pd-gap); align-items: center;
  padding: var(--pd-pad); margin: 0;
  border-radius: var(--r-card, 26px);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text);
}
.product + .product, .product.product--rev, .product:not(.product--rev) {
  padding: var(--pd-pad);                       /* beats older `.product + .product { padding-top: 0 }` */
}
.product + .product { margin-top: clamp(1rem, .75rem + 1.5vw, 2rem); border-top: 1px solid var(--line); }
.product.product--rev { background: var(--ink); border-color: var(--ink); color: var(--pd-ink-text); }
.product::before, .product::after { content: none !important; }   /* no muddy glow blobs behind copy */

@media (min-width: 1024px) {
  .product { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .product.product--rev { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .product.product--rev .product__media { order: 2; }
}

/* ---------- image: padded white frame, contained, never touching the card edge ---------- */
.product__media { position: relative; top: 0; min-width: 0; }
.product__frame {
  position: relative; display: grid; place-items: center; margin: 0;
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  aspect-ratio: 1 / 1; min-height: 0;
  border-radius: var(--r-media, 22px); border: 0; background: var(--white);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.product__frame img {
  width: 100%; height: 100%; max-height: none; object-fit: contain; object-position: center;
  transition: transform 1s var(--ease);
}
.product__frame:hover img { transform: scale(1.03); }
.product__index {
  position: absolute; z-index: 2; top: clamp(.75rem, 1.5vw, 1.1rem); left: clamp(.75rem, 1.5vw, 1.1rem);
  padding: .25rem .65rem; border-radius: 999px; background: var(--amber); color: var(--ink);
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; line-height: 1.4;
}
/* tall brochure images: let the frame follow the picture instead of cropping into a square */
.product__frame:has(img[src*="brosur"]), .product__frame:has(img[src*="Untitled-2"]) { aspect-ratio: auto; }
.product__frame:has(img[src*="brosur"]) img, .product__frame:has(img[src*="Untitled-2"]) img { height: auto; max-height: 72vh; }

/* ---------- copy: one comfortable column ---------- */
.product__body { display: grid; gap: 0; align-content: center; min-width: 0; max-width: 62ch; }
.product__body h2 {
  margin: 0 0 clamp(.9rem, .6rem + 1vw, 1.5rem); font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem);
  line-height: 1.08; letter-spacing: -.04em; font-weight: 600; text-wrap: balance; color: var(--ink);
}
.product__body > p, .product__body p { margin: 0; font-size: clamp(.98rem, .94rem + .2vw, 1.08rem); line-height: 1.75; color: var(--text); }
.product__body p + p { margin-top: .95em; }
.product__body .lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.55; letter-spacing: -.015em; color: var(--ink); font-weight: 500; }
.product__body ul:not(.sizes) { margin: 1.1em 0 0; display: grid; gap: .6em; }
.product__body ul:not(.sizes) li { position: relative; padding-left: 1.5em; line-height: 1.6; color: var(--text); }
.product__body ul:not(.sizes) li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--amber); border-radius: 2px; }
.product__body strong { color: var(--ink); font-weight: 600; }
.product__body a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; overflow-wrap: anywhere; background: none; }
.product__body a:not(.btn):hover { text-decoration-color: var(--ink); }

/* size chips */
.product__body .sizes { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; }
.product__body .sizes li { padding: .45rem .95rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line-strong); color: var(--ink); font-family: var(--font-mono); font-size: .78rem; line-height: 1.4; }
.product__body .sizes li::before { display: none; }

/* order box (light) */
.product__body .order-cta {
  display: grid; gap: .4rem; margin-top: clamp(1.25rem, 1rem + 1.5vw, 2rem); padding: 1.1rem 1.35rem;
  border-radius: var(--r-media, 22px); background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
}
.product__body .order-cta p { color: var(--ink); font-weight: 500; font-size: .98rem; line-height: 1.5; }
.product__body .order-cta a { font-family: var(--font-mono); font-size: .82rem; font-weight: 500; color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- INK variant: every descendant gets an explicit readable colour ---------- */
.product.product--rev .product__body h2,
.product.product--rev .product__body strong,
.product.product--rev .product__body .lead,
.product.product--rev .product__body .text-ink,
.product.product--rev .product__body h3 { color: #fff; }
.product.product--rev .product__body p,
.product.product--rev .product__body li { color: var(--pd-ink-text); }
.product.product--rev .product__body ul:not(.sizes) li::before { background: var(--amber); }
.product.product--rev .product__body a:not(.btn) { color: var(--amber); text-decoration-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.product.product--rev .product__body a:not(.btn):hover { color: #fff; text-decoration-color: #fff; }
.product.product--rev .product__body .sizes li { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.product.product--rev .product__body .order-cta { background: rgba(247, 180, 50, .12); border-color: rgba(247, 180, 50, .4); }
.product.product--rev .product__body .order-cta p { color: #fff; }
.product.product--rev .product__body .order-cta a { color: var(--amber); }
.product.product--rev .product__frame { box-shadow: 0 30px 60px -35px rgba(0, 0, 0, .6); }

/* ---------- /produk/ overview rail: tidy white image well + ink caption ---------- */
/* centred flex rail: any number of cards stays centred, never leaves an empty column */
.product-rail { --cols: 2; --gap: clamp(.9rem, .6rem + 1.2vw, 1.5rem); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.product-rail > li { display: grid; flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
@media (min-width: 768px) { .product-rail { --cols: 3; } }
@media (min-width: 1024px) { .product-rail { --cols: 4; } .more-products .product-rail { --cols: 5; } }
.product-rail .p-card { display: grid; grid-template-rows: auto 1fr; height: 100%; background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r-card, 26px); overflow: hidden; }
.product-rail .p-card__media { display: grid; place-items: center; aspect-ratio: 1 / 1; padding: clamp(1rem, .75rem + 1.2vw, 1.75rem); margin: .6rem .6rem 0; border-radius: var(--r-media, 22px); background: var(--white); }
.product-rail .p-card__media img { width: 100%; height: 100%; object-fit: contain; max-height: none; }
.product-rail .p-card__body { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem 1.3rem; }
.product-rail .p-card__body h3 { margin: 0; color: #fff; font-size: clamp(1rem, .95rem + .35vw, 1.2rem); line-height: 1.25; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
.product-rail .p-card__num { flex: none; padding: .2rem .55rem; border-radius: 999px; background: var(--amber); color: var(--ink); font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; }
.product-rail .p-card:hover .p-card__num { background: #fff; }

/* ---------- "Other products" (detail pages) ---------- */
.more-products { background: var(--surface); }
.more-products .sec-head { margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem); }

/* ---------- small screens ---------- */
@media (max-width: 767.98px) {
  :root { --pd-pad: 1.1rem; --pd-gap: 1.25rem; }
  .product__frame { aspect-ratio: 4 / 3; padding: 1rem; }
  .product__body h2 { font-size: clamp(1.45rem, 1.2rem + 2vw, 1.9rem); }
  .product-rail { --gap: .75rem; }
  .product-rail .p-card__body { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .9rem 1rem 1.1rem; }
}
@media (max-width: 380px) { .product-rail { --cols: 1; } }
@media (prefers-reduced-motion: reduce) { .product__frame img { transition: none; } }
