:root {
  --bg: #f6f0e8;
  --panel: rgba(255, 251, 247, 0.9);
  --card: #fffdfa;
  --ink: #1d1714;
  --muted: #69584f;
  --line: rgba(29, 23, 20, 0.1);
  --accent: #8d735f;
  --accent-deep: #2c221d;
  --shadow: 0 20px 60px rgba(51, 35, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(247, 227, 204, 0.54), transparent 24%),
    radial-gradient(circle at top right, rgba(233, 239, 226, 0.45), transparent 18%),
    linear-gradient(180deg, #fbf7f2 0%, #efe5da 100%);
}

body.product-preview-loading .gallery-panel,
body.product-preview-loading .product-info,
body.product-preview-loading .complete-look,
body.product-preview-loading .mobile-buybar {
  opacity: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.product-shell {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 120px;
}

.product-topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(29, 23, 20, 0.06);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.96);
  box-shadow: 0 10px 30px rgba(51, 35, 23, 0.08);
}

.back-link,
.topbar-link {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.product-brand {
  justify-self: center;
}

.product-brand img {
  width: 104px;
}

.product-page {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 22px;
  margin-top: 18px;
}

.gallery-panel,
.product-info,
.complete-look {
  border: 1px solid rgba(29, 23, 20, 0.06);
  border-radius: 30px;
  background: #fffdf9;
  box-shadow: 0 14px 40px rgba(51, 35, 23, 0.08);
  transition: opacity 0.18s ease;
}

.gallery-panel {
  padding: 16px;
}

.hero-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
}

.hero-image-wrap img {
  width: 100%;
  aspect-ratio: 4 / 5.15;
  object-fit: cover;
  background: var(--card);
}

.product-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: #fff8f2;
  background: rgba(28, 23, 20, 0.78);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.thumb {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  cursor: pointer;
}

.thumb.is-active {
  outline: 2px solid var(--accent-deep);
  outline-offset: 0;
}

.thumb img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
}

.product-info {
  padding: 24px 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.product-meta h1,
.section-head h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  line-height: 0.94;
}

.product-meta h1 {
  font-size: clamp(2.3rem, 4vw, 3.7rem);
  text-transform: uppercase;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.stars {
  letter-spacing: 0.08em;
  color: var(--ink);
  font-size: 0.9rem;
}

.submeta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.submeta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 700;
}

.price-card,
.cta-card,
.info-panel,
.complete-card {
  background: #fffefa;
}

.price-card {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.price-line strong {
  font-size: 1.18rem;
}

.sku,
.shipping-note,
.fit-note,
.micro-copy,
.value-note,
.option-head span,
.option-head a,
.panel-copy p,
.panel-copy li {
  color: var(--muted);
}

.sku {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value-note {
  max-width: 38ch;
}

.shipping-note,
.fit-note,
.micro-copy,
.value-note {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.option-block {
  margin-top: 20px;
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.option-head strong,
.option-head a {
  font-size: 0.92rem;
  font-weight: 700;
}

.color-options,
.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-dot,
.size-pill,
.purchase-button,
.mobile-buybar-button {
  font: inherit;
}

.color-dot {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(30, 23, 20, 0.08);
  border-radius: 50%;
  cursor: pointer;
}

.color-dot.is-active {
  box-shadow: 0 0 0 2px #fffaf4, 0 0 0 4px rgba(44, 34, 29, 0.34);
}

.butter { background: #f5efba; }
.blush { background: #efb7d9; }
.cream { background: #efe3d7; }
.aqua { background: #85ddd6; }
.sage { background: #9ba48d; }
.cocoa { background: #73535a; }
.plum { background: #8f5f78; }
.mint { background: #aee8d6; }
.wine { background: #6f2143; }
.sky { background: #8ab8e8; }
.carbon { background: #3d3a40; }
.olive { background: #7d8666; }
.marshmallow { background: #efe7dd; }
.stone { background: #cdbbaa; }
.rose { background: #d8afbc; }

.size-pill {
  border: 1px solid var(--line);
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  cursor: pointer;
}

.size-pill.is-active {
  color: #fff8f2;
  background: linear-gradient(135deg, #2c221d, #7f6652);
}

.cta-card {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.purchase-button,
.mobile-buybar-button {
  width: 100%;
  border: 0;
  min-height: 54px;
  border-radius: 999px;
  color: #fff8f2;
  background: linear-gradient(135deg, #2c221d, #7f6652);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.product-panels {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.info-panel {
  border: 1px solid rgba(29, 23, 20, 0.08);
  border-radius: 18px;
  overflow: hidden;
}

.info-panel summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
}

.info-panel summary::-webkit-details-marker {
  display: none;
}

.info-panel summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1rem;
}

.info-panel[open] summary::after {
  content: "-";
}

.panel-copy {
  padding: 0 16px 16px;
}

.panel-copy p,
.panel-copy ul {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
}

.panel-copy ul {
  padding-left: 18px;
}

.complete-look {
  margin-top: 24px;
  padding: 20px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.complete-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.complete-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.complete-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.complete-card div {
  padding: 14px;
}

.complete-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.complete-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.mobile-buybar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(29, 23, 20, 0.08);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.98);
  box-shadow: 0 16px 40px rgba(40, 28, 20, 0.14);
}

.mobile-buybar-copy {
  min-width: 0;
}

.mobile-buybar-copy strong,
.mobile-buybar-copy span {
  display: block;
}

.mobile-buybar-copy strong {
  font-size: 0.95rem;
}

.mobile-buybar-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.mobile-buybar-button {
  width: auto;
  min-width: 150px;
  padding: 0 18px;
}

@media (max-width: 980px) {
  .product-page {
    grid-template-columns: 1fr;
  }

  .product-info {
    padding: 20px 18px;
  }

  .complete-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .product-shell {
    width: min(100% - 14px, 1240px);
    padding-bottom: 110px;
  }

  .product-topbar {
    position: static;
    grid-template-columns: auto 1fr auto;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .product-brand img {
    width: 72px;
  }

  .back-link,
  .topbar-link {
    font-size: 0.74rem;
  }

  .gallery-panel,
  .product-info,
  .complete-look {
    border-radius: 18px;
  }

  .gallery-panel {
    padding: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .hero-image-wrap {
    border-radius: 16px;
  }

  .gallery-grid {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .thumb {
    flex: 0 0 68px;
    border-radius: 12px;
  }

  .product-info {
    margin-top: 10px;
  }

  .product-meta h1 {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    line-height: 1;
  }

  .rating-row {
    gap: 8px;
    font-size: 0.82rem;
  }

  .submeta-row {
    gap: 6px;
  }

  .submeta-row span {
    min-height: 26px;
    padding: 0 9px;
    font-size: 0.74rem;
  }

  .price-card,
  .cta-card,
  .info-panel {
    border-radius: 14px;
  }

  .price-card {
    padding: 14px;
  }

  .price-line {
    gap: 10px;
  }

  .price-line strong {
    font-size: 1.05rem;
  }

  .sku {
    font-size: 0.7rem;
  }

  .value-note,
  .shipping-note,
  .micro-copy,
  .fit-note,
  .panel-copy p,
  .panel-copy ul {
    font-size: 0.88rem;
  }

  .complete-look {
    margin-top: 18px;
    padding: 14px;
  }

  .section-head h2 {
    font-size: clamp(1.7rem, 8vw, 2.3rem);
    line-height: 1;
  }

  .complete-grid {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-left: -2px;
    margin-right: -2px;
    padding: 2px;
    scrollbar-width: none;
  }

  .complete-grid::-webkit-scrollbar {
    display: none;
  }

  .complete-card {
    flex: 0 0 46%;
    border-radius: 14px;
  }

  .mobile-buybar {
    display: flex;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 8px;
    gap: 10px;
  }

  .mobile-buybar-button {
    min-width: 132px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.9rem;
  }
}
