/* Product page concept. Uses the tokens and shared pieces from styles.css. */

.pdp-page { background: var(--white); }

.crumbs { padding-block: 22px 0; font-size: 0.875rem; color: var(--taupe); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin-inline: 10px; color: var(--rule); }
.crumbs a { color: var(--bark); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }

.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  padding-block: 24px clamp(64px, 8vw, 112px);
}

/* Gallery */
.pdp-gallery { position: sticky; top: 100px; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
.pdp-stage { order: 2; aspect-ratio: 4 / 5; background: var(--stone); overflow: hidden; }
.pdp-stage img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.pdp-stage.is-contain img { object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.pdp-thumbs { order: 1; display: grid; align-content: start; gap: 10px; }
.pdp-thumbs button {
  padding: 0;
  aspect-ratio: 4 / 5;
  background: var(--stone);
  border: 1px solid transparent;
  overflow: hidden;
  cursor: pointer;
}
.pdp-thumbs button.is-current { border-color: var(--espresso); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

/* Buy box */
.pdp-collection { font-size: 0.9375rem; }
.pdp-collection a { color: var(--bark); text-decoration-color: var(--champagne); text-underline-offset: 5px; }
.pdp-buy h1 { margin-top: 10px; font-size: clamp(2.25rem, 4.2vw, 3.5rem); color: var(--espresso); }
.pdp-price { margin-top: 18px; font: 400 2rem/1 var(--serif); color: var(--espresso); }
.pdp-price-note { font: 400 0.9375rem/1 var(--sans); color: var(--taupe); }
.pdp-summary { margin-top: 16px; max-width: 46ch; font-size: 1.0625rem; color: var(--taupe); }

.pdp-form { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.pdp-lengths { margin: 0; padding: 0; border: 0; }
.pdp-lengths legend { padding: 0; margin-bottom: 12px; font-size: 0.9375rem; font-weight: 600; color: var(--espresso); }
.pdp-lengths legend span { font-weight: 400; color: var(--bark); }
.pdp-length-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pdp-length { position: relative; display: block; }
.pdp-length input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pdp-length span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 1rem;
  color: var(--espresso);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pdp-length:hover span { border-color: var(--bark); }
.pdp-length input:checked + span { background: var(--espresso); border-color: var(--espresso); color: var(--bone); }
.pdp-length input:focus-visible + span { outline: 2px solid var(--champagne); outline-offset: 3px; }

.pdp-qty { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 24px; }
.pdp-qty > span { font-size: 0.9375rem; font-weight: 600; color: var(--espresso); }
.pdp-stepper { display: inline-grid; grid-template-columns: 48px 44px 48px; align-items: center; border: 1px solid var(--rule); border-radius: 2px; }
.pdp-stepper button { height: 48px; background: none; border: 0; font: 400 1.25rem/1 var(--sans); color: var(--espresso); cursor: pointer; }
.pdp-stepper button:hover { background: var(--stone); }
.pdp-stepper button:disabled { color: var(--rule); cursor: default; background: none; }
.pdp-stepper output { text-align: center; font-weight: 500; }
.pdp-total { margin-left: auto; font-size: 0.9375rem; color: var(--taupe); }
.pdp-total span { margin-left: 8px; font: 400 1.5rem/1 var(--serif); color: var(--espresso); }

.pdp-add { width: 100%; margin-top: 22px; min-height: 58px; font-size: 1rem; }
.pdp-concept { margin-top: 10px; font-size: 0.8125rem; color: var(--taupe); }

.pdp-assure { margin-top: 26px; border-top: 1px solid var(--rule); }
.pdp-assure li { position: relative; padding: 13px 0 13px 24px; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
.pdp-assure li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--champagne);
  border-bottom: 1.5px solid var(--champagne);
  transform: rotate(-45deg);
}
.pdp-text { margin-top: 16px; font-size: 0.9375rem; color: var(--taupe); }
.pdp-text a { color: var(--espresso); font-weight: 500; text-decoration-color: var(--champagne); text-underline-offset: 4px; }

.pdp-install { margin-top: 28px; padding: clamp(22px, 2.6vw, 30px); background: var(--stone); }
.pdp-install h2 { font-size: 1.625rem; color: var(--espresso); }
.pdp-install p { margin: 10px 0 14px; color: var(--bark); }

/* Details */
.pdp-details { background: var(--bone); }
.pdp-details-grid { display: grid; grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.pdp-details h2 { color: var(--espresso); }
.pdp-details .faq-list details p + p { margin-top: -8px; }
.pdp-features { padding: 0 44px 22px 0; columns: 2; column-gap: 40px; color: var(--taupe); }
.pdp-features li { padding: 5px 0; break-inside: avoid; }

/* Pairings */
.pdp-pair { background: var(--white); }
.pdp-pair-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 980px; }
/* The model photo in the pairings sits high in its tile so the face is kept. */
.pdp-pair .product-shot-photo img { object-position: 50% 20%; }

/* Reviews */
.pdp-reviews h2 { font-size: clamp(2rem, 4vw, 3rem); color: var(--espresso); }
.pdp-review-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); margin-top: clamp(28px, 4vw, 48px); }
.pdp-review-list li { padding-top: 24px; border-top: 1px solid var(--bark); }
.pdp-review-list p { font: 400 1.375rem/1.35 var(--serif); color: var(--espresso); }
.pdp-review-list p::before { content: "\201C"; }
.pdp-review-list p::after { content: "\201D"; }

/* Phone buy bar */
.buybar { display: none; }

@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; padding-top: 16px; }
  .pdp-gallery { position: static; grid-template-columns: 1fr; }
  .pdp-stage { order: 1; aspect-ratio: 1 / 1; }
  .pdp-thumbs { order: 2; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pdp-details-grid, .pdp-review-list { grid-template-columns: 1fr; }
  .pdp-pair-grid { grid-template-columns: 1fr 1fr; }
  .pdp-features { columns: 1; padding-right: 0; }

  .buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--noir);
    border-top: 1px solid var(--rule-light);
    color: var(--bone);
    visibility: hidden;
    transform: translateY(100%);
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .buybar.is-visible { visibility: visible; transform: none; transition: transform 0.25s ease; }
  .buybar p { display: grid; font-size: 0.8125rem; color: rgba(248, 248, 246, 0.72); }
  .buybar p span + span { font: 400 1.375rem/1.1 var(--serif); color: var(--champagne-pale); }
  .buybar .btn { min-height: 48px; padding: 10px 12px; }
}

@media (max-width: 420px) {
  .pdp-length-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Disabled stepper buttons and length borders stay visible against white. */
.pdp-length span { border-color: rgba(70, 62, 54, 0.45); }
.pdp-stepper { border-color: rgba(70, 62, 54, 0.45); }
.pdp-stepper button:disabled { color: rgba(70, 62, 54, 0.45); }
.pdp-page .crumbs a { display: inline-block; padding-block: 6px; }
