/* 中草堂 zhongyao.us — 全站样式 */
:root {
    --primary-color: #2e5b45;
    --primary-dark: #1f4232;
    --accent-color: #c9a45c;
    --seal: #b2452f;
    --ochre: #b8893a;
    --paper: #f8f4ea;
    --paper-2: #f1eadb;
    --card: #fffdf8;
    --ink: #2b2a26;
    --ink-2: #5c574c;
    --line: #e2d8c3;
    --dark-color: #1d2a23;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 6px 24px rgba(43, 42, 38, .08);
    --transition: all .25s ease;
    --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.8;
    color: var(--ink);
    background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--seal); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.35; margin: 0 0 .6em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.3em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary-color); color: #fff; padding: 8px 14px; z-index: 999; }
.skip-link:focus { left: 10px; }

/* ---------- Topbar & Header ---------- */
.topbar { background: var(--dark-color); color: rgba(255,255,255,.82); font-size: .86rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: var(--accent-color); }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.logo a { display: flex; align-items: center; gap: 12px; color: var(--primary-color); text-decoration: none; transition: opacity .3s; }
.logo a:hover { opacity: .8; color: var(--primary-color); }
.logo-seal { width: 46px; height: 46px; flex: 0 0 46px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .12em; color: var(--ink); }
.logo-text small { font-size: .74rem; color: var(--ink-2); letter-spacing: .08em; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); font-size: .98rem; }
.main-nav a:hover, .main-nav a.active { background: var(--paper-2); color: var(--primary-color); }
.nav-call { background: var(--seal); color: #fff !important; border-radius: 999px; padding: 8px 16px; white-space: nowrap; font-weight: 600; }
.nav-call:hover { background: #8f3523; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px; font-weight: 600; border: 2px solid transparent; cursor: pointer; font-size: 1rem; line-height: 1.2; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-seal { background: var(--seal); color: #fff; }
.btn-seal:hover { background: #8f3523; color: #fff; }
.btn-ghost { border-color: currentColor; color: var(--primary-color); background: transparent; }
.btn-ghost:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.btn-light { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-light:hover { background: #fff; color: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--dark-color); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,32,26,.92) 0%, rgba(20,32,26,.6) 55%, rgba(20,32,26,.15) 100%); }
.hero .container { position: relative; z-index: 2; padding-top: 88px; padding-bottom: 96px; }
.hero h1 { color: #fff; max-width: 680px; }
.hero .lead { font-size: 1.12rem; max-width: 600px; color: rgba(255,255,255,.88); }
.hero-tag { display: inline-block; font-size: .85rem; letter-spacing: .2em; color: var(--accent-color); margin-bottom: 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div { font-family: var(--serif); }
.hero-stats b { display: block; font-size: 1.9rem; color: var(--accent-color); }
.hero-stats span { font-size: .88rem; color: rgba(255,255,255,.8); font-family: var(--sans); }

.page-hero { background: var(--primary-dark); color: #fff; padding: 46px 0 40px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border: 2px solid rgba(201,164,92,.25); border-radius: 50%; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 760px; margin: 0; }
.breadcrumb { font-size: .86rem; margin-bottom: 12px; color: rgba(255,255,255,.75); }
.breadcrumb a { color: var(--accent-color); }
.breadcrumb span.sep { margin: 0 6px; opacity: .6; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head .kicker { font-size: .82rem; letter-spacing: .25em; color: var(--seal); display: block; margin-bottom: 6px; }
.section-head p { color: var(--ink-2); }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: var(--transition); }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.cat-tile figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.cat-tile figure img { width: 100%; height: 100%; object-fit: cover; }
.cat-art { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 3.2rem; color: rgba(255,255,255,.92); letter-spacing: .15em; }
.cat-tile .body { padding: 18px 20px 20px; }
.cat-tile h3 { margin-bottom: .3em; }
.cat-tile p { font-size: .93rem; color: var(--ink-2); margin: 0; }
.cat-tile .count { font-size: .8rem; color: var(--seal); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: .95rem; }
.chip:hover, .chip.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.chip small { color: var(--ochre); margin-left: 4px; }
.chip:hover small, .chip.active small { color: var(--accent-color); }

/* Product cards */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.prod-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; transition: var(--transition); }
.prod-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.prod-card .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.prod-card .name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.prod-card .meta { font-size: .8rem; color: var(--ink-2); }
.prod-card .price { margin-top: auto; padding-top: 6px; font-size: .9rem; color: var(--seal); font-weight: 600; }
.prod-card .price.ask { color: var(--primary-color); }

/* Herb name card (产品图占位) */
.herb-art { position: relative; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 55%), var(--art-bg, #e9dfc8); color: var(--art-ink, #3a3428); }
.herb-art::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(58,52,40,.18); border-radius: 6px; }
.herb-art .art-name { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: .12em; line-height: 1.25; position: relative; }
.herb-art .art-sub { font-size: .76rem; letter-spacing: .12em; opacity: .75; margin-top: 6px; position: relative; }
.herb-art .art-seal { position: absolute; right: 16px; bottom: 16px; width: 30px; height: 30px; border-radius: 4px; background: var(--seal); color: #fff; font-family: var(--serif); font-size: .72rem; line-height: 1; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; letter-spacing: .05em; opacity: .9; }
.herb-art.lg .art-name { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.herb-art.lg .art-sub { font-size: .9rem; }
.herb-art.lg .art-seal { width: 46px; height: 46px; font-size: .95rem; right: 24px; bottom: 24px; }
.prod-card .herb-art .art-name { font-size: 1.55rem; }
.tone-herb { --art-bg: #e7dcc2; }
.tone-tonic { --art-bg: #ecd8b8; }
.tone-seafood { --art-bg: #e3d6c6; }
.tone-food { --art-bg: #efd9cf; }
.tone-tea { --art-bg: #d9e2cf; }
.tone-flower { --art-bg: #efd7dc; }
.tone-wellness { --art-bg: #dfe0c9; }

/* Shop toolbar */
.shop-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.shop-search { flex: 1 1 260px; position: relative; }
.shop-search input { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 1rem; background: var(--card); font-family: inherit; }
.shop-search input:focus { outline: 2px solid var(--accent-color); border-color: transparent; }
.shop-count { color: var(--ink-2); font-size: .9rem; }
.shop-group { margin-bottom: 44px; }
.shop-group > h2 { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.shop-group > h2 small { font-size: .85rem; color: var(--ink-2); font-family: var(--sans); font-weight: 400; }
.shop-group > h2 a { margin-left: auto; font-size: .88rem; font-family: var(--sans); font-weight: 400; }
.no-result { display: none; text-align: center; padding: 40px; color: var(--ink-2); }

/* ---------- Product detail ---------- */
.product-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; }
.product-figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.product-figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.figure-note { font-size: .78rem; color: var(--ink-2); padding: 8px 12px; border-top: 1px solid var(--line); margin: 0; }
.product-summary h1 { margin-bottom: .15em; }
.product-summary .subtitle { color: var(--ink-2); margin-bottom: 18px; }
.spec { width: 100%; border-collapse: collapse; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec th, .spec td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .95rem; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { width: 92px; background: var(--paper-2); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.price-box { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.price-box .amount { font-size: 1.6rem; color: var(--seal); font-weight: 700; font-family: var(--serif); }
.price-box .note { font-size: .82rem; color: var(--ink-2); }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.toxic-flag { display: inline-block; background: #fbe9e4; color: var(--seal); border: 1px solid #efc3b8; font-size: .8rem; padding: 2px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; font-family: var(--sans); font-weight: 600; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin-top: 44px; }
.prose h2 { margin-top: 1.6em; padding-left: 14px; border-left: 4px solid var(--seal); font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.3em; }
.prose ul li { margin-bottom: .45em; }
.prose blockquote { margin: 1.2em 0; padding: 14px 18px; background: var(--paper-2); border-left: 4px solid var(--accent-color); border-radius: 0 var(--radius) var(--radius) 0; }
.pair-list { list-style: none; padding: 0; }
.pair-list li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.pair-list b { color: var(--primary-color); font-family: var(--serif); }
.notice { background: #fff7e8; border: 1px solid #ecd6a6; border-radius: var(--radius); padding: 14px 18px; font-size: .92rem; color: #6a5426; margin: 20px 0; }
.notice.danger { background: #fdf0ec; border-color: #efc3b8; color: #7d3324; }
.notice strong { color: inherit; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; color: var(--seal); font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--ink-2); }

.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.side-box h3 { font-size: 1.05rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.side-box p { font-size: .92rem; margin-bottom: .6em; }
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.side-box li:last-child { border-bottom: 0; }
.side-box .btn { width: 100%; justify-content: center; margin-top: 6px; }
.side-call { background: var(--primary-dark); color: #fff; border: 0; }
.side-call h3 { color: #fff; border-color: rgba(255,255,255,.2); }
.side-call a.tel { font-size: 1.35rem; font-family: var(--serif); color: var(--accent-color); font-weight: 700; }

/* ---------- Features / about ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--paper-2); color: var(--seal); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.feature p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--seal); font-weight: 700; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.post-card:hover { box-shadow: var(--shadow); color: var(--ink); }
.post-card .cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .cover .cat-art { aspect-ratio: auto; height: 100%; font-size: 2rem; }
.post-card .body { padding: 18px 20px 22px; }
.post-card .tag { font-size: .8rem; color: var(--seal); }
.post-card h3 { margin: .3em 0 .4em; }
.post-card p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.article { max-width: 820px; }
.article .meta { color: var(--ink-2); font-size: .9rem; margin-bottom: 24px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.info-card dl { margin: 0; }
.info-card dt { font-weight: 700; color: var(--ink-2); font-size: .88rem; margin-top: 14px; }
.info-card dt:first-child { margin-top: 0; }
.info-card dd { margin: 2px 0 0; font-size: 1.05rem; }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; }
.contact-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { font-size: .9rem; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 4px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent-color); border-color: transparent; }
.contact-form button { justify-self: start; }
.map-wrap { margin-top: 20px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 320px; border: 0; display: block; }

/* CTA band */
.cta-band { background: var(--primary-color); color: #fff; padding: 46px 0; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .2em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); }

/* ---------- Footer (标准模板) ---------- */
footer { background: var(--dark-color); color: var(--white); padding: 3rem 0 1rem; margin-top: 4rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h3 { color: var(--white); margin-bottom: 1rem; font-size: 1.2rem; }
.footer-section p, .footer-section a { color: rgba(255, 255, 255, 0.8); line-height: 1.8; }
.footer-section a:hover { color: var(--accent-color); }
.footer-section p { margin: 0 0 .5rem; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6); }
.footer-bottom p { margin-bottom: 0.5rem; }
.footer-partner { margin-top: 1rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
.footer-partner a { color: var(--accent-color); text-decoration: none; transition: var(--transition); }
.footer-partner a:hover { color: var(--white); }
.footer-disclaimer { font-size: .82rem; color: rgba(255,255,255,.55); max-width: 860px; margin: 0 auto 1rem; }

.float-call { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .product-top, .contact-grid, .split { grid-template-columns: 1fr; }
    .product-figure { max-width: 460px; }
}
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
    .main-nav a { padding: 12px 10px; border-bottom: 1px solid var(--paper-2); }
    .header-call { display: none; }
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .section { padding: 46px 0; }
    .hero .container { padding-top: 56px; padding-bottom: 64px; }
    .hero-stats { gap: 22px; }
    .topbar .addr { display: none; }
    .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .prod-card .herb-art .art-name { font-size: 1.3rem; }
    .contact-form .row2 { grid-template-columns: 1fr; }
    .herb-art.lg { aspect-ratio: 16 / 9; }
    .spec th { width: 76px; }
    .float-call { display: flex; position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--seal); color: #fff; border-radius: 999px; padding: 12px 18px; box-shadow: 0 6px 18px rgba(0,0,0,.25); font-weight: 700; }
    .float-call:hover { color: #fff; }
    footer { padding-bottom: 4.5rem; }
}
