/* ===========================================================
   EastTreasures · 东方雅物  —  Global Stylesheet
   A calm, ink-wash inspired theme for a cross-border
   Chinese-culture e-commerce site. Fast, responsive, SEO-friendly.
   =========================================================== */

:root {
  --paper:      #f7f3ea;   /* rice-paper background */
  --paper-2:    #efe8d8;   /* slightly deeper paper */
  --ink:        #1f1b16;   /* ink black */
  --ink-soft:   #4a4338;   /* soft ink for body text */
  --cinnabar:   #9e2b25;   /* 朱砂红 cinnabar red */
  --cinnabar-d: #7d211c;
  --gold:       #b08d57;   /* 金 gold */
  --jade:       #5a7a6f;   /* jade accent */
  --line:       #ddd2bb;   /* hairline borders */
  --shadow:     0 6px 24px rgba(31,27,22,.08);
  --maxw:       1180px;
  --serif:      "Cormorant Garamond", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans:       "Noto Serif SC", "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink-soft);
  background: var(--paper);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: .01em;
}

a { color: var(--cinnabar); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cinnabar-d); }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: #e9e2d2;
  font-size: 13px;
  letter-spacing: .04em;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #e9e2d2; }
.topbar a:hover { color: var(--gold); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,243,234,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; }
.brand .name { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1; }
.brand .name small { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .3em; color: var(--gold); margin-top: 3px; }

.menu { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; align-items: center; }
.menu a { color: var(--ink-soft); font-size: 15px; letter-spacing: .03em; }
.menu a:hover, .menu a.active { color: var(--cinnabar); }
.menu-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 2px;
  font-family: var(--serif); font-size: 17px; letter-spacing: .04em;
  border: 1px solid var(--cinnabar); background: var(--cinnabar); color: #fff;
  cursor: pointer; transition: all .2s;
}
.btn:hover { background: var(--cinnabar-d); color: #fff; }
.btn-ghost { background: transparent; color: var(--cinnabar); }
.btn-ghost:hover { background: var(--cinnabar); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #2a2118; }
.btn-gold:hover { background: #9a7843; color: #fff; }

/* ---------- Payment options on product pages ---------- */
.pay-options { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.pay-options .btn { flex: 1 1 160px; text-align: center; }
.pay-options .btn-gold, .pay-options .btn-ghost { flex: 1 1 160px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #fbf8f1 0%, #efe6d4 100%);
  border-bottom: 1px solid var(--line);
}
.hero .motif { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.hero .container { position: relative; padding: 86px 22px 96px; text-align: center; }
.hero .eyebrow { color: var(--gold); letter-spacing: .4em; text-transform: uppercase; font-size: 13px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); margin: 16px 0 10px; }
.hero .lead { max-width: 640px; margin: 0 auto 28px; font-size: 19px; color: var(--ink-soft); }
.hero .seal { display: inline-block; margin-top: 18px; width: 64px; opacity: .9; }

/* ---------- Sections ---------- */
section { padding: 70px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .kicker { color: var(--gold); letter-spacing: .35em; text-transform: uppercase; font-size: 13px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 8px; }
.section-head p { max-width: 600px; margin: 0 auto; color: var(--ink-soft); }
.alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Category cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(31,27,22,.14); }
.card .thumb { aspect-ratio: 4/3; background: var(--paper-2); display: flex; align-items: center; justify-content: center; }
.card .thumb svg { width: 64%; height: 64%; }
.card .body { padding: 18px 20px 22px; }
.card .body h3 { font-size: 22px; margin: 0 0 6px; }
.card .body p { font-size: 15px; margin: 0 0 12px; color: var(--ink-soft); }
.card .body .price { font-family: var(--serif); font-size: 20px; color: var(--cinnabar); }
.card .tag { display: inline-block; font-size: 12px; letter-spacing: .15em; color: var(--gold); text-transform: uppercase; margin-bottom: 6px; }

/* ---------- Product grid (shop) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s; }
.product:hover { transform: translateY(-4px); }
.product .thumb { aspect-ratio: 1/1; background: var(--paper-2); display: flex; align-items: center; justify-content: center; }
.product .thumb svg { width: 60%; height: 60%; }
.product .body { padding: 16px 18px 20px; }
.product .body h3 { font-size: 20px; margin: 0 0 4px; }
.product .body .cat { font-size: 12px; letter-spacing: .15em; color: var(--gold); text-transform: uppercase; }
.product .body .row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.product .body .price { font-family: var(--serif); font-size: 21px; color: var(--cinnabar); }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: 13px; color: var(--ink-soft); padding: 18px 0 0; letter-spacing: .03em; }
.crumb a { color: var(--gold); }
.crumb span { color: var(--ink); }

/* ---------- Two column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .art { background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; aspect-ratio: 5/4; display: flex; align-items: center; justify-content: center; }
.split .art svg { width: 70%; height: 70%; }
.split h2 { font-size: clamp(26px, 3.5vw, 38px); }
.split ul { padding-left: 18px; }
.split li { margin-bottom: 10px; }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.pdp .gallery { background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.pdp .gallery svg { width: 62%; height: 62%; }
.pdp h1 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 6px; }
.pdp .cat { color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: 13px; }
.pdp .price { font-family: var(--serif); font-size: 32px; color: var(--cinnabar); margin: 18px 0; }
.pdp .meta { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin: 22px 0; }
.pdp .meta div { display: flex; justify-content: space-between; font-size: 15px; padding: 5px 0; }
.pdp .meta div span:first-child { color: var(--ink); }
.specs { width: 100%; border-collapse: collapse; margin-top: 10px; }
.specs th, .specs td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.specs th { color: var(--ink); width: 38%; font-weight: 600; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 6px; letter-spacing: .03em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--sans); font-size: 16px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.note { font-size: 13px; color: var(--ink-soft); }
.form-ok { background: #eef3ee; border: 1px solid var(--jade); color: #2f4a40; padding: 14px 16px; border-radius: 3px; margin-bottom: 18px; }

/* ---------- Blog ---------- */
.post { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
.post .thumb { aspect-ratio: 16/9; background: var(--paper-2); display: flex; align-items: center; justify-content: center; }
.post .thumb svg { width: 50%; height: 50%; }
.post .body { padding: 20px 22px 24px; }
.post .body .date { font-size: 13px; color: var(--gold); letter-spacing: .1em; }
.post .body h3 { font-size: 22px; margin: 8px 0 8px; }
.post .body p { font-size: 15px; margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat .num { font-family: var(--serif); font-size: 44px; color: var(--cinnabar); line-height: 1; }
.stat .lbl { font-size: 14px; letter-spacing: .05em; margin-top: 8px; color: var(--ink-soft); }

/* ---------- Newsletter / CTA ---------- */
.cta { background: var(--ink); color: #efe6d4; text-align: center; }
.cta h2 { color: #fff; }
.cta p { max-width: 560px; margin: 0 auto 24px; }
.cta form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.cta input { flex: 1; padding: 13px 14px; border: 0; border-radius: 3px; font-size: 16px; }
.cta .btn { border-color: var(--gold); background: var(--gold); color: #2a2118; }
.cta .btn:hover { background: #9a7843; }

/* ---------- Footer ---------- */
.site-footer { background: #181511; color: #c9bfa9; padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 16px; letter-spacing: .1em; margin: 0 0 14px; font-family: var(--sans); }
.site-footer a { color: #c9bfa9; display: block; margin-bottom: 9px; font-size: 15px; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand .name { color: #fff; }
.site-footer .desc { font-size: 14px; margin: 12px 0; max-width: 280px; }
.social { display: flex; gap: 12px; margin-top: 14px; }
.social a { width: 38px; height: 38px; border: 1px solid #4a4338; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #c9bfa9; }
.social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom { border-top: 1px solid #2c2820; margin-top: 40px; padding-top: 20px; font-size: 13px; text-align: center; color: #8a8170; }

/* ---------- SEO helper (sr-only) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font-size: 96px; color: var(--cinnabar); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .pdp { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 16px 22px; border-bottom: 1px solid var(--line); gap: 14px; }
  .menu.open { display: flex; }
  .menu-toggle { display: block; }
  .cards, .product-grid, .stats, .footer-grid { grid-template-columns: 1fr; }
  .cta form { flex-direction: column; }
  section { padding: 52px 0; }
}
