/* PR 3: product page only. Kept separate from the parallel catalog design. */
.pdp { padding-bottom: var(--s6); }
body:has(.pdp--buyable) { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.pdp-back { padding-block: var(--s4); }
.pdp-layout { display: grid; gap: var(--s5); min-width: 0; }
.pdp-layout > * { min-width: 0; }
.c-gallery { position: relative; margin-inline: calc(-1 * var(--gutter)); align-self: start; }
.c-gallery__strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.c-gallery__strip::-webkit-scrollbar { display: none; }
.c-gallery__slide { display: flex; flex-direction: column; color: inherit; text-decoration: none; scroll-margin-top: 80px; flex: 0 0 100%; min-width: 0; aspect-ratio: 1/1; position: relative; scroll-snap-align: start; background: var(--studio); }
.c-gallery__slide:focus-visible { outline-offset: -4px; }
.pdp-lightbox :focus-visible { outline-color: #fff; }
.c-gallery__slide img { width: 100%; height: 100%; min-height: 0; flex: 1; object-fit: contain; }
.c-gallery__caption { position: absolute; left: 12px; bottom: 12px; padding: 3px 8px; border-radius: var(--r-pill); background: rgb(255 255 255 / .85); font-size: 11px; line-height: 1.4; color: var(--muted-fg-tint); pointer-events: none; }
.c-gallery__counter { position: absolute; right: 16px; bottom: 16px; padding: 4px 8px; border-radius: var(--r-pill); background: rgb(0 0 0 / .6); color: white; font-size: 12px; font-weight: 600; pointer-events: none; }
.c-gallery__thumbs { display: none; }
.c-gallery__empty { display: grid; place-items: center; aspect-ratio: 3/2; background: var(--studio); color: var(--muted-fg-tint, #52525b); }
.c-gallery__empty svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.pdp-info h1 { overflow-wrap: anywhere; }
.pdp-info p { margin: 0 0 var(--s3); }
.pdp-price { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-block: var(--s5) var(--s3); }
.pdp-price .price { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.3; }
.pdp-price .price-on-request { font-size: 18px; }
.pdp-price .c-second--price { margin: 0; font-size: 16px; }
.c-buybar > span .c-second--stack { font-size: 12px; }
.pdp .c-badge { display: inline-block; margin: 0; padding: 4px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; line-height: 1.4; }
.pdp .c-badge--sold { background: var(--primary); color: var(--primary-fg); }
.pdp .c-badge--reserved { background: var(--warn-bg); color: var(--warn); }
.pdp .c-badge--reduced { background: var(--bad-bg); color: var(--bad); }
.pdp .c-badge--new { background: var(--info-bg); color: var(--info); }
.pdp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border: 0; border-radius: var(--r-sm); background: var(--primary); color: var(--primary-fg); font-size: 16px; font-weight: 500; text-align: center; cursor: pointer; }
.pdp-btn:disabled { opacity: .5; cursor: default; }
.c-buybar { position: fixed; z-index: 60; inset: auto 0 0; display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); }
.c-buybar > span { flex: 0 1 40%; font-size: 16px; font-weight: 600; }
.c-buybar > form, .c-buybar > .pdp-btn { flex: 1; margin: 0; }
.c-buybar form .pdp-btn { width: 100%; }
.pdp-delivery { display: grid; gap: var(--s2); margin-block: 0 var(--s3); }
.pdp-delivery p { margin: 0; font-size: 14px; }
.pdp .c-fold { border-bottom: 1px solid var(--border); }
.pdp .c-fold summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; list-style: none; font-weight: 500; }
.pdp .c-fold summary::-webkit-details-marker { display: none; }
.pdp .c-fold summary::after { content: '›'; transform: rotate(90deg); }
.pdp .c-fold[open] summary::after { transform: rotate(-90deg); }
.pdp .c-fold .prose { padding-bottom: var(--s4); overflow-wrap: anywhere; }
.pdp .c-fold .prose img { height: auto; }
.pdp .c-kv { margin: 0 0 var(--s4); padding: 0; }
.pdp .c-kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding-block: var(--s3); border-top: 1px solid var(--border); }
.pdp .c-kv dt { color: var(--muted-fg); font-size: 14px; flex: 0 0 auto; }
.pdp .c-kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.pdp-details > .meta { margin-top: var(--s4); }
.pdp-similar { margin-top: var(--s7); scroll-margin-top: 80px; }
.pdp-similar__row { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: var(--s3); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--s3); }
.pdp-similar__row > * { min-width: 0; scroll-snap-align: start; }
.pdp-sheet:target:not([open]) { display: flex; flex-direction: column; position: fixed; inset: auto 0 0; z-index: 100; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .5); }
.pdp-sheet form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; margin: 0; }
.pdp-sheet .c-sheet__body { display: grid; gap: var(--s4); }
.pdp-sheet label { display: flex; flex-direction: column; gap: var(--s2); font-size: 14px; font-weight: 500; }
.pdp-sheet .c-input { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--input-border); border-radius: var(--r-sm); background: var(--bg); }
.pdp-sheet textarea.c-input { resize: vertical; }
.pdp-sheet__footer { flex: none; padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.pdp-sheet__footer .pdp-btn { width: 100%; min-height: 44px; }
.pdp-lightbox { width: 100%; max-width: none; height: 100%; max-height: none; padding: 48px 8px; margin: 0; border: 0; background: #000; color: #fff; }
.pdp-lightbox[open] { display: flex; align-items: center; }
.pdp-lightbox::backdrop { background: #000; }
.pdp-lightbox .c-iconbtn { flex: none; color: #fff; }
.pdp-lightbox__close { position: absolute; top: 8px; right: 8px; }
.pdp-lightbox__image { flex: 1; min-width: 0; height: 100%; display: grid; place-items: center; touch-action: pan-y; }
.pdp-lightbox__image img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); object-fit: contain; }
@media (min-width: 600px) { .pdp-similar__row { grid-auto-columns: 30%; } }
@media (min-width: 1024px) {
  body:has(.pdp--buyable) { padding-bottom: 0; }
  .pdp-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: start; }
  .c-gallery { margin: 0; }
  .c-gallery__strip { border-radius: var(--r-md); }
  .c-gallery__slide { aspect-ratio: 4/3; border-radius: var(--r-md); }
  .c-gallery__empty { border-radius: var(--r-md); }
  .c-gallery__counter { bottom: 96px; }
  .c-gallery__thumbs { display: flex; gap: var(--s2); overflow-x: auto; padding: 4px; margin: 12px -4px 0; }
  .c-gallery__thumbs a { flex: 0 0 64px; border-radius: var(--r-sm); background: var(--studio); overflow: hidden; }
  .c-gallery__thumbs img { width: 64px; height: 64px; object-fit: contain; }
  .c-gallery__thumbs [aria-current="true"]:not(:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }
  .pdp-info { position: sticky; top: 80px; grid-column: 2; grid-row: 1 / span 2; }
  .pdp-details { grid-column: 1; }
  .c-buybar { position: static; border: 0; padding: 0; margin-top: var(--s5); }
  .c-buybar > span { display: none; }
  .pdp-similar__row { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
  .pdp-sheet:target:not([open]) { inset: 0; margin: auto; height: fit-content; }
}


.pdp-delivery p { display: flex; align-items: center; gap: var(--s3); }
.pdp-delivery svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }

.pdp a, .pdp-sheet a { text-decoration: none; }
.pdp .prose a { text-decoration: underline; }

.pdp-back__wide { display: none; }
.pdp-btn:active { opacity: .8; }
@media (min-width: 1024px) {
  .pdp-back { display: flex; align-items: center; gap: var(--s1); white-space: nowrap; }
  .pdp-back > * { flex: none; }
  .pdp-back__wide { display: inline-flex; align-items: center; gap: var(--s1); }
  .pdp-back__wide a { min-height: 44px; display: inline-flex; align-items: center; }
  .pdp-back > .pdp-back__title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .pdp-back__phone { display: none; }
}

@media (max-width: 1023px) {
  html:has(.pdp--buyable) { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .pdp a, .pdp summary { scroll-margin-block: 96px; }
}

.pdp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 16px 0 0; }
.pdp-facts > div { padding: 10px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.pdp-facts dt { color: var(--muted-fg); font-size: 12px; font-weight: 600; }
.pdp-facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.pdp-facts__wide { grid-column: 1 / -1; }
.pdp-sku { margin: var(--s2) 0 0; font-size: 12px; color: var(--muted-fg); }
.pdp-sku__link, .pdp-sku__copy { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; color: inherit; }
.pdp-sku__link { text-decoration: none; }
.pdp-sku__link:hover { text-decoration: underline; }
.pdp-sku__copy { margin-inline-start: var(--s2); padding: 0 var(--s2); border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.pdp-sku__copy[hidden] { display: none; }
.pdp-by { margin: 0 0 var(--s3); font-size: 14px; color: var(--muted-fg-tint); }
.pdp-note { margin: var(--s4) 0; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--secondary); display: grid; gap: var(--s3); }
.pdp-note > * { margin: 0; }
.pdp-info .pdp-note > p { margin: 0; }
.pdp-note__title { font-weight: 600; }
.pdp-note .pdp-btn { width: 100%; box-sizing: border-box; }
.pdp-btn--outline { background: transparent; color: var(--fg); border: 1px solid var(--input-border, var(--border)); }
.pdp-ask { margin-top: var(--s5); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--secondary); }
.pdp-ask h2 { margin: 0 0 var(--s3); font-size: 14px; font-weight: 600; }
.pdp-ask__btns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pdp-ask__btns .pdp-btn { flex: 1 1 140px; min-height: 48px; font-size: 14px; }
.pdp-description { margin-top: var(--s5); }
.pdp-description h2 { font-size: 18px; margin: 0 0 var(--s3); }
.pdp-description .prose { overflow-wrap: anywhere; }
.pdp-description .prose img { height: auto; }
.pdp-similar__all { margin: var(--s3) 0 0; font-size: 14px; }
.pdp-similar__all a { text-decoration: underline; display: inline-flex; align-items: center; min-height: 44px; }

.pdp-back > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.c-buybar .pdp-reserve { flex: none; padding-inline: var(--s3); }
@media (max-width: 1023px) {
  .c-buybar { gap: var(--s2); }
  .c-buybar > span { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
  .c-buybar > form { flex: 0 1 auto; min-width: 0; }
  .c-buybar .pdp-btn { padding-inline: var(--s3); font-size: 14px; }
  .c-buybar .pdp-reserve { font-size: 14px; }
}

.pdp--sold .c-gallery__slide img { object-fit: cover; }
@media (max-width: 1023px) {
  .pdp-back { padding-block: 0; }
}
