/* ============================================================
   STAR SCENT — Design tokens
   Palette: deep teal / ink / cream / restrained gold
   Type: Fraunces (display serif) + Inter (body sans)
   ============================================================ */

:root {
  --ink: #12201c;
  --teal: #163c34;
  --teal-light: #1f5147;
  --teal-pale: #e7efec;
  --cream: #f6f1e6;
  --cream-dim: #ece4d3;
  --white: #ffffff;
  --gold: #a9824f;
  --gold-soft: #cbb083;
  --line: rgba(18, 32, 28, 0.14);
  --line-strong: rgba(18, 32, 28, 0.28);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 62ch; }

.label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--teal-light);
  font-weight: 600;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--max-width); margin: 0 auto;
  gap: 24px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--teal);
  white-space: nowrap;
}
.wordmark span { color: var(--gold); }

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  font-size: 0.94rem;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .15s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { border-color: var(--gold); }

.nav-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  background: none; border: none; color: var(--ink);
  display: flex; align-items: center; gap: 6px; font-size: 0.92rem;
  position: relative;
}
.cart-count {
  background: var(--teal); color: var(--cream);
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 0.68rem; display: flex; align-items: center; justify-content: center;
  position: absolute; top: -8px; right: -10px;
}
.nav-toggle { display: none; background: none; border: none; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  font-size: 0.92rem; font-weight: 600;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink); color: var(--cream);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--teal); border-color: var(--teal); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--white); }
.btn-gold:hover { background: #93713f; border-color: #93713f; }
.btn-whatsapp { background: #1f5147; border-color: #1f5147; color: var(--cream); }
.btn-whatsapp:hover { background: #163c34; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero p.lede { font-size: 1.08rem; color: #3a4a44; }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-art {
  aspect-ratio: 4/5; background: var(--teal-pale);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; aspect-ratio: 16/10; }
}

/* ---------- Sections ---------- */
section.block { padding: 56px 0; }
section.block.divider { border-top: 1px solid var(--line); }
.block-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 28px; flex-wrap: wrap;
}
.block-head p { margin: 6px 0 0; color: #45564f; }
.view-all { font-size: 0.9rem; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; white-space: nowrap; }

/* ---------- Product grid / cards ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 22px;
}
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr 1fr; gap: 18px 14px; } }

.product-card { display: block; }
.product-media {
  aspect-ratio: 3/4; background: var(--white); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
  overflow: hidden; position: relative;
}
.product-media img.card-img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--ink); color: var(--cream);
  font-size: 0.68rem; letter-spacing: 0.03em;
  padding: 4px 8px;
}
.product-brand { font-size: 0.78rem; color: var(--teal-light); margin-bottom: 2px; }
.product-name { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.product-price { font-size: 0.94rem; color: var(--ink); }
.product-family { font-size: 0.82rem; color: #667972; }

/* ---------- Collection tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
.tile {
  border: 1px solid var(--line); background: var(--white);
  padding: 26px 20px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s ease, transform .15s ease;
}
.tile:hover { border-color: var(--gold-soft); }
.tile .tile-name { font-family: var(--font-display); font-size: 1.15rem; }
.tile .tile-desc { font-size: 0.85rem; color: #556860; margin: 0; }

/* ---------- Brand strip ---------- */
.brand-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-chip {
  border: 1px solid var(--line-strong); padding: 10px 18px; font-size: 0.9rem;
  background: var(--white);
}
.brand-chip:hover { border-color: var(--gold); }

/* ---------- Shop / collection layout ---------- */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: flex-start; }
@media (max-width: 860px) { .shop-layout { grid-template-columns: 1fr; } }

.filter-panel { position: sticky; top: 90px; border: 1px solid var(--line); background: var(--white); padding: 22px; }
.filter-group { margin-bottom: 22px; }
.filter-group h4 { margin-bottom: 10px; font-size: 0.85rem; letter-spacing: 0.02em; color: var(--teal); }
.filter-option { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; margin-bottom: 8px; }
.filter-option input { accent-color: var(--teal); }
.filter-reset { font-size: 0.85rem; border-bottom: 1px solid var(--line-strong); }

.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.result-count { font-size: 0.88rem; color: #556860; }
select#sort-select, .search-input {
  border: 1px solid var(--line-strong); background: var(--white);
  padding: 9px 12px; font-size: 0.9rem; font-family: inherit; color: var(--ink);
}

.empty-state { padding: 60px 20px; text-align: center; color: #556860; border: 1px dashed var(--line-strong); }

/* ---------- Product detail ---------- */
.pdp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .pdp-grid { grid-template-columns: 1fr; gap: 28px; } }
.pdp-media { aspect-ratio: 4/5; background: var(--white); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pdp-media img.pdp-img { width: 100%; height: 100%; object-fit: cover; }
.pdp-brand a { color: var(--teal-light); font-size: 0.9rem; border-bottom: 1px solid transparent; }
.pdp-brand a:hover { border-color: var(--teal-light); }
.pdp-price { font-size: 1.3rem; margin: 14px 0; }
.pdp-meta { display: flex; gap: 22px; margin: 18px 0; flex-wrap: wrap; font-size: 0.88rem; color: #45564f; }
.pdp-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 22px; }
.tag-pill { font-size: 0.76rem; border: 1px solid var(--line-strong); padding: 5px 11px; color: #384942; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.qty-control { display: flex; border: 1px solid var(--line-strong); }
.qty-control button { background: none; border: none; width: 36px; height: 40px; font-size: 1rem; }
.qty-control input { width: 44px; border: none; text-align: center; font-size: 0.95rem; background: none; }
.pdp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.notes-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.notes-table th, .notes-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: top; }
.notes-table th { width: 90px; color: var(--teal-light); font-weight: 600; }
.breadcrumb { font-size: 0.82rem; color: #667972; margin-bottom: 22px; }
.breadcrumb a { border-bottom: 1px solid var(--line-strong); }
.breadcrumb .sep { margin: 0 6px; }

/* ---------- Cart page ---------- */
.cart-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: flex-start; }
@media (max-width: 860px) { .cart-grid { grid-template-columns: 1fr; } }
.cart-line {
  display: grid; grid-template-columns: 72px 1fr auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-line .line-media { width: 72px; height: 90px; background: var(--white); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.cart-line .line-media svg { width: 60%; }
.cart-line .line-name { font-family: var(--font-display); font-size: 1rem; }
.cart-line .line-brand { font-size: 0.8rem; color: var(--teal-light); }
.remove-line { font-size: 0.8rem; color: #8a4b3a; border-bottom: 1px solid transparent; margin-top: 4px; }
.remove-line:hover { border-color: #8a4b3a; }
.summary-box { border: 1px solid var(--line); background: var(--white); padding: 26px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; }
.summary-total { font-size: 1.15rem; font-weight: 600; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: var(--teal-light); }
.field-group select, .field-group input {
  width: 100%; border: 1px solid var(--line-strong); padding: 11px 12px; font-size: 0.92rem; font-family: inherit; background: var(--white);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--teal-pale); margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 52px 0 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 0.85rem; margin-bottom: 14px; color: var(--teal); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px var(--gutter); font-size: 0.8rem; color: #556860; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: var(--max-width); margin: 0 auto; }

/* ---------- WhatsApp floating CTA ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  background: #1f5147; color: var(--cream);
  padding: 13px 20px; font-size: 0.88rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 18px rgba(18,32,28,0.22);
}
.wa-float:hover { background: #163c34; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--cream); padding: 12px 22px; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 404 / about ---------- */
.center-block { text-align: center; padding: 90px 0; }
.about-body { max-width: 68ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
