/* Iron Republic PH: product detail page (products/<slug>.html). Template scripts/pdp.mjs, behaviour js/pdp.js.
   Shop layout in the ads' language: gallery on a light tile with a yellow skew panel, sticky buy box, option pills. */

.pdp { padding-top: clamp(16px, 2.6vw, 36px); }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: clamp(28px, 4.2vw, 64px); align-items: start; }

/* ---------- Gallery ---------- */
.pdp-stage { position: relative; overflow: hidden; border-radius: var(--r); background: var(--g); }
.pdp-stage::before { content: ""; position: absolute; top: 0; bottom: 0; right: -18%; width: 52%; background: var(--y); transform: skewX(-20deg); }
.pdp-x { position: absolute; right: 22px; top: 22px; z-index: 2; font-size: 30px; gap: 4px; pointer-events: none; transition: opacity .2s; }
.pdp-stage::before { transition: opacity .2s; }
.pdp-stage.on-photo .pdp-x, .pdp-stage.on-photo::before { opacity: 0; }
.pdp-track { position: relative; z-index: 1; display: flex; aspect-ratio: 1 / 1; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pdp-track::-webkit-scrollbar { display: none; }
.pdp-slide { position: relative; flex: 0 0 100%; display: grid; place-items: center; margin: 0; scroll-snap-align: center; }
.pdp-zoom { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pdp-zoom:focus-visible { outline: 3px solid var(--k); outline-offset: -8px; border-radius: var(--r); }
.pdp-slide.is-cut img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 26px 22px rgba(0,0,0,.32)); transition: transform .35s var(--ease); }
.pdp-zoom:hover img { transform: scale(1.04); }
.pdp-slide.is-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.pdp-slide.is-none .noimg { width: 78%; margin: 0; }
.pdp-tag { position: absolute; left: 14px; bottom: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink-2); font: 800 .66rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; }
.pdp-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pdp-thumb { width: 84px; height: 84px; padding: 4px; border: 2px solid var(--g-2); border-radius: 12px; background: var(--g); transition: border-color .15s; }
.pdp-thumb img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.pdp-thumb.is-cut img { object-fit: contain; }
.pdp-thumb:hover { border-color: var(--k-3); }
.pdp-thumb[aria-current="true"] { border-color: var(--k); background: var(--y); }
.pdp-dots { display: none; }

/* ---------- Buy box ---------- */
.pdp-gallery { position: sticky; top: calc(var(--nav-h) + 22px); }
.pdp-info { min-width: 0; }
.pdp-info .crumbs { margin-bottom: 12px; }
.pdp-hook { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--k); color: var(--y); font: 800 .76rem var(--f-display); font-stretch: 112%; letter-spacing: .05em; text-transform: uppercase; }
.pdp-h1 { margin-top: 14px; font-size: clamp(2rem, 3.5vw, 3.2rem); line-height: .98; overflow-wrap: break-word; hyphens: manual; }
.pdp-sum { margin-top: 14px; max-width: 52ch; font-size: 1.05rem; color: var(--ink-2); }
.pdp-std { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; font-size: .92rem; }
.pdp-std i { font-size: 20px; flex: none; }

.pdp-form { display: grid; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 2px solid var(--k); }
.pdp-opt { min-width: 0; margin: 0; padding: 0; border: 0; }
.pdp-opt legend, .pdp-field > label { padding: 0; margin-bottom: 8px; font: 800 .76rem var(--f-display); font-stretch: 112%; letter-spacing: .06em; text-transform: uppercase; }
.pdp-picked, .pdp-field > label .muted { margin-left: 4px; font: 600 .86rem var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.pdp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-pill { position: relative; display: inline-flex; }
.pdp-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pdp-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--k); border-radius: var(--r-s); background: var(--w); font: 700 .9rem var(--f-body); transition: background-color .15s, box-shadow .15s; }
.pdp-pill:hover span { background: var(--y-soft); }
.pdp-pill input:checked + span { background: var(--y); box-shadow: inset 0 -3px 0 var(--k); font-weight: 800; }
.pdp-pill input:focus-visible + span { outline: 3px solid var(--k); outline-offset: 2px; }

.pdp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 14px; align-items: end; }
.pdp-field { display: grid; min-width: 0; }
.pdp-field .f-in { border-color: var(--k); }
.pdp-qty { display: inline-flex; height: 50px; border: 2px solid var(--k); border-radius: var(--r-s); overflow: hidden; background: var(--w); }
.pdp-qty button { width: 46px; border: 0; background: var(--w); font-size: 18px; touch-action: manipulation; }
.pdp-qty button:hover { background: var(--y-soft); }
.pdp-qty button:focus-visible { outline-offset: -4px; }
.pdp-qty input { width: 62px; border: 0; border-inline: 1.5px solid var(--g-2); text-align: center; font: 800 1.05rem var(--f-body); -moz-appearance: textfield; appearance: textfield; }
.pdp-qty input::-webkit-inner-spin-button, .pdp-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-qty input:focus { outline: none; background: var(--y-soft); }

.pdp-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pdp-acts .btn { width: 100%; min-height: 56px; }
.pdp-add.is-done { --b: var(--ok); }

.pdp-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 0; padding: 0; border: 1.5px solid var(--k); border-radius: var(--r-s); list-style: none; font-weight: 700; font-size: .8rem; line-height: 1.2; }
.pdp-trust li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 6px; text-align: center; }
.pdp-trust li + li { border-left: 1px solid var(--g-2); }
.pdp-trust i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--y); font-size: 16px; }
.pdp-call { margin-top: 12px; font-size: .9rem; color: var(--ink-2); }
.pdp-call a { display: inline-flex; align-items: center; min-height: 44px; color: var(--k); }
.pdp-call .num { font-size: 1.15rem; }

/* ---------- Below the buy box (scripts/pdp-below.mjs): white details -> black how-to -> white FAQ -> grey related -> yellow CTA ---------- */
.pdp-details { padding-top: clamp(28px, 4vw, 56px); }
.pdp-det-grid { position: relative; padding-top: clamp(32px, 4vw, 48px); }
.pdp-det-grid::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 2px; background: var(--k); }
.pdp-det-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.pdp-feats { display: grid; gap: 22px; margin: 28px 0 0; padding: 0; list-style: none; }
.pdp-feats li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.pdp-feats i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--y); font-size: 22px; }
.pdp-feats h3 { font-size: 1rem; font-stretch: 115%; line-height: 1.1; }
.pdp-feats p { margin-top: 4px; color: var(--ink-2); }
.pdp-det-l { position: sticky; top: calc(var(--nav-h) + 88px); }
.pdp-check { position: relative; margin-top: 28px; padding: 24px 24px 24px 30px; border: 2px solid var(--k); border-radius: var(--r); overflow: hidden; }
.pdp-check::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--y); }
.pdp-check h3 { font-size: 1rem; font-stretch: 115%; }
.pdp-check ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-weight: 700; }
.pdp-check li { display: flex; align-items: center; gap: 10px; }
.pdp-check li i { font-size: 22px; }
.pdp-check-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.nw { white-space: nowrap; }

.pdp-table { width: 100%; border-collapse: collapse; border-top: 3px solid var(--k); }
.pdp-table caption { caption-side: top; padding: 12px 16px; background: var(--k); color: var(--y); text-align: left; font: 900 .9rem var(--f-display); font-stretch: 118%; letter-spacing: .04em; text-transform: uppercase; }
.pdp-table th, .pdp-table td { padding: 16px; border-bottom: 1px solid var(--g-2); text-align: left; vertical-align: top; line-height: 1.55rem; }
.pdp-table tr { height: 52px; }
.pdp-table th { width: 36%; font: 800 .74rem/1.55rem var(--f-display); font-stretch: 112%; letter-spacing: .05em; text-transform: uppercase; }
.pdp-table td { font-weight: 600; }
.pdp-table td a { color: var(--k); }
.pdp-table ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; }

.pdp-how h2 { color: var(--w); }
.pdp-how-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 32px 0 0; padding: 0; list-style: none; }
.pdp-how-cols li { display: grid; gap: 12px; align-content: start; }
.pdp-how-cols i { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--y); color: var(--k); font-size: 28px; }
.pdp-how-cols h3 { color: var(--y); font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.pdp-how-cols p { color: var(--on-k-2); max-width: 32ch; }
.pdp-how { padding-bottom: clamp(48px, 6vw, 80px); }
.pdp-how-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 14px 28px; margin-top: 36px; }
.pdp-how .link { color: var(--w); min-height: 44px; }

.pdp-faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.pdp-faq-call { margin: 16px 0 18px; font-weight: 600; }
.pdp-faq-call a { display: inline-flex; align-items: center; min-height: 44px; color: var(--k); }
.pdp-faq-call .num { font-size: 1.4rem; }
.pdp-faq-i { border-top: 2px solid var(--k); }
.pdp-faq-i:last-child { border-bottom: 2px solid var(--k); }
.pdp-faq-i summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; cursor: pointer; list-style: none; }
.pdp-faq-i summary::-webkit-details-marker { display: none; }
.pdp-faq-i summary h3 { font-size: clamp(.95rem, 1.4vw, 1.1rem); font-stretch: 112%; line-height: 1.15; }
.pdp-faq-i summary i { flex: none; font-size: 22px; transition: transform .2s var(--ease); }
.pdp-faq-i[open] summary i { transform: rotate(45deg); }
.pdp-faq-i p { max-width: 60ch; padding-bottom: 22px; color: var(--ink-2); }

/* Related carousel */
.pdp-rel-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.pdp-rel-nav { display: flex; align-items: center; gap: 10px; }
.pdp-rel-nav .link { margin-right: 10px; }
.pdp-arr { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--k); color: var(--y); font-size: 20px; transition: opacity .15s, transform .15s var(--ease); }
.pdp-arr:hover:not(:disabled) { transform: translateY(-2px); }
.pdp-arr:disabled { opacity: .3; cursor: default; }
.pdp-arr[hidden] { display: none; }
.pdp-rel-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pdp-rel-row::-webkit-scrollbar { display: none; }
.pdp-rel-row .pcard { scroll-snap-align: start; }
.pdp-rel-row .pcard:hover { transform: none; }

/* CTA with the product cutout, like the ads */
.pdp-cta.has-cut .pdp-cta-art { display: flex; align-items: center; justify-content: center; gap: 24px; align-self: center; }
.pdp-cta-art .cutout { width: auto; max-width: min(100%, 420px); height: auto; max-height: 300px; object-fit: contain; transform: rotate(-6deg); }
.pdp-cta-art .xmarks { flex: none; }
.pdp-cta-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.pdp-cta-tel { margin: 0; font-weight: 600; }
.pdp-cta-tel a { display: inline-flex; align-items: center; min-height: 44px; color: var(--k); }
.pdp-cta-tel .num { font-size: 1.4rem; }

/* ---------- Photo viewer: small centred card, never full-bleed ---------- */
.pdp-lb { width: min(92vw, 680px); max-width: none; max-height: 80vh; padding: 0; border: 0; border-radius: 16px; background: var(--w); box-shadow: 0 30px 70px -24px rgba(0,0,0,.55); overflow: hidden; }
.pdp-lb::backdrop { background: rgba(20,20,20,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pdp-lb[open] { animation: lb-in .18s ease-out; }
.pdp-lb[open]::backdrop { animation: lb-fade .18s ease-out; }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } }
@keyframes lb-fade { from { opacity: 0; } }
.lb-card { position: relative; display: flex; flex-direction: column; gap: 12px; max-height: 80vh; padding: 16px; }
.lb-x { position: absolute; top: 24px; right: 24px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--k); color: var(--y); font-size: 20px; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
.lb-stage { position: relative; min-height: 0; border-radius: 12px; background: var(--g); overflow: hidden; }
.lb-track { display: flex; height: min(56vh, 520px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.lb-slide img { position: absolute; inset: 32px; width: calc(100% - 64px); height: calc(100% - 64px); object-fit: contain; filter: drop-shadow(0 18px 16px rgba(0,0,0,.28)); }
.lb-slide.is-photo img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: none; }
.lb-arr { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border: 1.5px solid var(--k); border-radius: 50%; background: var(--w); color: var(--k); font-size: 18px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.5); }
.lb-arr[data-dir="-1"] { left: 10px; }
.lb-arr[data-dir="1"] { right: 10px; }
.lb-arr:disabled { opacity: 0; pointer-events: none; }
.lb-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding-inline: 4px; }
.lb-cap b { font: 900 .9rem var(--f-display); font-stretch: 115%; text-transform: uppercase; }
.lb-tag { padding: 3px 9px; border-radius: 999px; background: var(--g); color: var(--ink-2); font: 800 .64rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; }
.lb-tag[hidden] { display: none; }
.lb-thumbs { display: flex; gap: 8px; padding-inline: 4px; }
.lb-thumb { width: 56px; height: 56px; padding: 3px; border: 2px solid var(--g-2); border-radius: 10px; background: var(--g); }
.lb-thumb img { width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }
.lb-thumb.is-cut img { object-fit: contain; }
.lb-thumb[aria-current="true"] { border-color: var(--k); background: var(--y); }
@media (max-width: 640px) {
  .lb-card { padding: 12px; gap: 10px; }
  .lb-x { top: 18px; right: 18px; }
  .lb-track { height: min(60vh, calc(92vw - 24px)); }
  .lb-slide img { inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); }
  .lb-arr { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pdp-lb[open], .pdp-lb[open]::backdrop { animation: none; } }

/* ---------- Sticky order bar: top mini-header on desktop, bottom bar on phones ---------- */
.pdp-bar { position: fixed; left: 0; right: 0; z-index: calc(var(--z-nav) - 1); background: var(--w); visibility: hidden; transition: transform .25s var(--ease), visibility 0s .25s; }
.pdp-bar.on { visibility: visible; transform: none; transition: transform .25s var(--ease); }
.pdp-bar-in { display: flex; align-items: center; gap: 12px; }
.pdp-bar-t { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--y); font-size: 24px; }
.pdp-bar-t img { width: 40px; height: 40px; object-fit: contain; }
.pdp-bar-n { display: grid; flex: 1; min-width: 0; }
.pdp-bar-n b { overflow: hidden; font: 900 .95rem/1.1 var(--f-display); font-stretch: 115%; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.pdp-bar-sel { overflow: hidden; color: var(--ink-3); font-size: .82rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pdp-bar-sel:empty { display: none; }
.pdp-bar .btn { min-height: 46px; padding: 0 18px; }
@media (min-width: 1001px) {
  .pdp-bar { top: calc(var(--nav-h) + 2px); height: 64px; border-top: 0; border-bottom: 2px solid var(--k); box-shadow: 0 10px 18px -16px rgba(0,0,0,.6); transform: translateY(-110%); }
  .pdp-bar-in { height: 100%; }
}
@media (max-width: 1000px) {
  .pdp-rel-row { grid-auto-columns: 40%; }
  .pdp-bar { bottom: 0; z-index: calc(var(--z-fab) + 2); padding-block: 10px calc(10px + env(safe-area-inset-bottom)); border-top: 2px solid var(--k); box-shadow: 0 -12px 22px -16px rgba(0,0,0,.55); transform: translateY(110%); }
  .pdp-bar-t, .pdp-bar-sel { display: none; }
  :root:has(.pdp-bar) .fab { display: none; }
  :root.pdp-bar-on .irc-trig { bottom: 86px; }
  :root:has(.pdp-bar) .foot { padding-bottom: 100px; }
}
@media (min-width: 900px) and (max-width: 1199px) { .pdp-rel-row { grid-auto-columns: calc((100% - 32px) / 3); } }
@media (max-width: 899px) { .pdp-arr { display: none; } }
@media (max-width: 900px) {
  .pdp-grid, .pdp-det-grid, .pdp-faq-grid { grid-template-columns: 1fr; }
  .pdp-gallery { position: static; }
  .pdp-thumbs { display: none; }
  .pdp-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
  .pdp-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--g-2); transition: background-color .2s, width .2s; }
  .pdp-dots span.on { width: 24px; border-radius: 99px; background: var(--k); }
  .pdp-track { aspect-ratio: 5 / 4; }
  .pdp-how-cols { grid-template-columns: 1fr; gap: 22px; }
  .pdp-how-cols li { grid-template-columns: 56px 1fr; column-gap: 16px; row-gap: 4px; }
  .pdp-how-cols li i { grid-row: span 2; }
  .pdp-how-acts { justify-content: flex-start; }
  .pdp-det-l { position: static; }
  .pdp-cta-art .cutout { max-width: min(70%, 300px); max-height: 220px; }
  .pdp-cta-art .xmarks { font-size: 30px; }
}
@media (max-width: 640px) {
  .pdp-table, .pdp-table tbody, .pdp-table tr, .pdp-table th, .pdp-table td { display: block; width: auto; }
  .pdp-table caption { display: block; }
  .pdp-table tr { height: auto; padding: 12px 16px; border-bottom: 1px solid var(--g-2); }
  .pdp-table th, .pdp-table td { padding: 0; border: 0; }
  .pdp-table th { margin-bottom: 4px; }
}
@media (max-width: 520px) {
  .pdp-rel-row { grid-auto-columns: 62%; gap: 10px; }
  .pdp-acts { grid-template-columns: 1fr; }
  .pdp-x { font-size: 22px; right: 14px; top: 14px; }
  .pdp-bar-n { display: none; }
  .pdp-bar .btn.y { flex: 1; }
  .pdp-trust { font-size: .72rem; }
}
@media (max-width: 360px) {
  .pdp-row { grid-template-columns: 1fr; }
  .pdp-h1 { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) { .pdp-zoom:hover img { transform: none; } .pdp-arr:hover:not(:disabled) { transform: none; } }
.pdp-stage:has(.is-none) { background: var(--y-3); }
.pdp-rel-nav .link, .pdp-how .link { min-height: 44px; }
