/* ============================================================
   AuraSage — cross-border mystical e-commerce SPA
   Theme: deep ink base + muted gold + cinnabar accent
   ============================================================ */

:root {
  --bg: #1a1a2e;
  --bg-2: #14141f;
  --bg-3: #21213a;
  --card: #23233a;
  --card-2: #2a2a44;
  --gold: #b8975a;
  --gold-soft: #d9bd8a;
  --gold-dim: rgba(184, 151, 90, 0.22);
  --cinnabar: #c23b22;
  --cinnabar-soft: #e06248;
  --text: #f5f0eb;
  --muted: #a9a4b8;
  --muted-2: #7d7890;
  --line: rgba(184, 151, 90, 0.20);
  --line-soft: rgba(245, 240, 235, 0.08);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --serif: "Cormorant Garamond", Georgia, "Songti SC", serif;
  --sans: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(184, 151, 90, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(194, 59, 34, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--gold); color: #1a1a2e; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section.sm { padding: 56px 0; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin: 0 0 14px;
}
.h-serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 14px; }
h1 { font-size: clamp(34px, 5.4vw, 60px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 22px; }
p { color: var(--muted); margin: 0 0 16px; }
.lead { font-size: 18px; color: #cfc9da; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid var(--gold);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #1a1a2e; font-weight: 500; font-size: 15px; letter-spacing: 0.02em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(184, 151, 90, 0.35); filter: brightness(1.04); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); box-shadow: none; }
.btn.cinnabar { background: linear-gradient(180deg, var(--cinnabar-soft), var(--cinnabar)); border-color: var(--cinnabar); color: #fff; }
.btn.sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(20, 20, 31, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; gap: 26px;
  height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
}
.brand { display: flex; align-items: baseline; gap: 9px; font-family: var(--serif); }
.brand .mark { font-size: 26px; font-weight: 700; color: var(--gold); letter-spacing: 0.02em; }
.brand .sub { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted-2); }
.nav-links { display: flex; gap: 22px; margin-left: 14px; }
.nav-links a { font-size: 14px; color: var(--muted); letter-spacing: 0.03em; padding: 6px 0; position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.currency-select {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-family: inherit;
}
.cart-btn {
  position: relative; background: transparent; border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .2s;
}
.cart-btn:hover { border-color: var(--gold); }
.cart-count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--cinnabar); color: #fff; font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; }

/* ---------- Hero / Bento ---------- */
.hero { position: relative; padding: 96px 0 70px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 30px; align-items: center; }
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero .lead { max-width: 460px; }
.hero-visual {
  aspect-ratio: 1 / 1.05; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 35%, rgba(184, 151, 90, 0.30), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(194, 59, 34, 0.22), transparent 50%),
    linear-gradient(160deg, #20203a, #15151f);
  display: grid; place-items: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.smoke { position: absolute; inset: 0; opacity: 0.5; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.bento {
  display: grid; gap: 18px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 150px;
}
.bento .cell {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card), var(--bg-3));
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; transition: transform .2s ease, border-color .2s ease;
}
.bento .cell:hover { transform: translateY(-3px); border-color: var(--gold); }
.bento .cell .glyph { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--gold); opacity: 0.9; }
.bento .cell h3 { margin: 0; font-size: 20px; }
.bento .cell p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.bento .cell .tag-en { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted-2); }
.bento .span2 { grid-column: span 2; }
.bento .span3 { grid-column: span 3; }
.bento .span4 { grid-column: span 4; }
.bento .row2 { grid-row: span 2; }
.cell-elem-wood   { box-shadow: inset 0 0 0 1px rgba(111,156,110,0.25); }
.cell-elem-fire   { box-shadow: inset 0 0 0 1px rgba(194,59,34,0.30); }
.cell-elem-earth  { box-shadow: inset 0 0 0 1px rgba(184,151,90,0.30); }
.cell-elem-metal  { box-shadow: inset 0 0 0 1px rgba(201,194,176,0.25); }
.cell-elem-water  { box-shadow: inset 0 0 0 1px rgba(91,127,166,0.30); }

/* ---------- Product grid ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 26px;
}
.filters { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 8px 15px; border-radius: 999px; font-size: 13px; transition: all .18s;
}
.chip:hover { color: var(--text); border-color: var(--gold); }
.chip.active { background: var(--gold); color: #1a1a2e; border-color: var(--gold); font-weight: 500; }
.select {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 13px; font-family: inherit; font-size: 13px;
}
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.card {
  background: linear-gradient(160deg, var(--card), var(--bg-3));
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 1 / 1; background: #15151f; position: relative; }
.card .thumb svg { width: 100%; height: 100%; }
.card .badge {
  position: absolute; top: 12px; left: 12px; background: var(--cinnabar); color: #fff;
  font-size: 11px; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.04em;
}
.card .badge.best { background: var(--gold); color: #1a1a2e; }
.card .body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .elem { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.card .name { font-family: var(--serif); font-size: 19px; color: var(--text); margin: 0; line-height: 1.2; }
.card .meaning { font-size: 13px; color: var(--muted); flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.card .price { font-size: 17px; color: var(--text); font-weight: 500; }
.card .price .old { color: var(--muted-2); text-decoration: line-through; font-size: 13px; margin-right: 6px; }
.card .add {
  border: 1px solid var(--gold); background: transparent; color: var(--gold);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; transition: all .18s;
}
.card .add:hover { background: var(--gold); color: #1a1a2e; }
.rating { font-size: 12px; color: var(--gold-soft); }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.pdp .gallery { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #15151f; }
.pdp .gallery svg { width: 100%; }
.pdp .elem-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.pdp .price-lg { font-size: 30px; font-family: var(--serif); color: var(--text); }
.pdp .meaning-quote { font-family: var(--serif); font-size: 23px; font-style: italic; color: var(--gold-soft); border-left: 3px solid var(--cinnabar); padding-left: 16px; margin: 18px 0; }
.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.spec-table td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.spec-table td:first-child { color: var(--muted-2); width: 38%; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { background: transparent; border: none; color: var(--text); width: 36px; height: 38px; font-size: 18px; }
.qty input { width: 42px; text-align: center; background: transparent; border: none; color: var(--text); font-size: 15px; }
.pdp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.block { margin: 22px 0; }
.block h4 { font-family: var(--serif); font-size: 17px; color: var(--gold-soft); margin: 0 0 6px; letter-spacing: 0.02em; }
.review { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; background: rgba(255,255,255,0.02); }
.review .who { font-size: 13px; color: var(--text); font-weight: 500; }
.review .meta { font-size: 12px; color: var(--muted-2); }
.related-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cart-item .ci-thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: #15151f; }
.cart-item .ci-name { font-family: var(--serif); font-size: 18px; color: var(--text); }
.cart-item .ci-elem { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: linear-gradient(160deg, var(--card), var(--bg-3)); position: sticky; top: 90px; }
.summary .row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; color: var(--muted); }
.summary .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 19px; color: var(--text); font-family: var(--serif); }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty .big { font-family: var(--serif); font-size: 30px; color: var(--text); margin-bottom: 10px; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-card { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, var(--card), var(--bg-3)); transition: transform .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.post-card .cover { height: 150px; background: linear-gradient(140deg, #2a2a44, #15151f); display: grid; place-items: center; font-family: var(--serif); font-size: 40px; color: var(--gold); }
.post-card .body { padding: 18px; }
.post-card .tag { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.post-card h3 { font-size: 20px; margin: 6px 0 8px; }
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-size: clamp(30px, 4vw, 46px); }
.article .meta { color: var(--muted-2); font-size: 13px; margin-bottom: 24px; }
.article p { font-size: 17px; line-height: 1.85; color: #d7d2e0; }
.article h2 { font-size: 26px; margin-top: 34px; }

/* ---------- Quiz ---------- */
.quiz-box { max-width: 720px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; background: linear-gradient(160deg, var(--card), var(--bg-3)); }
.quiz-progress { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.quiz-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--cinnabar)); transition: width .3s; }
.quiz-q { font-family: var(--serif); font-size: 26px; margin-bottom: 22px; }
.quiz-opts { display: grid; gap: 12px; }
.quiz-opt { text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,0.02); color: var(--text); padding: 16px 18px; border-radius: var(--radius-sm); font-size: 15px; transition: all .18s; }
.quiz-opt:hover { border-color: var(--gold); background: rgba(184,151,90,0.08); }
.result-element { text-align: center; padding: 10px 0 6px; }
.result-element .glyph { font-family: var(--serif); font-size: 90px; color: var(--gold); line-height: 1; }

/* ---------- Story / About ---------- */
.story-hero { text-align: center; max-width: 760px; margin: 0 auto; }
.values { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 30px; }
.value { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; background: rgba(255,255,255,0.02); }
.value .v-num { font-family: var(--serif); font-size: 30px; color: var(--gold); }

/* ---------- Footer ---------- */
#site-footer { border-top: 1px solid var(--line-soft); margin-top: 60px; background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 54px 0 30px; }
.foot-grid h5 { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.foot-grid a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; transition: color .18s; }
.foot-grid a:hover { color: var(--text); }
.foot-bottom { border-top: 1px solid var(--line-soft); padding: 18px 0 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted-2); font-size: 13px; }
.foot-note { font-size: 12px; color: var(--muted-2); max-width: 520px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: var(--gold); color: #1a1a2e; padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .3s; z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal animation ---------- */
.reveal { animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; }
  .pdp { grid-template-columns: 1fr; gap: 28px; }
  .cart-layout { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .bento .span2, .bento .span3, .bento .span4 { grid-column: span 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 18px 22px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; }
  .section { padding: 56px 0; }
  .bento { grid-template-columns: 1fr; }
  .bento .span2, .bento .span3, .bento .span4 { grid-column: span 1; }
  .foot-grid { grid-template-columns: 1fr; }
}
