/* ==========================================================================
   Product detail page
   ========================================================================== */
.pdp__main { padding-top: var(--nav-h); display: flex; flex-wrap: wrap; align-items: flex-start; }

/* ---------------------------------------------------------------- Gallery */
.pdp-gallery { position: relative; flex: 1 1 0; min-width: 0; }
.pdp-gallery__track { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pdp-gallery__item { position: relative; display: block; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 3 / 4; }
.pdp-gallery__item:nth-child(3n+1) { grid-column: span 2; aspect-ratio: 4 / 5; }
.pdp-gallery__item .media__label { text-align: left; }
.pdp-gallery__item img { transition: transform 1.2s var(--ease); }
.pdp-gallery__item:hover img { transform: scale(1.02); }
.pdp-gallery__count { position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; align-items: center; gap: 14px; pointer-events: none; font-size: 11px; font-variant-numeric: tabular-nums; }
.pdp-gallery__rail { flex: 1; height: 1px; background: rgba(18, 19, 21, .2); overflow: hidden; }
.pdp-gallery__rail span { display: block; height: 1px; background: var(--ink); transition: transform .45s var(--ease); }

/* ---------------------------------------------------------------- Details panel */
.pdp-panel { flex: 0 0 min(440px, 40%); min-width: 0; position: sticky; top: var(--nav-h); max-height: calc(100vh - var(--nav-h)); overflow-y: auto; scrollbar-width: none; padding: clamp(24px, 3vw, 48px) clamp(20px, 3vw, 48px) 48px; display: flex; flex-direction: column; gap: 28px; }
.pdp-panel::-webkit-scrollbar { display: none; }
.pdp-panel__head { display: flex; flex-direction: column; gap: 14px; }
.pdp-crumbs { display: flex; justify-content: space-between; gap: 12px; }
.pdp-crumbs > span { display: flex; gap: 8px; }
.pdp-crumbs a { color: var(--muted); }
.pdp-crumbs a:hover { color: var(--ink); }
.pdp-price { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 18px; }
.pdp-price .muted { font-size: 13px; }
.pdp-desc { font-size: 15px; line-height: 1.6; color: var(--body); text-wrap: pretty; }

.pdp-form { display: flex; flex-direction: column; gap: 28px; }
.pdp-opts { position: relative; border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pdp-opts__legend { padding: 0; font-size: 13px; float: left; width: 100%; padding-right: 90px; }
.pdp-opts__sg { position: absolute; top: 0; right: 0; font-size: 13px; }
.pdp-opts__list { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-opt { position: relative; }
.pdp-opt span { display: flex; align-items: center; justify-content: center; min-width: 56px; height: 46px; padding: 0 16px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--ink); cursor: pointer; transform: scale(.98); transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease-spring); }
.pdp-opt.is-out span { color: var(--disabled); text-decoration: line-through; }
.pdp-opt input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: scale(1); }
.pdp-opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.pdp-stock { font-size: 12px; color: var(--muted); min-height: 16px; }

.pdp-actions { display: flex; gap: 8px; }
.pdp-add { flex: 1; height: 58px; }
.pdp-save { width: 72px; height: 58px; border: 1px solid var(--line-strong); background: none; font-size: 13px; color: var(--ink); cursor: pointer; text-underline-offset: 3px; transition: border-color .3s; }
.pdp-save.is-saved { border-color: var(--ink); text-decoration: underline; }
.pdp-assure { margin-top: -14px; font-size: 12px; color: var(--muted); }

/* Accordions */
.pdp-acc { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.pdp-acc__item { border-top: 1px solid var(--line); }
.pdp-acc__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; padding: 18px 0; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.pdp-acc__icon { font-size: 18px; font-weight: 300; transition: transform .5s var(--ease); }
.pdp-acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.pdp-acc__panel > div { overflow: hidden; min-height: 0; }
.pdp-acc__body { padding: 0 0 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--body); opacity: 0; transition: opacity .4s; }
.pdp-acc__item.is-open .pdp-acc__panel { grid-template-rows: 1fr; }
.pdp-acc__item.is-open .pdp-acc__body { opacity: 1; }
.pdp-acc__item.is-open .pdp-acc__icon { transform: rotate(45deg); }
.pdp-spec { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pdp-spec div { display: flex; justify-content: space-between; gap: 24px; }
.pdp-spec dt { color: var(--muted); flex: none; }
.pdp-spec dd { margin: 0; text-align: right; }

/* Wear it with */
.pdp-wear { display: flex; flex-direction: column; gap: 4px; }
.pdp-wear .eyebrow { margin-bottom: 10px; }
.pdp-wear__row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 0; }
.pdp-wear__row .media { aspect-ratio: 4 / 5; }
.pdp-wear__name { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.pdp-wear__name .muted { font-size: 12px; }
.pdp-wear__add { height: 34px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: 12px; cursor: pointer; transition: background-color .3s, color .3s; }
.pdp-wear__add:hover, .pdp-wear__add.is-added { background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------- Styled-with strip */
.pdp-strip { position: relative; margin-top: clamp(64px, 8vw, 120px); background: var(--dark); color: var(--on-dark); }
.pdp-strip[hidden] { display: none; }
.pdp-strip__media { aspect-ratio: 21 / 9; }
.pdp-strip__label { position: absolute; right: var(--gutter); top: 24px; max-width: 280px; text-align: right; font-family: var(--mono); font-size: 10px; line-height: 1.6; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-faint); }
.pdp-strip__text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(24px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.pdp-strip__title { font-family: var(--serif); font-size: clamp(44px, 7vw, 120px); line-height: .9; letter-spacing: -.025em; }
.pdp-strip__link { font-size: 14px; color: var(--on-dark); }

/* ---------------------------------------------------------------- You might also like */
.pdp-similar { padding-top: clamp(80px, 10vw, 150px); padding-bottom: clamp(80px, 10vw, 150px); }
.pdp-similar__grid > :nth-child(n+5) { display: none; }

/* ---------------------------------------------------------------- Mobile sticky bar */
.pdp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; background: var(--bg); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .55s var(--ease); }
.pdp-bar.is-on { transform: none; }
.pdp-bar__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; }
.pdp-bar__name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-bar__btn { flex: none; height: 48px; padding: 0 22px; border: 0; background: var(--ink); color: var(--bg); font-size: 13px; cursor: pointer; }

/* ---------------------------------------------------------------- Size guide drawer */
.pdp-sg-scrim { z-index: 92; }
.is-sg-open .pdp-sg-scrim { opacity: 1; pointer-events: auto; }
.pdp-sg { position: fixed; top: 0; right: 0; bottom: 0; z-index: 93; width: min(520px, 100vw); background: var(--bg); color: var(--ink); overflow-y: auto; padding: 0 28px 40px; transform: translateX(100%); visibility: hidden; transition: transform .7s var(--ease-io), visibility 0s linear .7s; }
.is-sg-open .pdp-sg { transform: none; visibility: visible; transition: transform .7s var(--ease-io), visibility 0s; }
.pdp-sg__bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; height: 64px; background: var(--bg); }
.pdp-sg__title { margin: 16px 0 12px; font-family: var(--serif); font-size: 56px; line-height: .92; letter-spacing: -.02em; }
.pdp-sg__intro { margin-bottom: 28px; font-size: 15px; line-height: 1.6; color: var(--body); }
.pdp-sg__table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.pdp-sg__table th { padding: 12px 12px 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 400; color: var(--muted); text-align: left; width: 33.33%; }
.pdp-sg__table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.pdp-sg__table tr.is-hit td { background: rgba(18, 19, 21, .05); }
.pdp-sg__tip { margin-top: 28px; font-size: 13px; line-height: 1.6; color: var(--body); }
.pdp-sg__more { display: inline-block; margin-top: 8px; font-size: 13px; }

/* ---------------------------------------------------------------- Lightbox */
.pdp-lb { position: fixed; inset: 0; z-index: 95; background: var(--ink); color: var(--on-dark); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s linear .45s; }
.pdp-lb.is-open { opacity: 1; visibility: visible; transition: opacity .45s, visibility 0s; }
.pdp-lb__frame { position: relative; height: min(86vh, 150vw); aspect-ratio: 4 / 5; max-width: 92vw; transform: scale(.97); transition: transform .6s var(--ease); }
.pdp-lb.is-open .pdp-lb__frame { transform: none; }
.pdp-lb__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pdp-lb__frame img[hidden] { display: none; }
.pdp-lb__close { position: absolute; top: 18px; right: var(--gutter); color: var(--on-dark); z-index: 2; }
.pdp-lb__count { position: absolute; top: 28px; left: var(--gutter); font-size: 11px; color: var(--on-dark-muted); }
.pdp-lb__nav { position: absolute; top: 64px; bottom: 0; width: 30%; background: none; border: 0; color: var(--on-dark); font-size: 22px; }
.pdp-lb__nav--prev { left: 0; cursor: w-resize; text-align: left; padding-left: var(--gutter); }
.pdp-lb__nav--next { right: 0; cursor: e-resize; text-align: right; padding-right: var(--gutter); }

/* ---------------------------------------------------------------- Mobile */
@media (max-width: 759px) {
  .pdp-gallery { flex: 1 1 100%; }
  .pdp-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; }
  .pdp-gallery__item, .pdp-gallery__item:nth-child(3n+1) { flex: none; width: 100%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
  .pdp-gallery__item .media__label { bottom: 44px; }
  .pdp-gallery__count { display: flex !important; }
  .pdp-bar { display: flex !important; }
  .pdp-panel { flex: 1 1 100%; position: static; max-height: none; }
  .pdp-strip__media { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  .pdp-acc__panel, .pdp-acc__icon, .pdp-sg, .pdp-lb, .pdp-lb__frame, .pdp-bar, .pdp-opt span { transition: none; }
}
