:root {
  --ivory: #f7f3ea;
  --card: #fffdf8;
  --charcoal: #2b2b28;
  --charcoal-soft: #55524a;
  --gold: #b8985a;
  --gold-line: rgba(184, 152, 90, 0.35);
  --max-width: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .wordmark {
  font-family: "Bodoni Moda", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

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

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ivory);
  border-bottom: 1px solid var(--gold-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; }
.wordmark { font-size: 1.2rem; letter-spacing: 0.005em; text-transform: none; }
.wm-dot { color: var(--gold); }

.nav-links { display: flex; gap: 28px; font-size: 0.9rem; letter-spacing: 0.03em; }
.nav-links .tab-btn {
  background: none;
  border: none;
  padding: 4px 0;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  opacity: 0.75;
  border-bottom: 1px solid transparent;
  transition: opacity 0.15s, border-color 0.15s;
}
.nav-links .tab-btn:hover { opacity: 1; }
.nav-links .tab-btn.active { opacity: 1; border-bottom-color: var(--gold); }

/* hero */
.hero {
  padding: 90px 24px 70px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 720px;
  margin: 0 auto 18px;
}

.hero p {
  color: var(--charcoal-soft);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); background: #1c1c1a; }

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--gold-line);
}

/* section headings */
.section-head {
  text-align: center;
  margin-bottom: 44px;
}
.section-head h2 { font-size: 1.9rem; margin-bottom: 10px; }
.section-head p { color: var(--charcoal-soft); }

section { padding: 70px 0; }

/* theme grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.theme-card {
  background: var(--card);
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.theme-card .swatch {
  width: 100%;
  aspect-ratio: 8 / 5;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8e0cf, #cfc4a8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal-soft);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-card h3 { font-size: 1.3rem; }
.theme-card .desc { color: var(--charcoal-soft); font-size: 0.92rem; flex-grow: 1; }

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

.collection-pay {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 200px;
}

@media (max-width: 720px) {
  .collection-pay { align-items: stretch; width: 100%; }
}

/* checkout */
.checkout-panel {
  background: var(--card);
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  padding: 32px;
  max-width: 480px;
  margin: 0 auto;
}
.checkout-empty { color: var(--charcoal-soft); text-align: center; }
.checkout-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  font-family: "Bodoni Moda", serif;
  font-size: 1.15rem;
}
#payment-panel { min-height: 45px; color: var(--charcoal-soft); font-size: 0.9rem; }
#payment-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.checkout-desc {
  color: var(--charcoal-soft);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.checkout-facts {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 0.86rem;
  color: var(--charcoal-soft);
}
.checkout-facts li {
  position: relative;
  padding: 3px 0 3px 18px;
}
.checkout-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.consent {
  border-top: 1px solid var(--gold-line);
  padding-top: 18px;
  margin-bottom: 20px;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--charcoal);
  cursor: pointer;
}
.consent-row input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--charcoal);
  cursor: pointer;
}
.consent-row a { text-decoration: underline; }
.consent-note {
  font-size: 0.76rem;
  color: var(--charcoal-soft);
  margin-top: 8px;
  padding-left: 26px;
}

.footer-links {
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.footer-links a { text-decoration: underline; }

.price {
  font-size: 1.1rem;
  font-weight: 600;
}
.price .was {
  text-decoration: line-through;
  color: var(--charcoal-soft);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 6px;
}

.collection-band {
  background: var(--charcoal);
  color: var(--ivory);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.collection-band h3 { color: var(--ivory); font-size: 1.5rem; }
.collection-band p { color: #cfc9bb; margin-top: 6px; max-width: 420px; }
.collection-band .price { color: var(--gold); font-size: 1.4rem; }

footer {
  border-top: 1px solid var(--gold-line);
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--charcoal-soft);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; row-gap: 10px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 12px; font-size: 0.78rem; }
  .theme-grid { grid-template-columns: 1fr; }
  .collection-band { flex-direction: column; text-align: center; }
  .hero { padding: 56px 24px 44px; }
  section { padding: 48px 0; }
}

/* Mobile: cover art is 1600px wide and was unconstrained, so cards pushed the
   page wider than the phone screen and clipped the SELECT buttons. */
img { max-width: 100%; height: auto; }
body { overflow-x: hidden; }
.theme-card img { display: block; border-radius: 10px; }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .checkout-panel { padding: 24px 18px; }
  .collection-band { padding: 28px 20px; }
  .price-row { flex-wrap: wrap; row-gap: 10px; }
  .price-row .btn { width: 100%; text-align: center; }
}

/* Grid and flex children default to min-width:auto, so a card refuses to shrink
   below its content and pushes the page sideways on narrow screens. This is the
   actual cause of the mobile overflow; the earlier overflow-x:hidden only hid it. */
.theme-grid > *, .price-row > *, .collection-band > *, .nav > * { min-width: 0; }
.theme-card { overflow: hidden; }
html { overflow-x: hidden; }
