/* =========================================================================
   Eureka Bath Works | Victorian Queen of Hearts brand system, v2
   Single file. Defensive layout. No pseudo element conflicts.
   ========================================================================= */

:root {
  --teal:        #10647C;
  --teal-dark:   #0C5969;
  --teal-light:  #2A8AA3;
  --teal-pale:   #E6F0F2;
  --gold:        #CDA968;
  --gold-light:  #DFBD72;
  --aged-brass:  #B5884E;
  --cream:       #FFFDF7;
  --aged-paper:  #F3E2D9;
  --coral:       #AB564D;
  --coral-deep:  #8e3f37;
  --blush:       #EBC9BD;
  --ink:         #1f1410;
  --ink-soft:    #4a3528;
  --whisper:     rgba(31, 20, 16, 0.55);

  --shadow-card: 0 2px 12px rgba(31, 20, 16, 0.08), 0 12px 36px rgba(31, 20, 16, 0.06);
  --shadow-deep: 0 24px 60px rgba(12, 89, 105, 0.18);

  --pad-page: clamp(1rem, 4vw, 3rem);
  --content-max: 1240px;

  --f-display: 'Cinzel Decorative', 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --f-serif:   'Cormorant Garamond', Georgia, serif;
  --f-body:    'Cormorant Garamond', Georgia, serif;
  --f-ui:      'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--coral); }

button { font: inherit; cursor: pointer; border: 0; background: none; }

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--teal-dark);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 4.8vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.25; }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.3; }

p { margin: 0 0 1rem; }
em, i { font-family: var(--f-serif); font-style: italic; }

.eyebrow {
  font-family: var(--f-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--aged-brass);
  margin: 0 0 0.9rem;
  display: inline-block;
}

.lede {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* =====================================================================
   ORNAMENTS
   ===================================================================== */

.heart-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.8rem auto;
  max-width: 320px;
}
.heart-rule::before, .heart-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}
.heart-rule__mark {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--aged-brass);
}
.heart-rule__mark::before { content: '\2766'; }

.heart-trio {
  text-align: center;
  color: var(--aged-brass);
  letter-spacing: 0.6em;
  font-size: 0.95rem;
  margin: 1.2rem auto;
  opacity: 0.85;
}
.heart-trio::before { content: '\2766 \2766 \2766'; }

.crown-rule {
  text-align: center;
  margin: 0 auto 1.5rem;
}
.crown-rule::before {
  content: '\2766  \2042  \2766  \2042  \2766';
  letter-spacing: 0.6em;
  color: var(--aged-brass);
  font-size: 1rem;
}

/* =====================================================================
   LAYOUT
   ===================================================================== */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--pad-page);
  padding-right: var(--pad-page);
}

.section {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.section--cream { background: var(--cream); }
.section--paper { background: var(--aged-paper); }
.section--teal {
  background: var(--teal-dark);
  color: var(--cream);
}
.section--teal h1, .section--teal h2, .section--teal h3 { color: var(--cream); }
.section--teal .eyebrow { color: var(--gold-light); }
.section--teal .lede { color: rgba(255, 253, 247, 0.85); }

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* =====================================================================
   ORNATE FRAMES
   ===================================================================== */

.frame {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--gold);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-card);
}

.cartouche {
  position: relative;
  background: var(--cream);
  border: 3px double var(--aged-brass);
  border-radius: 4px;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 3vw, 2.5rem);
  margin: 0 auto;
  max-width: 820px;
  box-shadow: var(--shadow-deep);
  text-align: center;
}

.corner-flourish {
  position: absolute;
  color: var(--aged-brass);
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
}
.corner-flourish.tl { top: 10px; left: 12px; }
.corner-flourish.tr { top: 10px; right: 12px; }
.corner-flourish.bl { bottom: 10px; left: 12px; }
.corner-flourish.br { bottom: 10px; right: 12px; }

/* =====================================================================
   NAVIGATION
   ===================================================================== */

.topbar {
  background: var(--teal-dark);
  color: var(--cream);
  text-align: center;
  font-family: var(--f-ui);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem var(--pad-page);
}
.topbar a { color: var(--gold-light); border-bottom: 1px solid transparent; }
.topbar a:hover { border-bottom-color: var(--gold-light); color: var(--cream); }
.topbar .sep { margin: 0 0.6rem; color: var(--gold-light); }

.site-nav {
  background: var(--cream);
  border-bottom: 1px solid rgba(205, 169, 104, 0.4);
  padding: 1rem var(--pad-page);
  position: sticky;
  top: 0;
  z-index: 60;
}
.site-nav__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-nav__brand {
  text-align: center;
  font-family: var(--f-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: var(--teal-dark);
  line-height: 1.1;
  flex: 0 0 auto;
}
.site-nav__brand small {
  display: block;
  font-family: var(--f-serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  color: var(--coral);
  margin-top: 0.2rem;
}
.site-nav__menu {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--f-ui);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.site-nav__menu a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.site-nav__menu a:hover { color: var(--coral); border-bottom-color: var(--coral); }

@media (max-width: 820px) {
  .site-nav__inner { justify-content: center; text-align: center; }
}

/* =====================================================================
   BUTTONS
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--f-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.85rem 1.7rem;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--cream);
  border-radius: 2px;
  text-decoration: none;
  transition: all 220ms ease;
  cursor: pointer;
}
.btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 100, 124, 0.25);
}
.btn--coral { background: var(--coral); border-color: var(--coral); }
.btn--coral:hover {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
  box-shadow: 0 6px 18px rgba(171, 86, 77, 0.3);
}
.btn--ghost {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}
.btn--ghost:hover {
  background: var(--teal-pale);
  color: var(--teal-dark);
}
.btn--gold {
  background: transparent;
  color: var(--aged-brass);
  border-color: var(--aged-brass);
}
.btn--gold:hover {
  background: var(--aged-brass);
  color: var(--cream);
}
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.7rem; }

/* =====================================================================
   HERO
   ===================================================================== */

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  background:
    radial-gradient(ellipse 1000px 600px at 50% 30%, rgba(230, 240, 242, 0.5), transparent 70%),
    var(--cream);
}
.hero__crown {
  font-size: 1.2rem;
  color: var(--aged-brass);
  letter-spacing: 0.6em;
  margin-bottom: 1.2rem;
}
.hero__crown::before { content: '\2766  \2042  \2766  \2042  \2766'; }
.hero h1 {
  margin-bottom: 1rem;
}
.hero h1 em {
  color: var(--coral);
  font-family: var(--f-serif);
  font-style: italic;
}
.hero__lede {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}
.hero-ornament {
  display: inline-block;
  color: var(--gold);
  font-size: 1.4rem;
  vertical-align: middle;
  margin: 0 0.6rem;
}
.hero-ornament::before { content: '\2766'; }

/* =====================================================================
   GRIDS, defensive layout
   ===================================================================== */

.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--6 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

@media (max-width: 720px) {
  .grid--3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .grid--6 { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   SCENT CARD
   ===================================================================== */

.scent-card {
  display: block;
  background: var(--cream);
  border: 1px solid rgba(205, 169, 104, 0.4);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.scent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.scent-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blush), var(--cream) 60%, var(--teal-pale));
  display: flex;
  align-items: center;
  justify-content: center;
}
.scent-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.scent-card__monogram {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--teal-dark);
  opacity: 0.18;
  line-height: 1;
}
.scent-card__body {
  padding: 1.1rem 1rem 1.4rem;
  text-align: center;
  border-top: 1px solid rgba(205, 169, 104, 0.3);
}
.scent-card__heart {
  display: block;
  color: var(--coral);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.scent-card__heart::before { content: '\2766'; }
.scent-card__name {
  font-family: var(--f-display);
  color: var(--teal-dark);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.scent-card__type {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--whisper);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* =====================================================================
   PRODUCT CARD
   ===================================================================== */

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid rgba(205, 169, 104, 0.4);
  border-top: 3px solid var(--coral);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-top-color: var(--teal);
}
.product-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blush), var(--cream) 60%, var(--teal-pale));
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.product-card__monogram {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--teal-dark);
  opacity: 0.18;
  line-height: 1;
}
.product-card__heart {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  color: var(--coral);
  font-size: 0.95rem;
  z-index: 2;
}
.product-card__heart::before { content: '\2766'; }
.product-card__body {
  padding: 0.9rem 0.85rem 1.1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.3rem;
}
.product-card__name {
  font-family: var(--f-display);
  color: var(--teal-dark);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.product-card__type {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--whisper);
  font-size: 0.82rem;
  line-height: 1.35;
}
.product-card__price {
  font-family: var(--f-ui);
  font-weight: 600;
  color: var(--teal-dark);
  font-size: 0.95rem;
  margin-top: 0.1rem;
}

/* =====================================================================
   SHOP PAGE NAV
   ===================================================================== */

.shop-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1.1rem;
  font-family: var(--f-ui);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 1.5rem auto 0;
  max-width: 920px;
}
.shop-nav a {
  color: var(--teal-dark);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  white-space: nowrap;
}
.shop-nav a small {
  color: var(--aged-brass);
  font-size: 0.68rem;
  margin-left: 0.2rem;
}
.shop-nav a:hover { color: var(--coral); border-bottom-color: var(--coral); }

.scent-row { margin-bottom: 2.5rem; }
.scent-row__title {
  text-align: center;
  font-family: var(--f-display);
  color: var(--coral);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.scent-row__title::after {
  content: '\2766';
  display: block;
  color: var(--aged-brass);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

/* =====================================================================
   FORMS
   ===================================================================== */

.form-row { margin-bottom: 1.3rem; }
.form-label {
  display: block;
  font-family: var(--f-ui);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.4rem;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid rgba(205, 169, 104, 0.5);
  border-bottom: 2px solid var(--teal);
  padding: 0.8rem 1rem;
  font-family: var(--f-serif);
  font-size: 1rem;
  color: var(--ink);
  border-radius: 2px;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-bottom-color: var(--coral);
}
.form-textarea { resize: vertical; min-height: 130px; }

/* =====================================================================
   CART
   ===================================================================== */

.qty-btn {
  background: var(--cream);
  border: 1px solid rgba(205, 169, 104, 0.6);
  color: var(--teal-dark);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--f-ui);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--teal-pale); border-color: var(--teal); }

/* =====================================================================
   FOOTER
   ===================================================================== */

.site-footer {
  background: var(--teal-dark);
  color: var(--cream);
  padding: 3rem var(--pad-page) 2rem;
  margin-top: 3rem;
  text-align: center;
}
.site-footer__crown {
  color: var(--gold-light);
  font-size: 1.3rem;
  letter-spacing: 0.6em;
  margin-bottom: 1.5rem;
}
.site-footer__crown::before { content: '\2766  \2042  \2766  \2042  \2766'; }
.site-footer__brand {
  font-family: var(--f-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.site-footer__tag {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}
.site-footer__menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--f-ui);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.site-footer__menu a {
  color: var(--cream);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.site-footer__menu a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.site-footer__small {
  font-family: var(--f-serif);
  font-style: italic;
  color: rgba(255, 253, 247, 0.6);
  font-size: 0.85rem;
  border-top: 1px solid rgba(205, 169, 104, 0.25);
  padding-top: 1.2rem;
  margin-top: 1.5rem;
}

/* =====================================================================
   UTILITIES
   ===================================================================== */

.text-center { text-align: center; }
.text-coral { color: var(--coral); }
.text-teal  { color: var(--teal-dark); }
.text-gold  { color: var(--aged-brass); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 2rem; } .mt-4 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 2rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

[id^="cat-"], [id^="scent-"], [id^="family-"] { scroll-margin-top: 110px; }

/* queen-frame alias for legacy template usage */
.queen-frame {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--gold);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-card);
  border-radius: 4px;
}
.queen-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold);
  pointer-events: none;
  opacity: 0.4;
  border-radius: 2px;
}

/* === Mobile responsive fixes === */
@media (max-width: 720px) {
  .topbar {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    padding: 0.5rem 0.6rem;
    line-height: 1.6;
  }
  .topbar .sep { margin: 0 0.35rem; }
  .topbar a { white-space: nowrap; }

  .site-nav { padding: 0.7rem 0.6rem; }
  .site-nav__inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "primary" "secondary";
    gap: 0.5rem;
    text-align: center;
  }
  .site-nav__brand { grid-area: brand; font-size: 0.95rem; }
  .site-nav__brand small { font-size: 0.7rem; }
  .site-nav__menu {
    justify-content: center;
    gap: 0.7rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
  }
  .site-nav__cta { width: 100%; display: flex; justify-content: center; }

  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.6rem); }
  .hero-ornament { font-size: 1.1rem; margin: 0 0.3rem; }

  .container { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 480px) {
  .topbar a:nth-of-type(1) ~ .sep:nth-of-type(2),
  .topbar a:nth-of-type(2) ~ .sep:nth-of-type(2) { display: none; }
}
