/* Product detail page */
@import url("./catalog-card.css");

/* ---------- breadcrumbs ---------- */
.crumbs { padding-top: 22px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--ink-500); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.crumbs li + li::before { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-300); border-top: 1.5px solid var(--ink-300); transform: rotate(45deg); margin-right: 2px; }
/* 44px-tall hit area; the negative margin keeps the line height of the trail unchanged. */
.crumbs a { padding-block: 12px; margin-block: -12px; color: var(--ink-600); }
.crumbs a:hover { color: var(--ink-900); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink-800); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-skel { display: inline-block; width: 120px; height: 12px; }
/* Phones: the product name is the heading right below the photos, so the trail stops at the category
   (a long name would otherwise be cut off with an ellipsis or wrap the trail onto a second line). */
@media (max-width: 639.98px) {
  .crumbs li:last-child:not(:first-child) { display: none; }
}

/* ---------- top layout ---------- */
.pdp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 16px 0 clamp(48px, 7vw, 88px); }
@media (min-width: 900px) {
  .pdp-top { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: clamp(32px, 4.4vw, 64px); align-items: start; padding-top: 18px; }
  .pinfo-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; align-self: start; }
.gallery-main {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--photo-bg); touch-action: pan-y; cursor: zoom-in; outline: none;
}
.gallery-main:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.gallery-track { display: flex; height: 100%; transition: transform 0.45s var(--ease); will-change: transform; }
.gallery-slide { position: relative; flex: 0 0 100%; height: 100%; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.gallery-main.is-missing { cursor: default; display: grid; place-items: center; }
.gallery-missing { display: grid; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--ink-500); font-size: 14px; font-weight: 600; }
.gallery-missing svg { width: 72px; height: 72px; color: var(--ink-400); }

.gnav {
  position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--ink-900); box-shadow: var(--shadow-sm);
  opacity: 0; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background-color 0.15s;
}
.gnav svg { width: 22px; height: 22px; }
.gnav:hover { background: #fff; transform: scale(1.05); }
.gprev { left: 14px; }
.gnext { right: 14px; }
.gallery-main:hover .gnav, .gallery-main:focus-within .gnav, .gnav:focus-visible { opacity: 1; }
.gnav[disabled] { opacity: 0 !important; pointer-events: none; }
.gzoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--ink-900); box-shadow: var(--shadow-sm);
}
.gzoom svg { width: 19px; height: 19px; }
.gzoom:hover { background: #fff; }
.gcount {
  position: absolute; left: 14px; bottom: 14px; z-index: 2; height: 28px; padding: 0 11px; display: inline-flex; align-items: center;
  border-radius: var(--radius-pill); background: rgba(11, 18, 32, 0.66); color: #fff; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.gallery-dots { display: none; justify-content: center; gap: 6px; padding-top: 2px; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: background-color 0.2s, width 0.2s; }
.gallery-dots span.is-on { width: 18px; border-radius: 3px; background: var(--ink-900); }

.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; list-style: none; }
.gthumb {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; overflow: hidden;
  border: 0; border-radius: var(--radius-sm); background: var(--photo-bg); cursor: pointer;
}
.gthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease), opacity 0.2s; }
.gthumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(11, 18, 32, 0.06); transition: box-shadow 0.15s var(--ease); }
.gthumb:hover img { transform: scale(1.04); }
.gthumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px var(--ink-900); }
.gthumb:focus-visible { box-shadow: var(--ring); }

@media (min-width: 900px) {
  .gallery { grid-template-columns: 70px minmax(0, 1fr); gap: 14px; }
  .gallery-thumbs { grid-template-columns: 1fr; align-content: start; gap: 10px; max-height: var(--main-h, 680px); overflow-y: auto; scrollbar-width: none; padding: 1px; }
  .gallery-thumbs::-webkit-scrollbar { display: none; }
  .gallery-thumbs.is-scroll.at-start:not(.at-end) { -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
  .gallery-thumbs.is-scroll.at-end:not(.at-start) { -webkit-mask-image: linear-gradient(to top, #000 80%, transparent); mask-image: linear-gradient(to top, #000 80%, transparent); }
  .gallery-thumbs.is-scroll:not(.at-start):not(.at-end) { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); }
  .gallery > .gallery-main { grid-column: 2; grid-row: 1; }
  .gallery > .gallery-thumbs { grid-column: 1; grid-row: 1; }
  .gallery > .gallery-dots { display: none !important; }
}
@media (max-width: 899.98px) {
  .gallery { max-width: 620px; width: 100%; margin-inline: auto; }
  .gallery-thumbs { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
  .gnav { opacity: 1; }
}
/* Tablets in portrait: breadcrumb, photos and details share one centred 620px column, so their left edges line up. */
@media (min-width: 640px) and (max-width: 899.98px) {
  [data-pdp-top] { max-width: calc(620px + 2 * var(--gutter)); }
}
@media (max-width: 639.98px) {
  .gallery { gap: 10px; }
  .gallery-main { margin-inline: calc(var(--gutter) * -1); border-radius: 0; cursor: default; }
  .gallery-thumbs { display: none; }
  .gallery-dots { display: flex; }
  .gnav { display: none; }
  .gzoom { right: 12px; bottom: 12px; }
  .gcount { left: 12px; bottom: 12px; }
}
/* Landscape phones: a full-width 4:5 photo is two screens tall, so the photo sits beside the details,
   sized to the screen height. */
@media (max-width: 899.98px) and (max-height: 500px) and (orientation: landscape) {
  [data-pdp-top] { max-width: var(--container); }
  .pdp-top { grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 36px); align-items: start; }
  .gallery { width: calc((100svh - var(--header-h) - 40px) * 0.8); max-width: none; margin: 0; }
  .gallery-main { margin-inline: 0; border-radius: var(--radius-lg); }
  .gallery-thumbs { display: none; }
  .gallery-dots { display: flex; }
}

/* ---------- info column ---------- */
.pinfo { min-width: 0; }
.pinfo-cat { display: inline-block; padding-block: 8px; margin-block: -8px; }
.pinfo-cat:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
.pinfo-title { margin-top: 8px; font-size: clamp(30px, 3.1vw, 42px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 850; }
.pinfo-meta { display: flex; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 15.5px; color: var(--ink-600); }
.pinfo-meta .dot-sep { margin: 0 9px; }
.pinfo-also { margin-top: 8px; font-size: 14px; color: var(--ink-600); }
.pinfo-also a { color: var(--brand-600); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pinfo-also a:hover { color: var(--brand-700); }

.pinfo-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 18px; }
.price-amt { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.025em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-unit { font-size: 15px; font-weight: 550; color: var(--ink-600); }
.price-note { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-500); }

.tiers { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 14px; }
.tiers th, .tiers td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.tiers thead th { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500); background: var(--bg-soft); }
.tiers td:last-child, .tiers th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.preprinted { margin-top: 16px; padding: 12px 14px; font-size: 14px; }
.preprinted strong { display: block; margin-bottom: 2px; }

/* Size container: the color and size rows below lay out by the width of the details column (a phone, the narrow
   column of a landscape phone or a 900px laptop), not by the viewport. */
.pinfo-block { margin-top: 22px; container-type: inline-size; }
.pinfo-label { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 650; color: var(--ink-800); }
.pinfo-label .val { font-weight: 500; color: var(--ink-600); }
.cswatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cswatch {
  position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
}
.cswatch::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--paint, #ddd); box-shadow: inset 0 0 0 1px rgba(11, 18, 32, 0.16);
}
.cswatch::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; box-shadow: 0 0 0 1.5px transparent; transition: box-shadow 0.15s var(--ease); }
.cswatch:hover::after { box-shadow: 0 0 0 1.5px var(--ink-300); }
.cswatch[aria-pressed="true"]::after { box-shadow: 0 0 0 2px var(--ink-900); }
.cswatch:focus-visible { box-shadow: none; }
.cswatch:focus-visible::after { box-shadow: 0 0 0 2px var(--ink-900), 0 0 0 5px rgba(53, 87, 255, 0.35); }
/* Narrow columns: up to 6 colors in one row (swatches shrink from 44px to fit a 280px screen), more in two even rows
   (--cols is set by product.js), so a swatch never sits alone on a line. */
@container (max-width: 460px) {
  .cswatches { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 44px)); gap: 6px; }
  .cswatch { width: 100%; height: auto; aspect-ratio: 1; }
}

.size-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; list-style: none; }
.size-list li {
  display: inline-grid; place-items: center; min-width: 46px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink-800); font-variant-numeric: tabular-nums;
}
.size-help { margin-top: 10px; font-size: 13.5px; color: var(--ink-500); }
/* Narrow columns (phones, landscape phones, 900-1100px laptops): the chips form one even row (--n columns, set by
   product.js), so a size never sits alone on a second line; chips stop growing at 72px. Wider columns keep the
   wrapping row above. */
@container (max-width: 460px) {
  .size-list {
    display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 6px;
    max-width: calc(var(--n, 6) * 72px + (var(--n, 6) - 1) * 6px);
  }
  .size-list li { min-width: 0; padding: 0 4px; }
}
/* Seven or more sizes in a column under 330px: two even rows (4 + 3, 4 + 4) instead of chips too narrow for "3XL". */
@container (max-width: 329px) {
  .size-list.is-many { grid-template-columns: repeat(var(--cols2, 4), minmax(0, 1fr)); max-width: calc(var(--cols2, 4) * 72px + (var(--cols2, 4) - 1) * 6px); }
}
@container (max-width: 300px) {
  .size-list { gap: 5px; }
}

.min-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-50); color: var(--ink-800); font-size: 14.5px; line-height: 1.5; }
.min-note svg { width: 22px; height: 22px; flex: none; color: var(--brand-600); margin-top: 1px; }
.min-note strong { color: var(--ink-900); }

.pinfo-ctas { display: grid; gap: 10px; margin-top: 20px; }
.pinfo-ctas .btn { --h: 56px; font-size: 16px; border-radius: 10px; }
.pinfo-ctas .btn svg { width: 20px; height: 20px; }
.btn-primary .arrow { transition: transform 0.2s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(3px); }

.assure { display: grid; gap: 11px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); list-style: none; font-size: 14px; line-height: 1.45; color: var(--ink-700); }
.assure li { display: flex; gap: 10px; align-items: flex-start; }
.assure svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--success-600); }

/* ---------- shared section heads ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(20px, 3vw, 32px); }
.sec-head .eyebrow { margin-bottom: 10px; }
.sec-head .link { padding-block: 11px; margin-block: -11px; }
.sec-sub { max-width: 52ch; color: var(--ink-600); font-size: 15.5px; }

/* ---------- placement previews ---------- */
.pz { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.pz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Three across from 640px: two 300px squares per row filled a whole landscape-phone screen. */
@media (min-width: 640px) { .pz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.pz-grid.is-few { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 840px; }
.pz-grid.is-one { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.pz-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; container-type: inline-size;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pz-card:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pz-card:focus-visible { box-shadow: var(--ring); border-radius: var(--radius-lg); }
.pz-media { position: relative; aspect-ratio: var(--pz-ar, 4 / 5); background: var(--photo-bg); }
.pz-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.45s var(--ease); }
.pz-card.is-ready .pz-media canvas { opacity: 1; }
.pz-card:not(.is-ready):not(.is-failed) .pz-media { background: linear-gradient(90deg, #eceef1 25%, #f4f5f7 37%, #eceef1 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.pz-failed { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 16px; text-align: center; color: var(--ink-500); font-size: 13px; font-weight: 600; background: repeating-linear-gradient(135deg, #eef0f3 0 10px, #e9ebef 10px 20px); }
.pz-failed svg { width: 44px; height: 44px; color: var(--ink-400); }
.pz-tag {
  position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-xs);
  font-size: 12px; font-weight: 650; color: var(--ink-700);
}
.pz-tag.is-side { left: auto; right: 12px; }
.pz-body { display: grid; gap: 2px; padding: 14px 16px 16px; }
.pz-body h3 { font-family: var(--font-sans); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.pz-body p { font-size: 13.5px; color: var(--ink-600); }
/* "12 × 14 in" and "Design here" never break inside; "Up to" wraps above the size when the card is narrow. */
.pz-body .nw { white-space: nowrap; }
.pz-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 650; color: var(--brand-600); white-space: nowrap; }
.pz-go svg { width: 16px; height: 16px; flex: none; transition: transform 0.2s var(--ease); }
.pz-card:hover .pz-go svg { transform: translateX(3px); }
.pz-note { margin-top: 18px; font-size: 13.5px; color: var(--ink-500); }
@media (max-width: 639.98px) {
  .pz-grid { gap: 12px; }
  .pz-body { padding: 11px 12px 13px; }
  .pz-body h3 { font-size: 15px; }
  .pz-body p { font-size: 12.5px; }
  .pz-go { font-size: 13px; margin-top: 6px; }
  .pz-tag { top: 8px; left: 8px; height: 22px; padding: 0 8px; font-size: 11px; }
  .pz-tag.is-side { right: 8px; }
}
/* Cards about 118px wide (280px phones): tighter padding, no arrow, so "Design here" stays on one line. */
@container (max-width: 129px) {
  .pz-body { padding: 10px 10px 12px; }
  .pz-go svg { display: none; }
  .pz-tag { height: 21px; padding: 0 7px; font-size: 10.5px; }
}

/* ---------- details ---------- */
.pd { padding: clamp(48px, 7vw, 88px) 0; background: var(--bg-soft); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pd-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 900px) { .pd-grid, .pd-col { gap: 20px; } .pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pd-card { min-width: 0; padding: clamp(20px, 2.6vw, 30px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; container-type: inline-size; }
.pd-card h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 16px; }
.ztable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ztable th, .ztable td { padding: 12px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.ztable thead th { padding-top: 0; border-top: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); }
.ztable tbody th { font-weight: 650; color: var(--ink-900); padding-right: 12px; }
.ztable tbody th span { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-500); line-height: 1.45; }
.ztable td { white-space: nowrap; color: var(--ink-700); font-variant-numeric: tabular-nums; padding-left: 12px; }
.ztable td:last-child { text-align: right; }
.zt-lbl { display: none; }
/* Narrow cards (phones up to ~370px): three columns would squeeze each description to one word per line, so each
   location becomes a stacked row: name, description, then "Up to 4 × 4 in · Front". */
@container (max-width: 300px) {
  .ztable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ztable, .ztable tbody { display: block; }
  .ztable tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
  .ztable tbody tr:first-child { padding-top: 0; border-top: 0; }
  .ztable tbody th, .ztable td { padding: 0; border: 0; }
  .ztable tbody th { flex: 0 0 100%; }
  .ztable td, .ztable td:last-child { padding-top: 6px; text-align: left; font-size: 14px; }
  .ztable td + td::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 8px; vertical-align: middle; border-radius: 50%; background: currentColor; opacity: 0.55; }
  .zt-lbl { display: inline; }
}
.methods { display: grid; gap: 12px; list-style: none; }
.methods li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; align-items: start; }
.methods .mi { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-soft); color: var(--ink-800); }
.methods .mi svg { width: 20px; height: 20px; }
.methods strong { font-size: 15px; font-weight: 650; }
.methods span { font-size: 14px; color: var(--ink-600); line-height: 1.5; }
.specs { display: grid; margin: 0; }
.specs > div { display: grid; grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.specs > div:first-child { border-top: 0; padding-top: 0; }
.specs dt { color: var(--ink-500); font-weight: 500; }
.specs dd { margin: 0; color: var(--ink-900); font-weight: 550; overflow-wrap: anywhere; }
/* Narrow cards: label above value, so values like the material get the full width instead of a 100px column. */
@container (max-width: 270px) {
  .specs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.about p { font-size: 15px; line-height: 1.65; color: var(--ink-700); }
.about ul { margin-top: 14px; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-700); }
.about .muted-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-500); }

/* ---------- steps ---------- */
.steps { padding: clamp(48px, 7vw, 88px) 0 0; }
.steps .sec-head { align-items: baseline; }
.steps-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; list-style: none; counter-reset: s; }
@media (min-width: 640px) { .steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .steps-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps-list li { position: relative; padding: 20px 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.steps-list .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink-900); color: #fff; font-size: 13.5px; font-weight: 700; }
.steps-list h3 { margin-top: 14px; font-family: var(--font-sans); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.steps-list p { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--ink-600); }

/* ---------- related ---------- */
.related { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 640px) and (max-width: 1023.98px) { .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- mobile buy bar ---------- */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(11, 18, 32, 0.08);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  transform: translateY(110%); transition: transform 0.28s var(--ease); visibility: hidden;
}
.buybar.is-on { transform: none; visibility: visible; }
/* Wide bars (tablets): name over "$153.41 / piece · Navy Blue". Phone bars have no room for the name, so they show
   the price over the color instead of cutting the name off. */
.buybar-info { display: grid; min-width: 0; flex: 1; line-height: 1.3; container-type: inline-size; }
.bb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.bb-meta { display: flex; min-width: 0; white-space: nowrap; font-size: 13px; color: var(--ink-600); }
.bb-price { flex: none; }
.bb-color { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bb-color::before { content: "\00a0\00b7\00a0"; }
@container (max-width: 359px) {
  .bb-name { display: none; }
  .bb-meta { display: grid; }
  .bb-price { font-size: 14.5px; font-weight: 700; color: var(--ink-900); }
  .bb-color::before { content: none; }
}
.buybar .btn { flex: none; height: 46px; padding: 0 22px; }
@media (max-width: 359.98px) {
  .buybar { gap: 10px; padding-inline: 12px; }
  .buybar .btn { padding: 0 16px; }
}
@media (min-width: 900px) { .buybar { display: none; } }
@media (max-width: 899.98px) { body.has-buybar .site-footer { padding-bottom: 76px; } }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: #0b0f17; color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(7, 11, 20, 0.92); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-bar { display: flex; align-items: center; justify-content: center; height: 64px; padding: 0 72px; }
.lb-count { font-size: 14px; font-weight: 600; color: #c8cfdc; font-variant-numeric: tabular-nums; }
.lb-close {
  position: fixed; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 46px; height: 46px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; transition: background-color 0.15s;
}
.lb-close:hover { background: rgba(255, 255, 255, 0.22); }
.lb-close svg { width: 24px; height: 24px; }
.lb-close:focus-visible, .lb-nav:focus-visible, .lb-thumb:focus-visible { box-shadow: 0 0 0 3px rgba(160, 180, 255, 0.7); }
.lb-stage { position: relative; min-height: 0; touch-action: pan-y; overflow: hidden; }
.lb-img { position: absolute; left: 80px; top: 0; width: calc(100% - 160px); height: calc(100% - 8px); max-width: none; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.lb-img.is-loading { opacity: 0.35; }
.lb-nav {
  position: fixed; top: 50%; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; transition: background-color 0.15s;
}
.lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lb-nav svg { width: 26px; height: 26px; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-nav[disabled] { opacity: 0.25; pointer-events: none; }
.lb-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.lb-thumb { width: 48px; height: 60px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #1a2233; opacity: 0.55; transition: opacity 0.15s; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 0.85; }
.lb-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px #fff; }
@media (max-width: 639.98px) {
  .lb-bar { height: 58px; justify-content: flex-start; padding: 0 16px; }
  .lb-img { left: 0; width: 100%; height: 100%; }
  .lb-nav { top: auto; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); margin-top: 0; width: 48px; height: 48px; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-thumbs { display: none; }
  .lightbox[open] { grid-template-rows: auto minmax(0, 1fr) 84px; }
}
/* Landscape phones: the thumbnail strip and tall bar left the photo about 120px wide; give the photo the height and
   put the arrows at the sides (count and dots-free bar on top). */
@media (orientation: landscape) and (max-height: 500px) {
  .lb-bar { height: 52px; justify-content: center; padding: 0 72px; }
  .lb-thumbs { display: none; }
  .lightbox[open] { grid-template-rows: auto minmax(0, 1fr) 12px; }
  .lb-img { left: 76px; width: calc(100% - 152px); height: 100%; }
  .lb-nav { top: 50%; bottom: auto; margin-top: -24px; width: 48px; height: 48px; }
}

/* ---------- not found ---------- */
.notfound { display: grid; justify-items: center; gap: 14px; padding-block: clamp(56px, 10vw, 120px); text-align: center; }
.notfound > svg { width: 72px; height: 72px; color: var(--ink-400); }
.notfound h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; }
.notfound p { max-width: 50ch; color: var(--ink-600); }
.nf-search { display: flex; gap: 8px; width: min(460px, 100%); margin-top: 6px; }
.nf-search .input { flex: 1; min-width: 0; }
/* Small phones: field and button each get the full width instead of a squeezed field beside the button. */
@media (max-width: 400px) {
  .nf-search { flex-direction: column; }
  .nf-search .input { flex: none; }
  .notfound > .row { width: 100%; }
  .notfound > .row .btn { flex: 1 1 auto; }
}
.nf-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; max-width: 760px; }
.load-error { padding: 80px 0; text-align: center; }
