/* ==========================================================
   VIBRA Ă¢â‚¬â€ Jacket Detail Page
   Extends the homepage's design tokens with gold accents,
   editorial serif headlines, and cinematic micro-motion.
   ========================================================== */

:root {
  --gold: #d4af37;
  --gold-light: #e9c76a;
  --gold-soft: #a88824;
  --gold-glow: rgba(212, 175, 55, 0.35);
}

/* ==========================================================
   GRAIN OVERLAY Ă¢â‚¬â€ premium "film" texture
   ========================================================== */
body.has-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ==========================================================
   GALLERY STAGE
   Crossfade + Ken Burns slow zoom on the active slide.
   ========================================================== */
.gallery-stage {
  isolation: isolate;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.gallery-slide img {
  transform: scale(1.04);
  transition: transform 6s ease-out;
  will-change: transform;
}
.gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.gallery-slide.is-active img {
  animation: kenBurns 7s ease-out forwards;
}
@keyframes kenBurns {
  0% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.14) translate3d(-1.5%, -1%, 0);
  }
}

/* Subtle leather sheen Ă¢â‚¬â€ diagonal soft highlight pass */
.leather-sheen {
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 240, 200, 0.06) 45%,
    rgba(255, 240, 200, 0.0) 60%
  );
  mix-blend-mode: screen;
  animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen {
  0%,
  100% {
    transform: translateX(-8%);
    opacity: 0.0;
  }
  50% {
    transform: translateX(8%);
    opacity: 0.7;
  }
}

/* Pause hover state */
#gallery.is-paused .gallery-slide.is-active img {
  animation-play-state: paused;
}

/* ==========================================================
   THUMBNAILS
   ========================================================== */
.thumb {
  width: 56px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.4s ease;
  position: relative;
}
@media (min-width: 640px) {
  .thumb {
    width: 64px;
    height: 84px;
  }
}
.thumb img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.thumb:hover {
  border-color: rgba(212, 175, 55, 0.55);
}
.thumb:hover img {
  transform: scale(1.06);
}
.thumb.is-active {
  border-color: var(--gold);
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.45),
    0 0 22px var(--gold-glow);
}
.thumb.is-active::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--gold);
}

.thumb.is-hidden,
.modal-dot.is-hidden {
  display: none;
}

/* ==========================================================
   FEATURE LIST ICON
   ========================================================== */
.feature-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.04);
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}
li:hover .feature-icon {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

/* ==========================================================
   COLOR PILL
   ========================================================== */
.color-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.18em;
  background: transparent;
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}
.color-pill .swatch {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
}
.color-pill:hover {
  border-color: rgba(255, 255, 255, 0.5);
}
.color-pill.is-active {
  border-color: var(--bone);
  background: var(--bone);
  color: var(--ink);
  box-shadow: none;
}

/* ==========================================================
   SIZE SQUARE
   ========================================================== */
.size-square {
  height: 48px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}
.size-square:hover {
  border-color: rgba(255, 255, 255, 0.55);
}
.size-square.is-active {
  border-color: var(--bone);
  background: var(--bone);
  color: var(--ink);
  box-shadow: none;
}

/* ==========================================================
   SLEEK CTA BUTTON
   ========================================================== */
.cta-gold {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px;
  background: #a8a8a8;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: none;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
  width: 100%;
  max-width: 420px;
}
.cta-gold::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.cta-gold:hover {
  background: #ffffff;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 34px -18px rgba(255, 255, 255, 0.8);
}
.cta-gold:hover::before {
  transform: translateX(120%);
}
.cta-gold:hover .cta-arrow {
  transform: translateX(6px);
}
.cta-gold:active {
  transform: translateY(0) scale(0.99);
}
.cta-arrow {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-gold--compact {
  padding: 12px 20px;
  font-size: 11px;
  width: auto;
}

/* ==========================================================
   CART / PAYMENT DRAWER
   ========================================================== */
.cart-trigger {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  text-transform: inherit;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.cart-drawer.is-open {
  pointer-events: auto;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0);
  cursor: pointer;
  transition: background 0.28s ease;
}

.cart-drawer.is-open .cart-overlay {
  background: rgba(0, 0, 0, 0.68);
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 460px);
  height: 100%;
  overflow-y: auto;
  background: #030303;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--bone);
  padding: 30px;
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -28px 0 70px rgba(0, 0, 0, 0.48);
}

.cart-drawer.is-open .cart-panel {
  transform: translateX(0);
}

.cart-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 24px;
}

.cart-panel__header h2 {
  margin-top: 8px;
  font-family: Oswald, Inter, sans-serif;
  font-size: clamp(36px, 8vw, 58px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

.cart-kicker {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.cart-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.cart-close:hover {
  background: var(--bone);
  color: #000;
}

.cart-empty {
  padding: 34px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

.cart-content {
  padding-top: 28px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 18px;
}

.cart-product {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.35;
}

.cart-meta {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cart-line__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.cart-qty {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cart-qty button {
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font-size: 18px;
}

.cart-qty button:hover {
  background: var(--bone);
  color: #000;
}

.cart-qty span {
  text-align: center;
  font-size: 12px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.cart-total strong {
  font-size: 16px;
}

.payment-box {
  margin-top: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 22px;
}

.payment-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.payment-option,
.checkout-button {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.payment-option:hover,
.payment-option.is-active,
.checkout-button {
  background: var(--bone);
  border-color: var(--bone);
  color: #000;
}

.checkout-button {
  width: 100%;
  margin-top: 18px;
}

.checkout-button:hover {
  background: #cfcfcf;
}

.checkout-note {
  min-height: 20px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .cart-panel {
    padding: 22px;
  }

  .cart-line {
    grid-template-columns: 1fr;
  }

  .cart-line__side {
    align-items: flex-start;
  }
}

/* ==========================================================
   MODAL
   ========================================================== */
#modal.is-open {
  display: flex;
}
.modal-backdrop {
  animation: modalFadeIn 0.4s ease forwards;
}
.modal-img {
  opacity: 0;
  transform: scale(0.96);
  animation: modalImgIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modalImgIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}
.modal-dot.is-active {
  background: var(--gold);
  transform: scale(1.3);
}
.modal-dot:hover {
  background: var(--gold-light);
}

/* ==========================================================
   PAUSE PILL
   ========================================================== */
#pause-pill.is-on {
  display: inline-flex;
}

/* ==========================================================
   SHARED Ă¢â‚¬â€ gold link/active state in nav
   ========================================================== */
header nav a.text-gold {
  color: var(--gold);
}

/* ==========================================================
   PARALLAX Ă¢â‚¬â€ gallery moves slightly slower than content scroll
   The translate is set via JS data attribute --parallax-y.
   ========================================================== */
@media (min-width: 1024px) {
  #gallery {
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    transition: transform 0.05s linear;
  }
}

/* ==========================================================
   REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .gallery-slide.is-active img,
  .leather-sheen,
  .modal-backdrop,
  .modal-img {
    animation: none !important;
  }
  #gallery {
    transform: none !important;
  }
}

/* ==========================================================
   BOLD BLACK / WHITE OVERRIDES
   Kill the old gold editorial accents across the jacket page.
   ========================================================== */
:root {
  --gold: #ffffff;
  --gold-light: #ffffff;
  --gold-soft: #b8b8b8;
  --gold-glow: rgba(255, 255, 255, 0.18);
}

.text-gold,
.text-gold-light,
header nav a.text-gold {
  color: var(--bone) !important;
}

.bg-gold {
  background-color: var(--bone) !important;
}

.border-gold {
  border-color: var(--bone) !important;
}

.hover\:text-gold:hover,
.hover\:border-gold:hover {
  color: var(--bone) !important;
  border-color: var(--bone) !important;
}

.thumb:hover,
.thumb.is-active {
  border-color: var(--bone);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.thumb.is-active::after,
.modal-dot.is-active,
.modal-dot:hover,
#pause-pill span {
  background: var(--bone);
}

.feature-icon,
li:hover .feature-icon {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--bone);
  background: rgba(255, 255, 255, 0.04);
}

.cta-gold {
  background: #ffffff;
  color: #000000;
}

.cta-gold:hover {
  background: #cfcfcf;
}

/* ==========================================================
   PRODUCT GALLERY FRAMING FIX
   The product images are portrait photos. Do not zoom/crop them:
   keep the full jacket in frame inside the left gallery stage.
   ========================================================== */
#gallery .gallery-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  animation: none !important;
}

#gallery .gallery-slide.is-active img {
  transform: none !important;
  animation: none !important;
}
