/* ==========================================================================
   Product page. Builds on css/base.css: tokens, .crumbs, .opt, .check, .swatch,
   .qty, .price, .stars, .acc, .spec, .note, .meter, .modal, .pgrid and .pcard are
   used as they are and only adjusted here.

   Contents
     01 Page frame          05 Engraving            09 Reviews
     02 Gallery             06 Add to cart, delivery 10 Lightbox, review form
     03 Dimension drawing   07 Details              11 Sticky bar (phones)
     04 Buy box             08 The sizes together   12 Not found
   ========================================================================== */

/* 01 Page frame ----------------------------------------------------------- */
.pdp { min-height: 70vh; padding-block: 0.875rem clamp(3rem, 2rem + 4vw, 5.5rem); }
.pdp-crumbs { min-height: 1.25rem; margin-bottom: 1.125rem; }
.pdp-top { display: grid; gap: 2rem; }

.pdp-label {
  font: 600 0.6875rem/1.2 var(--font-ui);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}

@media (min-width: 980px) {
  .pdp { padding-top: 1.25rem; }
  .pdp-crumbs { margin-bottom: 1.5rem; }
  .pdp-top {
    grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
    gap: clamp(2.5rem, 1rem + 3.6vw, 5rem);
    align-items: start;
  }
  .pdp-gallery { position: sticky; top: calc(var(--header-h) + 1.25rem); }
}

/* 02 Gallery --------------------------------------------------------------
   Phones: a scroll-snap carousel, edge to edge, with the thumbnails in a row beneath.
   From 700px: thumbnails in a column beside the stage. From 980px the slides are stacked
   and cross-fade, and the stage never grows taller than the window. */
.pdp-gallery {
  display: grid; gap: 0.625rem 0.75rem;
  grid-template-areas: "stage" "caption" "thumbs";
}

.pdp-stage {
  grid-area: stage; position: relative;
  width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--tile);
}
.pdp-track {
  display: flex; height: 100%; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.pdp-track::-webkit-scrollbar { display: none; }
.pdp-slide {
  flex: 0 0 100%; min-width: 0;
  display: grid; place-items: center; overflow: hidden;
  scroll-snap-align: center; scroll-snap-stop: always;
}
.pdp-slide__frame { position: relative; width: 100%; aspect-ratio: 4 / 5; container-type: inline-size; }
.pdp-slide__open { display: block; width: 100%; height: 100%; }
.pdp-slide__open:focus-visible { outline-offset: -6px; }
.pdp-slide__zoom {
  position: relative; display: block; width: 100%; height: 100%;
  transform-origin: var(--zx, 50%) var(--zy, 50%);
  transition: transform 0.3s var(--ease-out);
}
.pdp-slide__zoom img { width: 100%; height: 100%; object-fit: contain; }
.pdp-slide__open.is-zoomed .pdp-slide__zoom { transform: scale(2); }
@media (hover: hover) and (pointer: fine) {
  .pdp-slide__open { cursor: zoom-in; }
}

/* No photographs yet: leave the tile, with the same quiet mark the product cards use. */
.pdp-gallery.is-empty .pdp-thumbs, .pdp-gallery.is-empty .pdp-caption { display: none; }
.pdp-gallery.is-empty .pdp-stage::after {
  content: ""; position: absolute; inset: 30% 36%;
  background: var(--tile-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40'%3E%3Ccircle cx='16' cy='3.5' r='2.3'/%3E%3Cpath d='M9 11c0-3.5 3.5-4.5 7-4.5s7 1 7 4.5z'/%3E%3Cpath d='M8.5 14.5c-4 2.5-5 7.5-3 12.5 1.5 4 4 6.5 5 9.5h11c1-3 3.5-5.5 5-9.5 2-5 1-10-3-12.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40'%3E%3Ccircle cx='16' cy='3.5' r='2.3'/%3E%3Cpath d='M9 11c0-3.5 3.5-4.5 7-4.5s7 1 7 4.5z'/%3E%3Cpath d='M8.5 14.5c-4 2.5-5 7.5-3 12.5 1.5 4 4 6.5 5 9.5h11c1-3 3.5-5.5 5-9.5 2-5 1-10-3-12.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pdp-caption {
  grid-area: caption;
  display: flex; align-items: baseline; gap: 0.75rem;
  font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3);
}
.pdp-caption__fig { flex: none; font: italic 400 0.9375rem/1.2 var(--font-display); color: var(--brass-ink); }
.pdp-caption__fig:empty { display: none; }
.pdp-caption__text { flex: 1; min-width: 0; }
.pdp-caption__count { flex: none; letter-spacing: 0.04em; color: var(--ink-2); }
.pdp-caption--plain { margin: 0; }

.pdp-thumbs {
  grid-area: thumbs;
  display: flex; gap: 0.5rem; margin: 0.25rem 0 0; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.pdp-thumbs::-webkit-scrollbar { display: none; }
.pdp-thumbs li { flex: none; width: 3.5rem; }
.pdp-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  background: var(--tile);
  transition: background-color 0.15s;
}
.pdp-thumb::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid transparent; transition: border-color 0.15s;
}
.pdp-thumb:hover { background: var(--tile-2); }
.pdp-thumb:hover::after { border-color: var(--line-2); }
.pdp-thumb[aria-current="true"]::after { border-color: var(--ink); }
.pdp-thumb img, .pdp-thumb svg { width: 100%; height: 100%; object-fit: contain; }
.pdp-thumb svg { padding: 12%; }

@media (max-width: 699px) {
  .pdp-stage { margin-inline: calc(var(--gutter) * -1); }
}
@media (min-width: 700px) {
  .pdp-gallery {
    grid-template-columns: 4rem minmax(0, 1fr);
    grid-template-areas: "thumbs stage" ". caption";
    max-width: 42rem;
  }
  .pdp-thumbs { flex-direction: column; margin: 0; overflow: visible; }
  .pdp-thumbs li { width: auto; }
}
@media (min-width: 980px) {
  .pdp-gallery {
    --stage-max: max(24rem, 100dvh - var(--header-h) - 10.25rem);
    max-width: none;
    grid-template-columns: 4.25rem minmax(0, 1fr);
  }
  .pdp-stage { max-height: var(--stage-max); }
  .pdp-track { display: grid; overflow: hidden; }
  /* Only the incoming slide fades; the outgoing one goes at once, so nothing lingers on a resize. */
  .pdp-slide { grid-area: 1 / 1; height: 100%; opacity: 0; visibility: hidden; }
  .pdp-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }
  .pdp-slide__frame { width: min(100%, var(--stage-max) * 0.8); }
}

/* Engraving preview, laid over the front photograph inside MEDIA[slug].engraveZone.
   Type is sized in cqw so it keeps its place as the stage grows, shrinks or zooms. */
.pdp-engraved {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: calc(var(--fs, 3) * 1cqw); line-height: 1.25; text-align: center; white-space: nowrap;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.pdp-engraved[data-font="script"] { letter-spacing: 0; }
.pdp-engraved[data-font="block"] { font-weight: 500; letter-spacing: 0.04em; }
.pdp-engraved[data-font="roman"] { font-weight: 600; }
/* Dark lettering cut into light metal: a faint light lower edge. */
.pdp-engraved[data-ink="dark"] {
  color: color-mix(in srgb, var(--ink) 82%, transparent);
  text-shadow: 0 0.06em 0 color-mix(in srgb, var(--white) 50%, transparent);
}
/* Pale brass lettering cut through a dark coating: a faint dark upper edge. */
.pdp-engraved[data-ink="light"] {
  color: color-mix(in srgb, var(--brass-pale) 88%, var(--white));
  text-shadow: 0 -0.05em 0 color-mix(in srgb, var(--ink) 60%, transparent);
}

/* 03 Dimension drawing ---------------------------------------------------- */
.pdp-dims { display: block; width: 100%; height: 100%; }
.pdp-dims__outline { fill: color-mix(in srgb, var(--white) 55%, transparent); stroke: var(--ink); stroke-width: 1.25; stroke-linejoin: round; }
.pdp-dims__guide path { fill: none; stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pdp-dims__guide .pdp-dims__axis { stroke: var(--brass); stroke-dasharray: 9 3 2 3; }
.pdp-dims__rule path { fill: none; stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pdp-dims text { font-family: var(--font-ui); font-variant-numeric: tabular-nums lining-nums; fill: var(--ink); }
.pdp-dims__key { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; fill: var(--brass-ink) !important; }
.pdp-dims__val { font-size: 16px; font-weight: 500; }
.pdp-dims__sub { font-size: 11.5px; fill: var(--ink-3) !important; }
/* The sheet is 400 units wide, so on a wide stage the lettering is set smaller to stay near 12px. */
@container (min-width: 480px) {
  .pdp-dims__key { font-size: 6.5px; }
  .pdp-dims__val { font-size: 11px; }
  .pdp-dims__sub { font-size: 8px; }
}

/* 04 Buy box -------------------------------------------------------------- */
.pdp-buy { display: grid; gap: 1.5rem; align-content: start; min-width: 0; }

.pdp-head__no { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.875rem; }
.pdp-head__material { display: inline-flex; align-items: center; gap: 0.875rem; color: var(--ink-3); }
.pdp-head__material::before { content: ""; width: 1.75rem; height: 1px; background: var(--line-2); }
.pdp-head__name { margin-top: 0.875rem; }
.pdp-head__meaning { margin-top: 0.625rem; font-size: 1.0625rem; font-style: italic; line-height: 1.35; letter-spacing: 0; color: var(--ink-3); }
.pdp-head__rating { margin-top: 0.875rem; gap: 0.5rem; }
.pdp-head__rating .num { color: var(--ink); font-weight: 500; }

.pdp-price { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; min-height: 2rem; }
.pdp-summary { margin-top: 0.75rem; max-width: 46ch; font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); }

.pdp-form { display: grid; gap: 1.375rem; }
/* A fieldset draws its legend over its own top border, so on fieldsets the rule belongs to the legend. */
.pdp-group, fieldset.pdp-group > .pdp-legend { padding-top: 1.25rem; border-top: 1px solid var(--line); }
fieldset.pdp-group { padding-top: 0; border-top: 0; }
.pdp-legend {
  display: flex; align-items: baseline; gap: 0.75rem;
  width: 100%; margin-bottom: 0.875rem;
}
.pdp-legend__value { font-size: 0.875rem; color: var(--ink-2); }
.pdp-group__foot { margin-top: 0.75rem; }
.pdp-quiet { max-width: 52ch; font-size: 0.875rem; line-height: 1.5; color: var(--ink-3); }

/* Finish: large swatches, each inside a 44px target. */
.pdp-finishes { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: -0.375rem; }
.pdp-finish { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.pdp-finish input:focus-visible + .swatch { outline: 2px solid var(--verdigris); outline-offset: 7px; }

/* Size: one row per size, set like lines in a price list. */
.pdp-sizes { display: grid; gap: 0.5rem; }
.pdp-size { grid-template-columns: minmax(0, 1fr) auto; gap: 0.125rem 1rem; align-items: baseline; padding: 0.75rem 1rem; }
.pdp-size__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; }
.pdp-size__price { text-align: right; font-size: 0.9375rem; }
.pdp-size__note { grid-column: 1 / -1; }

/* Checkbox rows with a price at the right edge (engraving, add-ons). */
.pdp-check { align-items: flex-start; gap: 0.75rem; min-height: 44px; padding-block: 0.375rem; }
.pdp-check__text { flex: 1; min-width: 0; display: grid; gap: 0.125rem; }
.pdp-check__title { font-weight: 500; }
.pdp-check__price { flex: none; font-size: 0.9375rem; color: var(--ink-2); white-space: nowrap; }
.pdp-addons { display: grid; }
.pdp-addons li + li { border-top: 1px solid var(--line); }
.pdp-addons .pdp-check { padding-block: 0.625rem; }
.pdp-addons li:first-child .pdp-check { padding-top: 0; }

/* 05 Engraving ------------------------------------------------------------ */
.pdp-engrave__panel {
  container-type: inline-size;
  display: grid; gap: 1.125rem;
  margin-top: 0.875rem; padding: 1.125rem 0 0 1.875rem;
  border-top: 1px solid var(--line);
  animation: fade 0.3s var(--ease) both;
}
.pdp-engrave__legend { margin-bottom: 0.5rem; }
.pdp-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@container (min-width: 27rem) {
  .pdp-fonts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.pdp-font { place-items: center; min-height: 52px; padding: 0.375rem 0.5rem; }
.pdp-font__name { font-size: 1.125rem; line-height: 1.1; }
.pdp-font__name[data-font="roman"] { font-size: 1.25rem; font-weight: 600; }
.pdp-font__name[data-font="script"] { font-size: 1.5rem; }
.pdp-font__name[data-font="block"] { font-size: 1rem; font-weight: 500; letter-spacing: 0.04em; }

.pdp-lines { display: grid; gap: 0.75rem; }
.pdp-line { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.375rem 1rem; }
.pdp-line .input { grid-column: 1 / -1; }
.pdp-line .input[aria-invalid="true"] { border-color: var(--clay); }

.pdp-error { font-size: 0.875rem; line-height: 1.45; color: var(--clay); }
.pdp-error:empty { display: none; }
.pdp-engrave__where { font-size: 0.8125rem; }

@media (max-width: 479px) {
  .pdp-engrave__panel { padding-left: 0; }
}

/* 06 Add to cart, delivery ------------------------------------------------ */
.pdp-cta { display: grid; gap: 0.625rem; }
.pdp-cta__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.625rem; }
.pdp-qty.qty { grid-template-columns: 44px 44px 44px; height: 56px; }
.pdp-cta__add { justify-content: space-between; gap: 1rem; padding-inline: 1.25rem; }
.pdp-cta__total {
  padding-left: 1rem; border-left: 1px solid color-mix(in srgb, var(--white) 38%, transparent);
  font-size: 0.9375rem; letter-spacing: 0.02em;
}
.pdp-cta__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem;
  min-height: 44px;
}
.pdp-save {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  font-size: 0.875rem; color: var(--ink-2);
}
.pdp-save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: fill 0.2s, stroke 0.2s; }
.pdp-save span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pdp-save:hover { color: var(--ink); }
.pdp-save[aria-pressed="true"] svg { fill: var(--clay); stroke: var(--clay); }
.pdp-sku { font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-3); }

.pdp-after { display: grid; gap: 0.75rem; }
.pdp-delivery { border-top: 1px solid var(--line-2); }
.pdp-delivery > div {
  display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 0 1rem;
  padding-block: 0.6875rem; border-bottom: 1px solid var(--line);
}
.pdp-delivery dt { font: 600 0.6875rem/1.9 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pdp-delivery dd { font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 399px) {
  .pdp-delivery > div { grid-template-columns: 1fr; }
}

/* 07 Details: a narrow heading column beside the content (also used by reviews) --- */
.pdp-details { border-top: 1px solid var(--line); }
.pdp-split { display: grid; gap: 2rem; }
.pdp-split__head { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.pdp-split__note { max-width: 36ch; font-size: 0.875rem; line-height: 1.55; color: var(--ink-3); }
.pdp-glance { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 2rem; width: 100%; margin: 0.5rem 0 0; padding-top: 1.125rem; border-top: 1px solid var(--line-2); }
.pdp-glance dt { order: 2; margin-top: 0.375rem; font: 600 0.6875rem/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pdp-glance dd { font: 400 1.625rem/1 var(--font-display); letter-spacing: -0.02em; }
.pdp-glance dd small { font: 400 0.8125rem/1 var(--font-ui); letter-spacing: 0; color: var(--ink-3); }
.pdp-glance > div { display: flex; flex-direction: column; }
@media (min-width: 980px) {
  .pdp-split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2.5rem, 1rem + 3.6vw, 5rem); align-items: start; }
  .pdp-split__head { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.pdp-acc .acc__item > summary { padding-block: 1.25rem; font-size: 1.3125rem; }
.pdp-acc .acc__body { padding-bottom: 1.75rem; }
.pdp-features { display: grid; gap: 0; margin-top: 1.25rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pdp-features li { position: relative; padding: 0.5625rem 0 0.5625rem 1.5rem; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.pdp-features li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 0.75rem; height: 1px; background: var(--brass); }
.pdp-acc .spec th { width: 34%; }
.pdp-acc .spec tr:last-child th, .pdp-acc .spec tr:last-child td { border-bottom: 0; }
.pdp-plain-list { margin: 0; padding: 0; list-style: none; }
.pdp-plain-list li + li { margin-top: 0.25rem; }
.pdp-plain-list--ruled li { padding-block: 0.625rem; border-bottom: 1px solid var(--line); }
.pdp-plain-list--ruled li:first-child { border-top: 1px solid var(--line); }
.pdp-plain-list--ruled li + li { margin-top: 0; }
.pdp-plain-list--ruled strong { font-weight: 600; color: var(--ink); }
@media (max-width: 479px) {
  .pdp-acc .spec th, .pdp-acc .spec td { display: block; width: auto; }
  .pdp-acc .spec th { padding-bottom: 0; border-bottom: 0; }
  .pdp-acc .spec td { padding-top: 0.125rem; }
  .pdp-acc .spec tr:last-child td { border-bottom: 0; }
}

/* 08 The sizes together --------------------------------------------------- */
.pdp-family { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.pdp-family__grid { display: grid; gap: 2rem; }
.pdp-family__figure { aspect-ratio: 4 / 5; background: var(--tile); }
.pdp-family__figure img { width: 100%; height: 100%; object-fit: contain; }
.pdp-family.is-plain .pdp-family__figure { display: none; }
.pdp-family__text { display: grid; gap: 1rem; align-content: center; justify-items: start; }
.pdp-family__lede { max-width: 50ch; color: var(--ink-2); }
.pdp-family__table { margin-top: 0.5rem; font-size: 0.9375rem; border-top: 1px solid var(--line-2); }
.pdp-family__table th, .pdp-family__table td { padding: 0.875rem 0.75rem 0.875rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.pdp-family__table thead th { padding-block: 0.625rem; font: 600 0.6875rem/1.4 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pdp-family__table tbody th { font: 400 1.1875rem/1.2 var(--font-display); letter-spacing: -0.012em; }
.pdp-family__table tbody tr { cursor: pointer; transition: background-color 0.15s; }
.pdp-family__table tbody tr:hover { background: color-mix(in srgb, var(--white) 60%, transparent); }
.pdp-family__table tbody tr.is-selected { cursor: default; background: none; box-shadow: inset 2px 0 0 var(--verdigris); }
.pdp-family__table tbody tr > :first-child { padding-left: 0.875rem; }
.pdp-family__table thead th:first-child { padding-left: 0.875rem; }
.pdp-family__pick { width: 1%; padding-right: 0.5rem !important; text-align: right !important; white-space: nowrap; }
.pdp-family__pick .text-btn { min-height: 44px; padding-inline: 0.25rem; }
.pdp-family__pick .text-btn[aria-pressed="true"] { color: var(--verdigris); font-weight: 600; text-decoration: none; }
@media (max-width: 479px) {
  .pdp-family__table th:nth-child(3), .pdp-family__table td:nth-child(3) { display: none; }
}
@media (min-width: 860px) {
  .pdp-family__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 1rem + 3.6vw, 5rem); align-items: center; }
  .pdp-family.is-plain .pdp-family__grid { grid-template-columns: minmax(0, 44rem); }
}

/* 09 Reviews -------------------------------------------------------------- */
.pdp-score { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.pdp-score__figure { font-size: clamp(3rem, 2.4rem + 2vw, 4rem); line-height: 0.9; letter-spacing: -0.03em; }
.pdp-score .stars { display: block; width: max-content; margin-bottom: 0.375rem; }
.pdp-dist { display: grid; gap: 0.375rem; width: min(100%, 17rem); margin: 0; padding: 0; list-style: none; }
.pdp-dist li { display: grid; grid-template-columns: 0.75rem minmax(0, 1fr) 1rem; align-items: center; gap: 0.75rem; font-size: 0.8125rem; color: var(--ink-3); }
.pdp-dist li > :last-child { text-align: right; }
.pdp-dist .meter > i { background: var(--brass); }

.pdp-reviews__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  min-height: 3.5rem; padding-bottom: 0.875rem; border-bottom: 1px solid var(--line-2);
}
.pdp-reviews__sort { display: flex; align-items: center; gap: 0.75rem; }
.pdp-reviews__sort .select { width: auto; min-height: 44px; padding-block: 0.375rem; font-size: 0.9375rem; }
.pdp-reviews__list { margin: 0; padding: 0; list-style: none; }
.pdp-review { display: grid; gap: 0.75rem 2rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.pdp-review__who { display: flex; flex-wrap: wrap; gap: 0 0.5rem; font-size: 0.8125rem; line-height: 1.6; color: var(--ink-3); }
.pdp-review__who p + p::before { content: "\00b7"; margin-right: 0.5rem; color: var(--line-2); }
.pdp-review__name { font-weight: 600; color: var(--ink); }
.pdp-review__body { display: grid; gap: 0.5rem; justify-items: start; max-width: 62ch; color: var(--ink-2); }
.pdp-review__title { font-size: 1.3125rem; line-height: 1.2; color: var(--ink); }
.pdp-review__flag { padding-left: 0.75rem; border-left: 2px solid var(--brass); font-size: 0.8125rem; line-height: 1.4; color: var(--brass-ink); }
.pdp-review--none { color: var(--ink-3); }
@media (min-width: 700px) {
  .pdp-review { grid-template-columns: 11rem minmax(0, 1fr); }
  .pdp-review--none { grid-template-columns: 1fr; }
  .pdp-review__who { display: grid; gap: 0; align-content: start; }
  .pdp-review__who p + p::before { content: none; }
}

.pdp-more { border-top: 1px solid var(--line); }
.pdp-more + .pdp-more { border-top: 0; padding-top: 0; }

/* 10 Lightbox, review form ------------------------------------------------ */
.pdp-lightbox-dialog { --lb-h: calc(min(100dvh - 2rem, 860px) - 4.75rem); }
.pdp-lightbox-dialog .modal__head { padding-block: 0.625rem; }
.pdp-lightbox {
  position: relative; flex: 1; min-height: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
  padding: 0 0.5rem; background: var(--tile);
}
.pdp-lightbox__figure { display: grid; place-items: center; min-width: 0; }
.pdp-lightbox__figure .pdp-slide__frame { width: min(100%, var(--lb-h) * 0.8); }
.pdp-lightbox__nav { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.pdp-lightbox__nav:hover { background: var(--paper); }
@media (max-width: 699px) {
  .pdp-lightbox { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .pdp-lightbox__nav { position: absolute; top: 50%; z-index: 1; translate: 0 -50%; }
  .pdp-lightbox__nav:first-child { left: 0.375rem; }
  .pdp-lightbox__nav:last-child { right: 0.375rem; }
}

.pdp-review-dialog { --modal-w: 600px; }
.pdp-review-form { display: grid; gap: 1.125rem; }
.pdp-rate { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.375rem; }
.pdp-rate__box { justify-items: center; gap: 0; padding: 0.5rem 0.25rem; text-align: center; }
.pdp-rate__figure { font-size: 1.5rem; line-height: 1.1; }
.pdp-rate__box .opt__meta { font-size: 0.6875rem; line-height: 1.3; }
.pdp-review-form .field.is-invalid .opt__box { border-color: var(--clay); }

/* 11 Sticky bar (phones) --------------------------------------------------
   Shown once the main Add to cart button has scrolled away; hidden at the footer
   and whenever a dialog is open. */
.pdp-bar { display: none; }
@media (max-width: 759px) {
  .pdp-bar {
    position: fixed; inset: auto 0 0 0; z-index: 30;
    display: block;
    padding-block: 0.625rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
    background: var(--paper); border-top: 1px solid var(--line-2);
    translate: 0 100%; visibility: hidden;
    transition: translate 0.3s var(--ease-out), visibility 0s 0.3s;
  }
  .pdp-bar.is-shown { translate: 0 0; visibility: visible; transition-delay: 0s; }
  html:has(dialog[open]) .pdp-bar { translate: 0 100%; visibility: hidden; }
  .pdp-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .pdp-bar__text { min-width: 0; }
  .pdp-bar__name { font-size: 1.0625rem; line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pdp-bar__meta { font-size: 0.75rem; line-height: 1.4; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pdp-bar .btn { flex: none; min-height: 44px; padding-inline: 1.125rem; }
  /* Keep toasts clear of the bar. */
  .page-product:has(.pdp-bar.is-shown) .toast-region { bottom: 5.25rem; }
}

/* 12 Not found ------------------------------------------------------------ */
.pdp-lost { display: grid; gap: 1.25rem; justify-items: start; max-width: 40rem; padding-block: clamp(1rem, 4vw, 3rem); }

/* Review fixes for phones */
@media (max-width: 480px) {
  .pdp-cta__add { padding-inline: 0.875rem; gap: 0.625rem; white-space: nowrap; }
  .pdp-cta__total { padding-left: 0.625rem; }
  .pdp-review__who p:last-child { flex-basis: 100%; }
  .pdp-review__who p:last-child::before { content: none; }
}
@media (max-width: 379px) {
  .pdp-rate { gap: 0.25rem; }
  .pdp-rate__box { padding-inline: 0; }
  .pdp-rate__box .opt__meta { font-size: 0.625rem; letter-spacing: -0.01em; }
}
html:has(.pdp-bar.is-shown) { scroll-padding-bottom: 5.5rem; }
