/* ═══════════════════════════════════════════════════════════════
   brasa — product.css
   Jacquemus-inspired product page: 55/45 split, vertical scroll gallery.
   ═══════════════════════════════════════════════════════════════ */

.product-page .shop {
  --shop-line: #EBEBEB;
  padding-top: 0;
}

/* Product page overrides buy.css layout constraints */
.product-page .shop__aside {
  padding: var(--page-content-pad-top) var(--page-gutter) clamp(96px, 14vw, 112px);
  border-left: 0;
}

@media (min-width: 1024px) {
  .product-page .shop__aside {
    min-height: auto;
    align-items: stretch;
  }

  .product-page .shop__info {
    padding: var(--page-content-pad-top) var(--page-gutter) var(--page-content-pad-bottom);
    display: flex;
    align-items: flex-start;
    border-left: 1px solid var(--shop-line);
  }
}

/* ── Layout: 50% scroll gallery + 50% sticky info ── */
.product-page .shop__layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

@media (min-width: 1024px) {
  .product-page .shop__layout {
    grid-template-columns: 11fr 9fr;
    align-items: start;
  }
}

/* ── Gallery shell: scroll area + persistent pagination overlay ── */
.product-page .shop__gallery-shell {
  position: relative;
  min-width: 0;
}

.product-page .shop__media {
  position: relative;
  min-width: 0;
}

.product-page .shop__scroll-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.product-page .shop__scroll-slide {
  width: 100%;
  scroll-margin-top: 0;
  background: var(--color-white);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  line-height: 0;
  flex-shrink: 0;
}

.product-page .shop__scroll-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .product-page .shop__scroll-frame {
    cursor: none;
  }

  body.shop-cursor-active .product-page .shop__scroll-frame {
    cursor: none;
  }

  .product-page .shop__scroll-frame.is-zoomed {
    cursor: none;
  }
}

.product-page .shop__scroll-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.product-page .shop__scroll-frame.is-zoomed {
  overflow: visible;
  z-index: 6;
  position: relative;
}

.product-page .shop__scroll-slide:has(.shop__scroll-frame.is-zoomed) {
  overflow: visible;
  z-index: 5;
  position: relative;
}

.product-page .shop__scroll-frame.is-zoomed img {
  transition: transform 0.08s linear;
}

.product-page .shop__media.is-zoom-active {
  overflow: hidden !important;
}

@media (max-width: 1023px) {
  .product-page .shop__scroll-frame {
    cursor: zoom-in;
  }
}

/* Jacquemus-style custom zoom cursor */
.shop__zoom-cursor {
  position: fixed;
  z-index: 1100;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.shop__zoom-cursor.is-visible {
  opacity: 1;
  visibility: visible;
}

.shop__zoom-cursor-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-white);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.shop__zoom-cursor-icon {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: var(--shop-ink);
  transform: translateY(-1px);
}

/* Pagination dots — mobile only */
@media (max-width: 1023px) {
  .product-page .shop__scroll-dots {
    position: absolute;
    top: auto;
    bottom: 18px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    pointer-events: none;
  }
}

@media (max-width: 1023px) {
  .product-page .shop__media {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .product-page .shop__media.is-loop-jumping {
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
  }

  .product-page .shop__media::-webkit-scrollbar {
    display: none;
  }

  .product-page .shop__scroll-track {
    flex-direction: row;
    height: 100%;
  }

  .product-page .shop__scroll-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    scroll-margin-top: 0;
    aspect-ratio: 4 / 5;
  }

  .product-page .shop__scroll-frame {
    height: 100%;
  }

  .product-page .shop__scroll-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* ── Mobile: centered product info ── */
  .product-page .shop__aside {
    padding: 0;
  }

  .product-page .shop__gallery-shell {
    margin-bottom: clamp(16px, 3vw, 24px);
  }

  .product-page .shop__aside.shop__info {
    text-align: center;
    padding: var(--page-content-pad-top) var(--page-gutter) clamp(96px, 14vw, 112px);
  }

  .product-page .shop__aside-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
    margin-inline: 0;
    width: 100%;
  }

  .product-page .shop__title {
    width: 100%;
    text-align: center;
  }

  .product-page .shop__desc,
  .product-page .shop__details,
  .product-page .shop__buy {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .product-page .shop__desc {
    text-align: justify;
    hyphens: auto;
  }

  .product-page .shop__color {
    justify-content: center;
  }

  .product-page .shop__details {
    text-align: justify;
    hyphens: auto;
  }
}

.product-page .shop__scroll-dot {
  width: 4px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #C8C8C8;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.35s ease, transform 0.35s ease;
}

.product-page .shop__scroll-dot[aria-current="true"] {
  background: var(--shop-ink);
  transform: scale(1.35);
}

/* ── Info column — sticky sidebar ── */
.product-page .shop__info {
  background: var(--color-white);
  border-left: 0;
}

.product-page .shop__aside-inner {
  max-width: none;
  width: 100%;
}

@media (min-width: 1024px) {
  .product-page .shop__aside-inner {
    max-width: none;
    width: 100%;
  }
}

.product-page .shop__title {
  font-family: var(--font-body);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 clamp(16px, 3vw, 20px);
  color: var(--shop-ink);
}

.product-page .shop__desc {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.7;
  color: var(--shop-ink);
  margin: 0 0 24px;
  width: 100%;
  text-align: justify;
  hyphens: auto;
}

.product-page .shop__colors {
  list-style: none;
  margin: 0 0 clamp(20px, 3vh, 28px);
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 6vw, 32px);
}

.product-page .shop__details {
  width: 100%;
  margin: 0 0 clamp(28px, 4vh, 36px);
}

.product-page .shop__details-section + .shop__details-section {
  margin-top: clamp(20px, 3vh, 28px);
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid var(--shop-line);
}

.product-page .shop__details-heading {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shop-mute);
  margin: 0 0 12px;
}

.product-page .shop__details-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-page .shop__details-section p,
.product-page .shop__details-list li {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: var(--shop-ink);
  margin: 0;
}

.product-page .shop__details-section p + p {
  margin-top: 10px;
}

.product-page .shop__details-list li {
  position: relative;
  padding-left: 14px;
}

.product-page .shop__details-list li + li {
  margin-top: 8px;
}

.product-page .shop__details-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--shop-mute);
}

.product-page .shop__color {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-page .shop__color-swatch {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--swatch);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-page .shop__color-code {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--shop-mute);
  font-variant-numeric: tabular-nums;
}

.product-page .shop__cert-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(27, 27, 27, 0.35);
}

.product-page .shop__price {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--shop-ink);
  margin: 0 0 clamp(32px, 5vh, 44px);
}

.product-page .shop__buy {
  margin-bottom: 24px;
}

.product-page .shop__preorder {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}

.product-page .shop__cta.btn-ink,
.product-page .shop-bar__cta.btn-ink {
  color: var(--color-white);
  background: #1B1B1B;
  border-color: #1B1B1B;
}

.product-page .shop__cta.btn-ink:focus-visible,
.product-page .shop-bar__cta.btn-ink:focus-visible {
  outline: 2px solid var(--color-royal-blue);
  outline-offset: 3px;
}

.product-page .shop__cta {
  width: 100%;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  min-height: auto;
}

.product-page .shop__cta-label {
  text-align: left;
}

.product-page .shop__cta-price {
  text-align: right;
  letter-spacing: 0.08em;
}

.product-page .shop__cta::before {
  display: none;
}

/* Sold-out state — applied when stock is 0 (e.g. via [disabled] or .is-sold-out) */
.product-page .shop__cta:disabled,
.product-page .shop__cta.is-sold-out,
.product-page .shop-bar__cta:disabled,
.product-page .shop-bar__cta.is-sold-out {
  color: #9A9A9A;
  background: transparent;
  border-color: #D8D4CC;
  cursor: not-allowed;
  pointer-events: none;
}

.product-page .shop__cta.is-sold-out .shop__cta-price,
.product-page .shop-bar__cta.is-sold-out .shop-bar__cta-price {
  display: none;
}

/* Mobile buy bar — match desktop add to cart */
.product-page .shop-bar {
  padding: 12px var(--page-gutter) max(12px, env(safe-area-inset-bottom));
  gap: 0;
}

.product-page .shop-bar__cta {
  flex: 1;
  width: 100%;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  min-height: auto;
  border-radius: 0;
}

.product-page .shop-bar__cta-label {
  text-align: left;
}

.product-page .shop-bar__cta-price {
  text-align: right;
  letter-spacing: 0.08em;
}

/* ── Desktop overrides (must come after base gallery rules) ── */
@media (min-width: 1024px) {
  .product-page .shop__gallery-shell {
    position: sticky;
    top: var(--header-height);
    align-self: start;
    height: calc(100dvh - var(--header-height));
    margin: 0;
    padding: 0;
    line-height: 0;
    z-index: 2;
    background: var(--color-white);
  }

  .product-page .shop__media {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0;
    margin: 0;
    scroll-padding: 0;
  }

  .product-page .shop__media::-webkit-scrollbar {
    display: none;
  }

  .product-page .shop__scroll-slide {
    scroll-margin: 0;
  }

  .product-page .shop__scroll-dots {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
  }

  .product-page .shop__colors {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
  }
}
