/* ============================================================
   selenecc · shared design tokens & components
   朱砂 cinnabar · 黄铜 gold · 藏经纸 paper · 松石青 teal
   ============================================================ */
:root {
  color-scheme: light;

  /* ---- required base tokens ---- */
  --color-primary: #A63A25;          /* cinnabar */
  --color-background: #F6EFE3;       /* scripture paper */
  --color-surface: #FFFDF8;          /* warm white card */
  --color-text: #211A16;             /* ink brown */
  --color-muted-text: #8A7B6E;
  --color-border: #E2D5BF;
  --color-focus: #B8862F;

  /* ---- brand extended tokens ---- */
  --cinnabar-deep: #8C2E1C;
  --cinnabar-soft: #F3E2DA;
  --gold: #B8862F;
  --gold-deep: #946A1F;
  --gold-soft: #F0E4C8;
  --teal: #2E6E63;
  --teal-deep: #245448;
  --teal-soft: #DCE9E4;
  --paper-deep: #EFE5D3;
  --ink-deep: #16100C;
  --line-strong: #D4C3A6;
  --on-dark: #F3E9D6;
  --on-dark-muted: #C9B89B;

  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: Georgia, "Times New Roman", "Noto Serif SC",
                  "Songti SC", "SimSun", serif;

  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --space-unit: 0.25rem;
  --content-width: 80rem;

  --shadow-sm: 0 2px 10px rgba(74, 52, 28, .06);
  --shadow-md: 0 12px 34px rgba(74, 52, 28, .12);
  --shadow-lg: 0 26px 70px rgba(40, 24, 12, .20);
}

* { box-sizing: border-box; }

html {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.25;
  margin: 0;
  font-weight: 700;
}
p { margin: 0; }
a { color: var(--cinnabar-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: 28px;
}
.eyebrow {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 28px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--cinnabar-deep); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--color-text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--color-primary); color: var(--cinnabar-deep); }
.btn-light { background: rgba(255,255,255,.12); color: var(--on-dark); border-color: rgba(240,228,200,.5); }
.btn-light:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }

/* ---------- announcement bar ---------- */
.announce {
  background: var(--ink-deep);
  color: var(--on-dark);
  text-align: center;
  font-size: .8rem;
  letter-spacing: .06em;
  padding: 8px 16px;
}
.announce b { color: var(--gold-soft); font-weight: 600; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 239, 227, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--cinnabar-deep);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: .58rem;
  letter-spacing: .3em;
  color: var(--gold-deep);
  font-weight: 500;
  margin-top: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.nav-links a {
  color: var(--color-text);
  font-size: .92rem;
  padding: 9px 13px;
  border-radius: 999px;
  font-weight: 500;
}
.nav-links a:hover { background: var(--paper-deep); text-decoration: none; }
.nav-links a.cta {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.nav-links a.cta:hover { background: var(--cinnabar-deep); color:#fff; }
.nav-icons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.icon-btn:hover { background: var(--paper-deep); }
.icon-btn svg { width: 21px; height: 21px; }
.cart-count {
  position: absolute; top: 4px; right: 4px;
  background: var(--color-primary); color: #fff;
  font-size: .62rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.menu-toggle { display: none; }

/* mobile menu */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }
.mobile-menu {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 8px 0 18px;
}
.mobile-menu a {
  display: block;
  padding: 13px 28px;
  color: var(--color-text);
  font-size: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- section scaffolding ---------- */
.section { padding: 84px 0; }
.section.tight { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--color-muted-text); margin-top: 8px; max-width: 560px; }
.section-head .link-more {
  flex: none;
  font-size: .9rem;
  font-weight: 600;
  color: var(--cinnabar-deep);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}
.alt-bg { background: var(--paper-deep); }
.surface-bg { background: var(--color-surface); }

/* ---------- trust strip ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border-block: 1px solid var(--color-border);
  background: rgba(255,253,248,.6);
  padding: 26px 0;
}
.trust .item { display: flex; align-items: center; gap: 14px; justify-content: center; }
.trust svg { width: 30px; height: 30px; color: var(--gold-deep); flex: none; }
.trust b { display: block; font-size: .92rem; }
.trust span { font-size: .78rem; color: var(--color-muted-text); }

/* ---------- product cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.p-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.p-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  text-decoration: none;
}
.p-media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--teal-soft); }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.p-card:hover .p-media img { transform: scale(1.05); }
.p-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink-deep); color: var(--gold-soft);
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.p-badge.hot { background: var(--color-primary); color: #fff; }
.p-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.p-name { font-family: var(--font-display); font-size: 1.06rem; color: var(--color-text); }
.p-sans { font-size: .78rem; color: var(--gold-deep); letter-spacing: .04em; }
.p-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.p-price { font-weight: 700; color: var(--cinnabar-deep); font-size: 1.05rem; }
.p-zodiac { display: flex; gap: 4px; }
.p-zodiac span {
  font-size: .66rem; font-weight: 700;
  border: 1px solid var(--line-strong);
  color: var(--teal-deep);
  border-radius: 999px; padding: 2px 8px;
}
.stars { color: var(--gold); font-size: .78rem; letter-spacing: 1px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--on-dark-muted);
  margin-top: 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 64px 0 44px;
}
.site-footer .brand { color: var(--gold-soft); }
.site-footer h4 {
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--on-dark-muted); font-size: .9rem; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-about p { font-size: .87rem; margin: 14px 0 18px; max-width: 320px; }
.social { display: flex; gap: 10px; }
.social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(240,228,200,.3);
  display: inline-flex; align-items: center; justify-content: center;
}
.social a:hover { border-color: var(--gold); color: var(--gold-soft); }
.social svg { width: 17px; height: 17px; }
.newsletter { display: flex; gap: 8px; margin-top: 6px; }
.newsletter input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(240,228,200,.25);
  border-radius: 999px;
  color: var(--on-dark);
  padding: 11px 18px;
}
.newsletter input::placeholder { color: var(--on-dark-muted); }
.footer-bottom {
  border-top: 1px solid rgba(240,228,200,.15);
  padding: 20px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .78rem;
}
.footer-bottom .policies { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- generic chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600;
  border-radius: 999px; padding: 4px 12px;
  background: var(--teal-soft); color: var(--teal-deep);
}
.divider-orn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold); margin: 0 auto;
}
.divider-orn::before, .divider-orn::after {
  content: ""; height: 1px; width: 70px; background: var(--line-strong);
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav { gap: 12px; min-height: 64px; }
  .section { padding: 58px 0; }
  .section-head h2 { font-size: 1.6rem; }
  .container { padding-inline: 20px; }
  .trust { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem;
  transform: translateY(-220%);
  z-index: 100;
  background: var(--color-primary); color: #fff;
  padding: 10px 18px; border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
