/* ==========================================================
   S&S DIVINA — Storefront stylesheet
   Design tokens: warm near-black leather ink + antique gold,
   set against a warm paper background — pulled directly from
   the brand's own box and bottle photography, not a generic
   dark/neon or cream/terracotta default.
   ========================================================== */

:root {
  /* Color */
  --ink:        #15110E;   /* brand black, warm not blue-black */
  --ink-soft:   #221C17;
  --paper:      #FBF8F2;   /* warm off-white page background */
  --cream:      #F3ECDC;   /* Blanc-edition sections */
  --gold:       #B68F4E;   /* primary antique gold */
  --gold-light: #E3C989;
  --gold-deep:  #8A6A34;
  --text:       #211B15;
  --text-muted: #6E6459;
  --line:       #E4DAC4;
  --line-dark:  #3A3128;
  --error:      #A23E32;
  --white:      #ffffff;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1280px;
  --gutter: 24px;
  --radius: 2px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }
.section--ink { background: var(--ink); color: #EFE9DE; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--white); }
.section--cream { background: var(--cream); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  font-weight: 600;
}
.section--ink .eyebrow { color: var(--gold-light); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-light); }
.btn--outline-ink { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline-ink:hover { background: var(--ink); color: var(--white); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn--outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn--full { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; background: var(--line); color: var(--text-muted); }

.link-underline {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.announce-bar {
  background: var(--ink);
  color: #E9E1D2;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 9px var(--gutter);
}
.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 0;
}
.header-side { display: flex; align-items: center; gap: 18px; }
.header-side--right { justify-content: flex-end; }
.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  display: inline-flex;
  color: var(--ink);
  position: relative;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}
.wordmark span { color: var(--gold-deep); }
.cart-count {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--gold-deep);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.main-nav {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 12px 0;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  font-weight: 500;
}
.main-nav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover { border-color: var(--gold-deep); }

.mobile-nav-toggle { display: none; }
.search-flyout {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.search-flyout.is-open { display: block; }
.search-flyout form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.search-flyout input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0.62;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,17,14,0.15) 0%, rgba(21,17,14,0.55) 62%, rgba(21,17,14,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 0 var(--gutter) 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.hero-kicker {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-size: clamp(40px, 6vw, 76px);
  color: var(--white);
  max-width: 16ch;
  margin-bottom: 20px;
}
.hero-content p {
  color: #D8D0C1;
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Pillars (Presence / Prestige / Power) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}
.pillar h3 { font-size: 22px; margin-bottom: 10px; }
.pillar p { margin: 0 auto; color: var(--text-muted); font-size: 14.5px; }
.pillar .glyph {
  width: 46px; height: 46px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-deep);
}

/* ---------- Collection tiles ---------- */
.collection-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.collection-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.collection-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.collection-tile:hover img { transform: scale(1.04); }
.collection-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,17,14,0) 40%, rgba(21,17,14,0.85) 100%);
}
.collection-tile-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px;
  z-index: 2;
}
.collection-tile-copy h3 { color: var(--white); margin-bottom: 6px; font-size: 24px; }
.collection-tile-copy p { color: #D8D0C1; font-size: 14px; margin-bottom: 12px; max-width: 34ch; }
.collection-tile-copy span.cta {
  font-size: 13px; letter-spacing: 0.03em;
  border-bottom: 1px solid var(--gold-light);
  color: var(--gold-light);
}

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.section-head__sub { color: var(--text-muted); font-size: 15px; margin: 6px 0 0; }

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
}
.product-card { position: relative; }
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cream);
  overflow: hidden;
  margin-bottom: 16px;
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.035); }
.product-card__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink);
  color: var(--gold-light);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 5px 10px;
}
.product-card__quickadd {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.product-card:hover .product-card__quickadd,
.product-card__quickadd:focus { opacity: 1; transform: translateY(0); }
.product-card__mood { font-size: 12px; color: var(--gold-deep); letter-spacing: 0.03em; margin-bottom: 4px; }
.product-card__name { font-size: 19px; margin-bottom: 4px; }
.product-card__name a:hover { border-bottom: 1px solid var(--ink); }
.product-card__price { font-family: var(--font-body); font-weight: 600; font-size: 14.5px; }
.product-card__price .was { color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-right: 6px; }

/* ---------- Shop layout ---------- */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.filters h4 {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 700;
}
.filter-group { margin-bottom: 32px; }
.filter-group ul li { margin-bottom: 10px; }
.filter-group a {
  font-size: 14.5px;
  color: var(--text);
  display: block;
}
.filter-group a:hover, .filter-group a.is-active { color: var(--gold-deep); }
.filter-group a.is-active { font-weight: 600; }

.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.shop-toolbar select {
  border: 1px solid var(--line);
  padding: 9px 12px;
  font-family: var(--font-body);
  background: var(--white);
}
.result-count { font-size: 13.5px; color: var(--text-muted); }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--gold-deep); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.filter-toggle-mobile { display: none; margin-bottom: 20px; }

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
}
.product-gallery__main {
  aspect-ratio: 1 / 1;
  background: var(--cream);
  overflow: hidden;
  margin-bottom: 12px;
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumbs { display: flex; gap: 10px; }
.product-gallery__thumbs img {
  width: 78px; height: 78px; object-fit: cover;
  border: 1px solid var(--line);
  cursor: pointer;
}
.product-gallery__thumbs img.is-active { border-color: var(--gold-deep); }

.product-info .mood { color: var(--gold-deep); font-size: 13px; letter-spacing: 0.04em; margin-bottom: 8px; }
.product-info h1 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 10px; }
.product-info .tagline { font-style: italic; color: var(--text-muted); font-size: 16px; margin-bottom: 18px; max-width: 44ch; }
.product-info .price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.product-info .price { font-size: 22px; font-weight: 600; font-family: var(--font-body); }
.product-info .was-price { text-decoration: line-through; color: var(--text-muted); }

.qty-stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
}
.qty-stepper button {
  background: none; border: none; width: 40px; height: 44px; font-size: 16px;
}
.qty-stepper input {
  width: 44px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  height: 44px; font-family: var(--font-body); font-size: 15px;
}
.add-to-cart-row { display: flex; gap: 14px; margin: 26px 0 30px; flex-wrap: wrap; }
.add-to-cart-row .btn { flex: 1; min-width: 200px; }

.accordion { border-top: 1px solid var(--line); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 14.5px;
  display: flex; justify-content: space-between; align-items: center;
  list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--gold-deep); }
.accordion-item[open] summary::after { content: '\2212'; }
.accordion-item .accordion-body { padding-bottom: 18px; color: var(--text-muted); font-size: 14.5px; }

.trust-strip {
  display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
}
.trust-strip span { display: flex; align-items: center; gap: 8px; }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.cart-row {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row img { width: 90px; height: 90px; object-fit: cover; background: var(--cream); }
.cart-row .name { font-family: var(--font-display); font-size: 17px; }
.cart-row .meta { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.cart-row .remove { font-size: 12.5px; color: var(--error); margin-top: 8px; display: inline-block; }
.cart-row .line-total { font-weight: 600; font-family: var(--font-body); text-align: right; }

.summary-card {
  border: 1px solid var(--line);
  padding: 28px;
  background: var(--white);
}
.summary-card h3 { font-size: 19px; margin-bottom: 20px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 12px; color: var(--text-muted); }
.summary-line.total {
  color: var(--text); font-weight: 700; font-size: 17px;
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px;
}
.promo-note { font-size: 12.5px; color: var(--gold-deep); margin: 14px 0 0; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.field input, .field select, .field textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14.5px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-deep); }
.field .error-msg { color: var(--error); font-size: 12.5px; }

.payment-options { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 24px; }
.payment-option {
  border: 1px solid var(--line);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.payment-option.is-selected { border-color: var(--gold-deep); background: #FBF6EA; }
.payment-option input { accent-color: var(--gold-deep); }
.payment-option .label { font-weight: 600; font-size: 14.5px; }
.payment-option .sub { font-size: 12.5px; color: var(--text-muted); }

.mini-cart-list { max-height: 320px; overflow-y: auto; margin-bottom: 18px; }
.mini-cart-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-cart-row img { width: 52px; height: 52px; object-fit: cover; background: var(--cream); }
.mini-cart-row .name { font-size: 13.5px; }
.mini-cart-row .qty { font-size: 12px; color: var(--text-muted); }
.mini-cart-row .price { margin-left: auto; font-size: 13.5px; font-weight: 600; }

.alert { padding: 14px 16px; font-size: 14px; margin-bottom: 20px; }
.alert--error { background: #FBEAE7; color: var(--error); border: 1px solid #EFC9C1; }
.alert--success { background: #EBF2EC; color: #315A3B; border: 1px solid #C6DBCB; }

/* ---------- Order confirmation ---------- */
.confirm-box { text-align: center; max-width: 620px; margin: 0 auto; }
.confirm-box .glyph {
  width: 64px; height: 64px; border: 1px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; color: var(--gold-deep);
}
.order-summary-list { text-align: left; border: 1px solid var(--line); padding: 24px; margin-top: 30px; }

/* ---------- Newsletter ---------- */
.newsletter {
  display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap;
}
.newsletter form { display: flex; gap: 10px; flex: 1; min-width: 280px; max-width: 420px; }
.newsletter input {
  flex: 1; padding: 13px 16px; border: 1px solid rgba(255,255,255,0.3);
  background: transparent; color: var(--white); font-family: var(--font-body);
}
.newsletter input::placeholder { color: #B8AFA0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9BFAE; padding: 64px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand .wordmark { color: var(--white); text-align: left; margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: #A79C89; max-width: 32ch; }
.footer-col h5 {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #8A8072; margin-bottom: 16px; font-weight: 600;
}
.footer-col li { margin-bottom: 10px; font-size: 13.5px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 12.5px; color: #8A8072; flex-wrap: wrap; gap: 12px;
}
.payment-badges { display: flex; gap: 10px; font-size: 12px; }
.payment-badges span { border: 1px solid var(--line-dark); padding: 4px 8px; }

/* ---------- Misc pages (about / contact) ---------- */
.prose { max-width: 68ch; }
.prose p { color: var(--text-muted); }
.split-block { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-block img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { display: none; }
  .filters.is-open { display: block; margin-bottom: 32px; }
  .filter-toggle-mobile { display: block; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split-block { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  .header-row { grid-template-columns: auto 1fr auto; }
  .main-nav { display: none; gap: 22px; flex-wrap: wrap; }
  .main-nav.is-open { display: flex; }
  .mobile-nav-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .wordmark { font-size: 20px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .collection-tiles { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 64px 1fr; }
  .cart-row .line-total { grid-column: 2; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; align-items: flex-start; }
}
