/* ==========================================================================
   Product page (product.html) — loaded after base.css
   Gallery · buy box · accordions · related · reviews · sticky add-to-bag · size guide
   ========================================================================== */

.pdp { padding-top: calc(var(--nav-h) + 1.5rem); padding-bottom: 5rem; }
.pdp__top { margin-bottom: 1.5rem; }
.pdp__grid { display: grid; gap: 2rem; }
@media (min-width: 992px) { .pdp__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; align-items: start; } }

/* Gallery */
.gallery { display: grid; gap: 0.75rem; }
.gallery__thumbs { display: none; }
.gallery__main { position: relative; }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { position: relative; flex: 0 0 100%; aspect-ratio: 4 / 5; overflow: hidden; scroll-snap-align: start; background: var(--studio); }
.gallery__slide img, .gallery__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery__slide--zoom-a img, .gallery__thumb--zoom-a img { transform: scale(1.9); transform-origin: 50% 62%; }
.gallery__slide--zoom-b img, .gallery__thumb--zoom-b img { transform: scale(1.9); transform-origin: 50% 30%; }
.gallery__badge { position: absolute; left: 0.75rem; top: 0.75rem; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 0.75rem; display: flex; justify-content: center; gap: 0.4rem; }
.gallery__dot { width: 1.5rem; height: 3px; border-radius: 999px; background: rgb(14 13 11 / 0.25); transition: background-color 0.3s; }
.gallery__dot.is-on { background: var(--soot); }
.gallery__thumb { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--studio); opacity: 0.55; transition: opacity 0.2s, box-shadow 0.2s; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--soot), 0 0 0 3.5px var(--ember); }
@media (min-width: 992px) {
  .gallery { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: start; position: sticky; top: calc(var(--nav-h) + 1.5rem); }
  .gallery__thumbs { display: grid; gap: 0.6rem; }
  /* desktop: stacked big images instead of a carousel */
  .gallery__track { flex-direction: column; gap: 0.75rem; overflow: visible; scroll-snap-type: none; }
  .gallery__dots { display: none; }
  .gallery__slide { cursor: zoom-in; }
  .gallery__slide.is-zoomed { cursor: zoom-out; }
  .gallery__slide.is-zoomed img { transform: scale(2); transition: transform 0.4s var(--ease-out-expo); }
}

/* Buy box */
.buy { display: grid; align-content: start; gap: 1.75rem; }
@media (min-width: 992px) { .buy { position: sticky; top: calc(var(--nav-h) + 1.5rem); } }
.buy__intro { display: grid; gap: 1rem; }
.buy__title { font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: 0.9; }
.buy__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.buy__price { font-size: 1.9rem; }
.buy__rating { display: flex; align-items: center; gap: 0.6rem; color: var(--ash); }
.buy__rating:hover { color: var(--bone); }
.stars { display: inline-flex; gap: 0.15rem; color: var(--ember); }
.stars .icon, .review__stars .icon { width: 0.95rem; height: 0.95rem; }
.star--off { color: var(--iron-2); }
.buy__group { display: grid; gap: 0.75rem; }
.buy__legend { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.buy__legend .text-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ash); }
.buy__add { display: flex; gap: 0.75rem; }
.buy__add .btn { flex: 1; }
.buy__hint { min-height: 1.5em; }
.buy__perks { display: grid; gap: 0.85rem; padding-block: 1.25rem; border-block: 1px solid var(--line-dark); }
.buy__perks li { display: flex; align-items: flex-start; gap: 0.85rem; font-size: 0.9rem; color: var(--ash); }
.buy__perks .icon { color: var(--ember); margin-top: 0.1rem; }
.buy__perks strong { color: var(--bone); font-weight: 600; }
.buy__look { display: grid; gap: 0.5rem; }
.buy__look .pick { background: var(--iron); }

/* Accordions */
.accordions { border-bottom: 1px solid var(--line-dark); }
.acc { border-top: 1px solid var(--line-dark); }
.acc summary { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; }
.acc summary .icon { transition: transform 0.3s; }
.acc[open] summary .icon { transform: rotate(45deg); }
.acc__body { display: grid; gap: 0.75rem; padding-bottom: 1.25rem; }
.acc__list { display: grid; gap: 0.5rem; font-size: 0.875rem; color: var(--ash); }
.acc__list li::before { content: "→ "; color: var(--ember); }

/* Reviews */
.reviews__inner { display: grid; gap: 3rem; padding-block: 5rem 6rem; }
.reviews__summary { display: grid; align-content: start; justify-items: start; gap: 0.75rem; }
.reviews__score { font-size: 6rem; line-height: 0.85; }
.reviews__summary .stars .icon { width: 1.2rem; height: 1.2rem; }
.reviews__bars { display: grid; gap: 0.4rem; width: 100%; max-width: 20rem; margin-block: 0.5rem 1rem; }
.reviews__bars li { display: grid; grid-template-columns: 1rem 1fr 2rem; align-items: center; gap: 0.75rem; }
.bar { height: 4px; border-radius: 999px; background: var(--line-dark); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ember); }
.reviews__list { display: grid; gap: 1rem; }
.review { display: grid; gap: 0.75rem; padding: 1.5rem; border: 1px solid var(--line-dark); border-radius: var(--radius); background: var(--iron); }
.review__stars { display: flex; gap: 0.15rem; color: var(--ember); }
.review__title { font-size: 1.6rem; line-height: 1; }
@media (min-width: 992px) { .reviews__inner { grid-template-columns: 22rem 1fr; gap: 5rem; } }

/* Mobile sticky add-to-bag */
.sticky-atc { position: fixed; left: 0.75rem; right: 0.75rem; bottom: max(0.75rem, env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.5rem 0.5rem 0.5rem; border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgb(27 26 23 / 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transform: translateY(150%); transition: transform 0.5s var(--ease-out-expo); }
.sticky-atc.is-on { transform: none; }
.sticky-atc__img { position: relative; width: 2.75rem; flex-shrink: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--studio); }
.sticky-atc__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sticky-atc__text { flex: 1; min-width: 0; display: grid; }
.sticky-atc__text .display { font-size: 1.1rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 992px) { .sticky-atc { display: none; } }

/* Size guide table */
.size-table { width: 100%; margin-block: 1rem; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.85rem; }
.size-table th, .size-table td { padding: 0.7rem 0.5rem; text-align: left; border-bottom: 1px solid var(--line-dark); }
.size-table thead th { color: var(--steel); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.size-table tbody th { color: var(--ember); }

/* Small phones: let the columns shrink and the add button wrap instead of overflowing */
.pdp__grid > * { min-width: 0; }
.buy__add .btn { white-space: normal; text-align: center; padding-inline: 1rem; }

/* Fit note next to sizes (e.g. "Size up for a better fit") */
.buy__note { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.85rem; border: 1px solid rgb(226 85 31 / 0.4); border-radius: var(--radius); background: rgb(226 85 31 / 0.08); color: var(--ember-hot); font-size: 0.9rem; font-weight: 500; }

/* Single image (placeholder products): no thumbs column, no dots */
.gallery--single .gallery__thumbs, .gallery--single .gallery__dots { display: none; }
@media (min-width: 992px) { .gallery--single { grid-template-columns: minmax(0, 1fr); } }

/* Client tagline above the description */
.buy__tagline { font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.25; color: var(--bone); }
