/* AoXiaoMi — rebuilt static storefront */
:root {
  --ink: #0d131a;
  --ink-2: #2c3540;
  --muted: #6b7280;
  --line: #e8eaee;
  --soft: #f7f8fa;
  --bg: #ffffff;
  --accent: #00b090;
  --accent-dark: #00826c;
  --accent-soft: #e8f8f4;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(13, 19, 26, .06), 0 1px 3px rgba(13, 19, 26, .04);
  --shadow-md: 0 8px 24px rgba(13, 19, 26, .08);
  --container: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; flex: 0 0 auto; }
.brand img { height: 34px; width: auto; }
.brand .brand-fallback {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: #fff; font-size: 16px; font-weight: 800;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 13px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2);
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-dark); background: var(--accent-soft); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; color: var(--ink);
}
.icon-btn:hover { background: var(--soft); }
.menu-btn { display: none; }

.mobile-nav {
  display: none; padding: 8px 0 16px; border-top: 1px solid var(--line);
}
.mobile-nav a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.mobile-nav a:last-child { border-bottom: 0; }
body.nav-open .mobile-nav { display: block; }
@media (max-width: 980px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 44px; background: linear-gradient(180deg, var(--soft) 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -.03em; }
.hero .lede { margin-top: 16px; font-size: clamp(15px, 1.6vw, 18px); color: var(--muted); max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-media { position: relative; }
.hero-frame {
  position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.hero-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 18px;
}
.hero-badge {
  position: absolute; right: 18px; bottom: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 8px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (max-width: 860px) {
  .hero { padding: 36px 0 30px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-frame { max-width: 440px; margin: 0 auto; aspect-ratio: 5 / 4; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; transition: transform .12s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1d2833; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-block { width: 100%; }

/* ---------- sections ---------- */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.link-more { color: var(--accent-dark); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-tile {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-tile .cat-media { position: relative; aspect-ratio: 1 / 1; background: var(--soft); }
.cat-tile .cat-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.cat-tile .cat-label { padding: 12px 14px 15px; border-top: 1px solid var(--line); }
.cat-tile .cat-label strong { display: block; font-size: 15.5px; }
.cat-tile .cat-label span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
@media (max-width: 1080px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; } }

.card { position: relative; display: flex; flex-direction: column; }
.card-media {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: var(--soft); border: 1px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-ribbon {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; letter-spacing: .02em;
}
.card-body { padding: 11px 2px 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12.5px; color: var(--muted); }
.card-price { margin-top: 3px; font-weight: 700; font-size: 15.5px; color: var(--ink); }
.card-price .was { margin-left: 6px; font-weight: 400; font-size: 13px; color: var(--muted); text-decoration: line-through; }

/* ---------- category page ---------- */
.page-head { padding: 34px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.breadcrumb { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--ink); }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); margin-top: 10px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 60em; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); font-size: 14px; }
.filter-input {
  height: 42px; min-width: 240px; flex: 1 1 260px; max-width: 360px;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 14px;
  background: #fff; color: var(--ink);
}
.filter-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13.5px; color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.02fr 1fr; gap: 52px; padding: 30px 0 20px; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 26px; } }
.gallery-main {
  aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: #fff; border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button {
  flex: 0 0 74px; width: 74px; height: 74px; padding: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #fff;
}
.thumbs button[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.pdp-info h1 { font-size: clamp(23px, 2.8vw, 32px); }
.pdp-sub { color: var(--muted); margin-top: 8px; }
.pdp-price { margin-top: 18px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.pdp-price .cur { font-size: 18px; font-weight: 600; margin-right: 4px; color: var(--ink-2); }
.pdp-note { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.pdp-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; max-width: 380px; }
.wechat-box {
  margin-top: 22px; padding: 16px; border: 1px dashed #cfd5dd; border-radius: 12px; background: var(--soft);
}
.wechat-flex { display: flex; gap: 16px; align-items: center; }
.qr-img {
  width: 104px; height: 104px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line); padding: 5px; object-fit: contain; flex: 0 0 auto;
}
.wechat-box .label { font-size: 12.5px; color: var(--muted); }
.wechat-id { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.wechat-id strong { font-size: 17px; letter-spacing: .01em; }
.meta-list { margin-top: 26px; border-top: 1px solid var(--line); }
.meta-row { display: flex; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.meta-row dt { color: var(--muted); width: 84px; flex: 0 0 auto; }
.meta-row dd { margin: 0; color: var(--ink-2); }
.pdp-desc { margin-top: 26px; }
.pdp-desc h2 { font-size: 17px; margin-bottom: 8px; }
.pdp-desc p { color: var(--ink-2); }

/* ---------- about / contact ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.about-card { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.about-card h2 { font-size: 21px; }
.about-card p { margin-top: 12px; color: var(--ink-2); }
.about-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.about-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.about-list li::before { content: "✓"; color: var(--accent); font-weight: 800; }

.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-card h2 { font-size: 21px; }
.contact-card .lead { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.form { margin-top: 20px; display: grid; gap: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font: inherit; font-size: 14.5px; color: var(--ink); background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form-status { font-size: 13.5px; min-height: 20px; }
.form-status[data-state="ok"] { color: var(--accent-dark); }
.form-status[data-state="err"] { color: #c2410c; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--soft); padding: 46px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-grid a { display: block; padding: 4px 0; font-size: 14px; color: var(--ink-2); }
.footer-grid a:hover { color: var(--accent-dark); }
.footer-about { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 32em; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal { margin-top: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(13, 19, 26, .35); backdrop-filter: blur(3px); padding: 80px 20px 20px;
}
.search-overlay.open { display: block; }
.search-panel {
  max-width: 640px; margin: 0 auto; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(13, 19, 26, .25); overflow: hidden;
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-field input { flex: 1; border: 0; font-size: 16px; padding: 6px 0; outline: none; color: var(--ink); }
.search-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.search-hit { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; }
.search-hit:hover, .search-hit:focus { background: var(--soft); outline: none; }
.search-hit img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--soft); flex: 0 0 auto; }
.search-hit .h-name { font-size: 14.5px; font-weight: 600; }
.search-hit .h-meta { font-size: 12.5px; color: var(--muted); }
.search-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- misc ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .22s; z-index: 120;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.notice-bar {
  background: var(--ink); color: #fff; font-size: 12.5px; text-align: center; padding: 7px 16px;
}
.notice-bar a { text-decoration: underline; text-underline-offset: 2px; }
