/* Product page (/product/mini-catalytic-converter). Shared components live in site.css. */

/* ---------- Top: gallery + buy box ---------- */
.pdp-top {
  padding-block: clamp(20px, 3vw, 32px) clamp(40px, 6vw, 72px);
  background:
    radial-gradient(900px 520px at 92% 0%, var(--accent-soft), transparent 62%),
    radial-gradient(700px 400px at 0% 100%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 70%),
    var(--bg);
}
.pdp-top .crumbs { margin-bottom: clamp(16px, 2.4vw, 28px); }

.pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "gallery buy" "glance buy";
  gap: clamp(24px, 3vw, 32px) clamp(28px, 4.5vw, 64px);
  align-items: start;
}
.pdp-gallery { grid-area: gallery; min-width: 0; display: grid; gap: 12px; }
.pdp-buy     { grid-area: buy; min-width: 0; }
.pdp-glance  { grid-area: glance; min-width: 0; }
@media (max-width: 980px) {
  .pdp-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "gallery" "buy" "glance"; }
}

/* Gallery stage: a fixed frame, so switching image never moves the page */
.pdp-gallery__main { position: relative; aspect-ratio: 1 / 1; }
@media (max-width: 980px) { .pdp-gallery__main { aspect-ratio: 5 / 4; } }
.pdp-gallery__main > .pdp-stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  /* One explicit row and column that cannot grow: an implicit auto row
     stretches to the square photo's own height inside the 5:4 phone and
     tablet frame, which cut the restrictor disc off below the caption. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  border-radius: var(--radius-lg); overflow: hidden;
}
.pdp-stage picture { display: block; width: 100%; height: 100%; min-height: 0; }
.pdp-stage .pdp-stage__img { width: 100%; height: 100%; }
/* Contained with room at the bottom, so the caption pill never covers the part */
.pdp-stage--product .pdp-stage__img { object-fit: contain; padding: 6% 7% 56px; }
.pdp-stage--detail .pdp-stage__img { object-fit: cover; }
.pdp-gallery__main > .pdp-stage--drawing { padding: clamp(18px, 3vw, 36px) clamp(14px, 2.5vw, 28px) clamp(56px, 7vw, 72px); }
.pdp-stage--drawing .pdp-stage__img { object-fit: contain; mix-blend-mode: normal; }
/* site.css puts .blueprint__label in the flow on phones; inside the fixed
   gallery frame that adds a grid row and pushes the drawing under the caption. */
.pdp-gallery__main .blueprint__label { position: absolute; top: 12px; right: 14px; margin: 0; }
.pdp-stage--steel {
  background:
    radial-gradient(600px 300px at 80% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%),
    var(--steel-bg);
  border: 1px solid var(--steel-line);
  color: var(--steel-ink);
}
.pdp-stage__caption {
  position: absolute; left: 14px; bottom: 14px; right: 14px; width: fit-content; max-width: calc(100% - 28px);
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .25rem .5rem;
  padding: .45rem .8rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--steel-bg) 90%, transparent); color: var(--steel-ink);
  font-size: .8rem; line-height: 1.35;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pdp-stage__caption strong { color: var(--accent-2); font-weight: 650; }
.pdp-stage__caption .icon { width: 15px; height: 15px; color: var(--accent-2); }

/* Thumbnails */
.pdp-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pdp-thumbs li { min-width: 0; }
.pdp-thumb {
  display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; overflow: hidden;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.pdp-thumb picture { display: block; width: 100%; height: 100%; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pdp-thumb[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pdp-thumb--steel { background: var(--steel-bg); border-color: var(--steel-line); }
.pdp-thumb--steel img { object-fit: contain; padding: 10%; }
@media (max-width: 560px) {
  .pdp-thumbs {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64px;
    overflow-x: auto; scroll-snap-type: x proximity; padding: 3px 3px 6px; margin-inline: -3px;
    scrollbar-width: none;
  }
  .pdp-thumbs::-webkit-scrollbar { display: none; }
  .pdp-thumbs li { scroll-snap-align: start; }
}

/* Buy box */
.pdp-buy__title { font-size: clamp(1.9rem, 3.4vw, 2.65rem); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 .55rem; }
.pdp-buy__pitch { color: var(--ink-2); font-size: 1.03rem; line-height: 1.6; margin: 0 0 1rem; max-width: 52ch; }

.pdp-rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; font-size: .9rem; color: var(--ink-3); text-decoration: none; }
.pdp-rating strong { color: var(--ink); }
.pdp-rating:hover span { color: var(--ink); text-decoration: underline; }

.pdp-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.pdp-stars .icon { width: 17px; height: 17px; color: var(--line-2); }
.pdp-stars .icon.is-on { color: var(--accent); fill: var(--accent); }

.pdp-panel { margin-top: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.pdp-panel__buy { padding: clamp(18px, 2.4vw, 26px); }
.pdp-panel__price { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1.25rem; }

.pdp-form__label { display: block; margin-bottom: .45rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pdp-form__row { display: flex; gap: .7rem; align-items: stretch; }
.pdp-form__row .qty { height: 54px; flex-shrink: 0; border-radius: 12px; }
.pdp-form__row .qty button { width: 44px; }
.pdp-form__row .qty button:disabled { opacity: .4; cursor: not-allowed; }
.pdp-form__row .qty .icon { width: 18px; height: 18px; }
.pdp-form__submit { flex: 1; min-width: 0; }
.pdp-form__note { display: flex; gap: .5rem; align-items: flex-start; margin: .9rem 0 0; font-size: .88rem; color: var(--ink-2); }
.pdp-form__note .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
.pdp-form__note--muted { color: var(--ink-3); }
.pdp-form__note--muted .icon { color: var(--ink-3); }

.pdp-panel__rows { list-style: none; margin: 0; padding: 0; background: var(--surface-2); border-top: 1px solid var(--line); }
.pdp-panel__rows li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .85rem; align-items: start;
  padding: .9rem clamp(18px, 2.4vw, 26px); font-size: .88rem; line-height: 1.5; color: var(--ink-3);
}
.pdp-panel__rows li + li { border-top: 1px solid var(--line); }
.pdp-panel__rows strong { display: block; color: var(--ink); font-size: .95rem; margin-bottom: .1rem; }
.pdp-panel__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.pdp-panel__icon .icon { width: 19px; height: 19px; }

.pdp-buy__ticks { margin-top: 1.3rem; font-size: .93rem; }
.pdp-buy__ticks strong { color: var(--ink); }

/* At a glance */
.pdp-glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pdp-glance__item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: .85rem; align-items: center; padding: 1rem 1.1rem; background: var(--surface); }
.pdp-glance__item strong { display: block; color: var(--ink); font-size: .96rem; line-height: 1.3; }
.pdp-glance__item span:not(.feature__icon) { display: block; color: var(--ink-3); font-size: .85rem; line-height: 1.4; margin-top: .15rem; }
@media (max-width: 480px) { .pdp-glance { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Sticky sub-navigation ---------- */
.pdp-subnav {
  position: sticky; top: var(--header-h); z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-block: 1px solid var(--line);
}
.pdp-subnav__inner { display: flex; align-items: center; gap: 1rem; min-height: 58px; }
.pdp-subnav__links {
  list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0;
  display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.pdp-subnav__links::-webkit-scrollbar { display: none; }
.pdp-subnav__links a {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .4rem .85rem;
  border-radius: var(--radius-pill); white-space: nowrap; text-decoration: none;
  font-size: .9rem; font-weight: 600; color: var(--ink-3);
  transition: color var(--t), background var(--t);
}
.pdp-subnav__links a:hover { color: var(--ink); background: var(--surface-3); }
.pdp-subnav__links a[aria-current="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.pdp-subnav__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--ink-2); font-size: .72rem; font-weight: 700; }
.pdp-subnav__buy { display: flex; align-items: center; gap: .9rem; flex-shrink: 0; }
.pdp-subnav__price { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 980px) {
  .pdp-subnav__buy { display: none; }
  .pdp-subnav__inner { padding-inline: 0; }
  .pdp-subnav__links { padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .pdp-subnav__inner { min-height: 54px; }
}

/* Anchors land below the header and the sub-nav */
.pdp-section { scroll-margin-top: 64px; }

/* ---------- Overview ---------- */
.pdp-signs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 28px); }
.pdp-signs .h4 { margin-bottom: .8rem; }

/* ---------- Specs + box ---------- */
.pdp-specs { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: clamp(28px, 4vw, 44px); }
@media (max-width: 960px) { .pdp-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pdp-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pdp-sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); align-items: start; }
@media (max-width: 860px) { .pdp-sheets { grid-template-columns: minmax(0, 1fr); } }
.pdp-sheets .h4 { margin-bottom: .8rem; }
.pdp-spec-table tbody th { width: 38%; font-weight: 600; color: var(--ink-3); }
.pdp-spec-table td { color: var(--ink); }
@media (max-width: 480px) {
  .pdp-spec-table tr { display: block; border-bottom: 1px solid var(--line); }
  .pdp-spec-table tr:last-child { border-bottom: 0; }
  .pdp-spec-table tbody th, .pdp-spec-table td { display: block; width: auto; border-bottom: 0; }
  .pdp-spec-table tbody th { padding-bottom: 0; font-size: .8rem; letter-spacing: .04em; }
  .pdp-spec-table td { padding-top: .2rem; }
}

.pdp-box {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(24px, 4vw, 48px); align-items: center;
  margin-top: clamp(28px, 4vw, 44px); padding: clamp(16px, 2.4vw, 28px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) { .pdp-box { grid-template-columns: minmax(0, 1fr); } }
.pdp-box__text h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 1rem; }
.pdp-box__label { margin: 0 0 .6rem; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.ticks + .pdp-box__label { margin-top: 1.4rem; }
.pdp-box .ticks { font-size: .94rem; }
.pdp-box .callout { display: grid; font-size: .92rem; }

/* ---------- Installation (steel band) ---------- */
.pdp-install-stats { margin-bottom: clamp(24px, 3vw, 36px); }
.pdp-install-stats .stat__value { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.section--steel .process__item { background: var(--steel-2); border-color: var(--steel-line); }
.section--steel .process__media { background: var(--steel-bg); border-color: var(--steel-line); }
.section--steel .process__body p { color: var(--steel-ink-2); }
.section--steel .process__body::before { color: var(--accent-2); }

.pdp-bench { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--steel-line); }
.pdp-bench__head { max-width: 640px; margin-bottom: clamp(20px, 3vw, 32px); }
.pdp-bench__head h3 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-bottom: .35rem; }
.pdp-bench__head p { margin: 0; color: var(--steel-ink-2); }

.pdp-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 20px); }
@media (max-width: 960px) { .pdp-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pdp-notes { grid-template-columns: minmax(0, 1fr); } }
.pdp-note { background: var(--steel-2); border: 1px solid var(--steel-line); border-radius: var(--radius); padding: 1.2rem 1.25rem 1.3rem; }
.pdp-note__icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: .9rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.pdp-note__icon .icon { width: 21px; height: 21px; }
.pdp-note h4 { font-size: 1.02rem; margin: 0 0 .4rem; }
.pdp-note p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--steel-ink-2); }

.pdp-tools {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.2rem clamp(24px, 4vw, 48px); align-items: start;
  margin-top: clamp(16px, 2vw, 20px); padding: clamp(18px, 2.6vw, 28px);
  background: var(--steel-2); border: 1px solid var(--steel-line); border-radius: var(--radius);
}
.pdp-tools h4 { font-size: 1.1rem; margin: 0 0 .4rem; }
.pdp-tools p { margin: 0; color: var(--steel-ink-2); font-size: .93rem; }
.pdp-tools__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.2rem; }
.section--steel .pdp-tools__list li { color: var(--steel-ink); font-size: .93rem; }
@media (max-width: 760px) { .pdp-tools { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .pdp-tools__list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Compatibility: four checks in two columns, the drawing full width below ---------- */
.pdp-fit__actions { align-items: center; }
.pdp-fit__steps { margin-bottom: clamp(28px, 4vw, 44px); }
@media (min-width: 760px) { .pdp-fit__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(28px, 4vw, 56px); } }
.pdp-fit__figure .blueprint__scroll > svg { display: block; max-width: 920px; margin-inline: auto; }

/* ---------- Delivery ---------- */
.pdp-hours { display: grid; gap: .2rem; margin: .35rem 0 0; }
.pdp-hours > div { display: flex; justify-content: space-between; gap: 1rem; max-width: 280px; }
.pdp-hours dt { color: var(--ink-2); }
.pdp-hours dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pdp-zone { display: block; margin-top: .15rem; font-size: .82rem; font-weight: 400; color: var(--ink-3); }
.pdp-pay { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* .trustbar__item span (display:block) outranks .trustbar__icon (display:grid) in site.css,
   which pushes the icon into the tile's corner; restore the centring here. */
.pdp-pay .trustbar__icon { display: grid; place-items: center; }
@media (max-width: 760px) { .pdp-pay { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Reviews ---------- */
.pdp-score { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pdp-score__value { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.pdp-score .pdp-stars .icon { width: 19px; height: 19px; }
.pdp-score__count { display: block; margin-top: .25rem; font-size: .85rem; color: var(--ink-3); }

.pdp-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2.4vw, 24px); }
.pdp-review { display: flex; flex-direction: column; }
.pdp-review blockquote { margin: 0 0 1.2rem; color: var(--ink-2); }
.pdp-review figcaption { margin-top: auto; display: flex; align-items: center; gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
.pdp-review figcaption strong { display: block; color: var(--ink); font-size: .92rem; }
.pdp-review time { display: block; }
.pdp-noreviews { padding-block: clamp(32px, 5vw, 56px); }
.pdp-noreviews p { margin-bottom: 1.1rem; }
.pdp-noreviews__actions { justify-content: center; }
.pdp-review__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; }

/* ---------- Compliance + CTA ---------- */
.pdp-legal { font-size: .92rem; }
.pdp-legal p { margin: 0; color: var(--ink-2); }
.pdp-404__actions { justify-content: center; }

/* ---------- Phone sticky buy bar ---------- */
.pdp-bar { display: none; }
@media (max-width: 980px) {
  .pdp-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
  }
  .js .pdp-bar { transform: translateY(110%); visibility: hidden; transition: transform .25s var(--ease), visibility 0s linear .25s; }
  .js .pdp-bar.is-visible { transform: none; visibility: visible; transition: transform .25s var(--ease), visibility 0s; }
  .page-product .footer__bar { padding-bottom: calc(2rem + 76px); }
}
.pdp-bar__info { display: grid; min-width: 0; }
.pdp-bar__price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pdp-bar__stock { font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-bar__btn { flex-shrink: 0; }
