/*
 * STRUCTURE AUDIT — PDP families across Appily (do not reuse):
 * - A119 / A120 prior pd-orbit: spec ring around image + aside sticky checkout (loupe split cousin).
 * - Classic banned: left gallery column | right buy box + horizontal tabs row below.
 * - Viewcube / thumb strip + right rail (multiple a110–a118).
 * - Sticky bottom buy dock only + minimal hero (hop PDPs).
 * - Glass case gallery + notch size slider + placard chips (Ninetytwo vitrine).
 * - Full-bleed hero + floating card overlap (several neon/dark stores).
 * - Single-column story only without band (A97 variants).
 * - A120 shop mosaic / catalog spec table — unrelated but noted for project differentiation.
 *
 * THIS FILE — OVERLAP_BAND (pv-*):
 * - Full-width pv-band image stage with view chips on the band (not a side gallery).
 * - pv-buy purchase sheet overlaps band lower edge (negative margin), not a two-column split.
 * - pv-ledger stacked <details> below (not tab strip).
 * - pv-peers horizontal peer strip (not 4-col related grid).
 */

.page-product {
  overflow-x: clip;
}

.pv-pdp {
  padding-bottom: 4.5rem;
}

.pv-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding-block: var(--at-space-3);
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
}

.pv-crumb a {
  text-decoration: none;
  font-weight: 600;
}

.pv-miss,
.pv-pdp--miss {
  padding-block: var(--at-space-7);
}

/* —— Image band —— */
.pv-band {
  position: relative;
  width: 100%;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  background: var(--at-canvas-deep);
}

.pv-band__figure {
  margin: 0;
  position: relative;
  max-height: min(52vh, 28rem);
  overflow: hidden;
}

.pv-band__img {
  width: 100%;
  height: min(52vh, 28rem);
  object-fit: cover;
  display: block;
  transition: object-position 0.35s var(--at-ease), transform 0.35s var(--at-ease);
}

.pv-band__img--missing {
  background: linear-gradient(135deg, var(--at-dew), var(--at-canvas-deep));
  min-height: 14rem;
}

.pv-band__cap {
  position: absolute;
  left: var(--at-gutter);
  bottom: var(--at-space-3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--at-radius-pill);
  background: color-mix(in srgb, var(--at-surface) 88%, transparent);
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 600;
}

.pv-band__tools {
  position: absolute;
  right: var(--at-gutter);
  bottom: var(--at-space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  max-width: min(100% - 2rem, 22rem);
}

.pv-band__views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pv-band__view {
  min-height: 2.75rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 600;
  border-radius: var(--at-radius-pill);
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  cursor: pointer;
}

.pv-band__view.is-active {
  background: var(--at-moss);
  color: var(--at-surface);
  border-color: var(--at-moss);
}

.pv-band__zoom {
  min-height: 2.75rem;
}

/* —— Overlap stage —— */
.pv-stage {
  margin-top: calc(-1 * var(--at-space-7));
  position: relative;
  z-index: 2;
}

.pv-stage__inner {
  display: flex;
  flex-direction: column;
  gap: var(--at-space-6);
  min-width: 0;
}

.pv-buy {
  max-width: 40rem;
  margin-inline: auto;
  width: 100%;
  padding: var(--at-space-5);
}

.pv-buy .ds-title {
  font-size: var(--at-text-xl);
  overflow-wrap: anywhere;
}

.pv-buy__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--at-space-3);
}

.pv-buy__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--at-space-3);
  margin: 0 0 var(--at-space-4);
  padding: var(--at-space-3);
  border-radius: var(--at-radius-md);
  background: var(--at-canvas);
  border: 1px solid var(--at-line);
}

.pv-buy__facts dt {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--at-moss-light);
  margin: 0;
}

.pv-buy__facts dd {
  margin: 0.15rem 0 0;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
  overflow-wrap: anywhere;
}

.pv-buy__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--at-font-ui);
  margin-bottom: var(--at-space-3);
}

.pv-buy__price strong {
  font-size: var(--at-text-xl);
  color: var(--at-terra);
}

.pv-buy__price s {
  color: var(--at-ink-soft);
  font-size: var(--at-text-sm);
}

.pv-buy__lede {
  margin: 0 0 var(--at-space-4);
  color: var(--at-ink-soft);
  font-size: var(--at-text-sm);
}

.pv-buy__error {
  margin: 0 0 var(--at-space-3);
  padding: var(--at-space-3);
  border-radius: var(--at-radius-md);
  background: color-mix(in srgb, var(--at-terra) 12%, var(--at-surface));
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
}

.pv-qty label {
  display: block;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.pv-qty__box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-md);
  overflow: hidden;
  background: var(--at-surface);
}

.pv-qty__box button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0;
  background: var(--at-canvas);
  font-size: 1.1rem;
  cursor: pointer;
}

.pv-qty__box input {
  width: 3.5rem;
  min-height: 2.75rem;
  border: 0;
  text-align: center;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-md);
}

.pv-buy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--at-space-3);
  margin-top: var(--at-space-4);
}

.pv-buy__actions .ds-btn {
  min-height: 2.75rem;
  flex: 1 1 10rem;
}

.pv-buy__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: var(--at-space-4) 0 0;
  padding: 0;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  color: var(--at-ink-soft);
}

.pv-buy__chips li {
  padding: 0.2rem 0.55rem;
  border-radius: var(--at-radius-pill);
  border: 1px solid var(--at-line);
  background: var(--at-canvas);
}

/* —— Detail ledger —— */
.pv-ledger {
  display: flex;
  flex-direction: column;
  gap: var(--at-space-3);
  max-width: 48rem;
  margin-inline: auto;
  width: 100%;
}

.pv-ledger__fold {
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-lg);
  background: var(--at-surface);
  padding: 0 var(--at-space-4);
}

.pv-ledger__fold summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  font-family: var(--at-font-ui);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.pv-ledger__fold summary::-webkit-details-marker {
  display: none;
}

.pv-ledger__body {
  padding-bottom: var(--at-space-4);
  font-size: var(--at-text-sm);
  color: var(--at-ink-soft);
}

.pv-ledger__body ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* —— Related peers —— */
.pv-peers__head .ds-title {
  font-size: var(--at-text-lg);
}

.pv-peers__track {
  display: flex;
  gap: var(--at-space-3);
  overflow-x: auto;
  list-style: none;
  margin: var(--at-space-4) 0 0;
  padding: 0 0 var(--at-space-2);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.pv-peers__track > li {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: min(72vw, 14rem);
}

.pv-peers__card {
  display: flex;
  flex-direction: column;
  gap: var(--at-space-2);
  height: 100%;
  text-decoration: none;
  color: var(--at-ink);
  padding: var(--at-space-3);
}

.pv-peers__card img,
.pv-peers__ph {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--at-radius-md);
}

.pv-peers__ph {
  display: block;
  background: var(--at-dew);
}

.pv-peers__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
}

.pv-peers__copy strong {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.pv-peers__copy em {
  font-style: normal;
  font-weight: 700;
  color: var(--at-terra);
}

/* —— Zoom —— */
.pv-zoom {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(30, 45, 36, 0.92);
  display: grid;
  place-items: center;
  padding: var(--at-space-4);
}

.pv-zoom[hidden] {
  display: none;
}

.pv-zoom img {
  max-width: min(96vw, 40rem);
  max-height: 85vh;
  object-fit: contain;
}

.pv-zoom__close {
  position: absolute;
  top: var(--at-space-4);
  right: var(--at-gutter);
  min-height: 2.75rem;
}

body.pv-zoom-open {
  overflow: hidden;
}

/* —— Mobile dock —— */
.pv-dock {
  display: none;
  position: fixed;
  bottom: 3.25rem;
  left: 0;
  right: 0;
  z-index: 180;
  padding: var(--at-space-3) var(--at-gutter);
  gap: var(--at-space-3);
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--at-surface) 95%, transparent);
  border-top: 1px solid var(--at-line);
  box-shadow: var(--at-shadow-md);
}

.pv-dock__price {
  margin: 0;
  font-family: var(--at-font-ui);
  font-weight: 700;
  color: var(--at-terra);
}

.pv-dock__oos {
  margin: 0;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
}

@media (max-width: 899px) {
  .pv-dock {
    display: flex;
  }
  .pv-pdp {
    padding-bottom: 7rem;
  }
  .pv-buy__actions .ds-btn--primary {
    display: none;
  }
}

@media (min-width: 900px) {
  .pv-band__figure {
    max-height: min(48vh, 32rem);
  }
  .pv-band__img {
    height: min(48vh, 32rem);
  }
  .pv-buy {
    margin-inline: 0;
    margin-left: max(0px, calc((100% - 40rem) / 2));
  }
}

@media (min-width: 1024px) {
  .pv-stage__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas:
      "buy buy"
      "ledger ledger"
      "peers peers";
    align-items: start;
  }
  .pv-buy {
    grid-area: buy;
    max-width: 36rem;
  }
  .pv-ledger {
    grid-area: ledger;
    max-width: none;
  }
  .pv-peers {
    grid-area: peers;
  }
}
