:root {
  --bg: #faf8f3;
  --paper: #ffffff;
  --ink: #292821;
  --muted: #7d786c;
  --line: #e9e3d6;
  --green: #2f5d4f;
  --green-deep: #21483d;
  --green-soft: #eaf1eb;
  --gold: #b18e57;
  --gold-soft: #f5eee0;
  --radius: 16px;
  --shadow: 0 12px 36px rgba(47, 93, 79, .08);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* notice */
.notice-bar { background: var(--green-deep); color: #f6f1e5; text-align: center; font-size: 13px; padding: 7px 16px; letter-spacing: .3px; }
.notice-dot { display: inline-block; width: 6px; height: 6px; background: #d9bd83; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 243, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--green); color: #f7efdd; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; }
.nav { display: flex; gap: 34px; font-size: 14px; color: #555047; }
.nav a:hover { color: var(--green); }
.cart-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--green); padding: 9px 15px; border-radius: 999px; font-size: 14px; transition: .2s; }
.cart-btn:hover { border-color: var(--green); box-shadow: var(--shadow); }
.cart-count { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; display: grid; place-items: center; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 78px 0 70px; background: linear-gradient(120deg, #faf8f3 0%, #f3f1e8 55%, #eaf1eb 100%); }
.hero-deco { position: absolute; border-radius: 50%; pointer-events: none; }
.hero-deco-1 { width: 460px; height: 460px; border: 1px solid rgba(177,142,87,.16); right: -120px; top: -190px; }
.hero-deco-2 { width: 300px; height: 300px; background: rgba(47,93,79,.04); left: -140px; bottom: -160px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 50px; position: relative; }
.eyebrow { font-size: 11px; letter-spacing: 3px; color: var(--gold); font-weight: 600; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-family: var(--serif); font-size: clamp(38px, 5vw, 62px); line-height: 1.3; margin: 0 0 20px; letter-spacing: 2px; color: var(--green-deep); font-weight: 600; }
.hero-copy > p { color: var(--muted); font-size: 16px; max-width: 470px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 26px; border-radius: 999px; border: 1px solid transparent; font-size: 14px; transition: .2s; font-weight: 500; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(47,93,79,.2); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); background: rgba(255,255,255,.6); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-block { width: 100%; }
.hero-points { display: flex; align-items: center; gap: 14px; margin-top: 34px; color: var(--muted); font-size: 12px; letter-spacing: 2px; }
.hero-points i { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.hero-art { height: 380px; position: relative; display: grid; place-items: center; }
.hero-circle { position: absolute; width: 330px; height: 330px; border-radius: 50%; background: linear-gradient(145deg, #e6eee4, #d8e4d8); box-shadow: inset 0 0 60px rgba(255,255,255,.7); }
.hero-bottle { position: relative; width: 132px; display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 18px 26px rgba(33,72,61,.22)); }
.bottle-cap { width: 62px; height: 34px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #8d6f3d, #b59258); }
.bottle-neck { width: 44px; height: 18px; background: #d9c9a8; border-radius: 2px; }
.bottle-body { width: 132px; height: 196px; border-radius: 20px 20px 26px 26px; background: linear-gradient(135deg, #2f5d4f, #21483d); border: 3px solid rgba(255,255,255,.22); display: grid; place-items: center; }
.bottle-label { width: 94px; height: 128px; background: #f6f0e2; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--green-deep); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.bottle-label span { font-family: var(--serif); font-size: 46px; line-height: 1; }
.bottle-label small { font-size: 11px; letter-spacing: 3px; color: var(--gold); }
.hero-leaf { position: absolute; color: rgba(177,142,87,.6); font-size: 22px; }
.leaf-1 { top: 48px; right: 12%; }
.leaf-2 { bottom: 62px; left: 8%; font-size: 16px; }

/* features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 36px; padding-bottom: 46px; }
.feature { display: flex; align-items: center; gap: 14px; }
.feature-icon { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: 21px; }
.feature div { display: flex; flex-direction: column; }
.feature strong { font-size: 15px; letter-spacing: 1px; }
.feature small { color: var(--muted); font-size: 12px; }

/* sections */
.section { padding: 76px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; flex-wrap: wrap; }
.section-head.center { justify-content: center; text-align: center; }
.section-head h2 { font-family: var(--serif); font-size: 36px; margin: 0 0 8px; letter-spacing: 3px; font-weight: 600; color: var(--green-deep); }
.section-head p { margin: 0; color: var(--muted); }
.filter { display: flex; gap: 8px; flex-wrap: wrap; }
.filter button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 999px; font-size: 13px; transition: .2s; }
.filter button:hover { border-color: var(--green); color: var(--green); }
.filter button.active { background: var(--green); border-color: var(--green); color: #fff; }
.loading, .empty-state { text-align: center; color: var(--muted); padding: 70px 0; }

/* products */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .25s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.product-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #eef2ea, #e6ece1); display: grid; place-items: center; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-image img { transform: scale(1.05); }
.image-placeholder { font-family: var(--serif); font-size: 50px; color: rgba(47,93,79,.25); }
.product-tag { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 999px; letter-spacing: 1px; }
.product-info { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-category { font-size: 11px; letter-spacing: 2px; color: var(--gold); margin-bottom: 6px; }
.product-name { font-family: var(--serif); font-size: 19px; margin: 0 0 6px; letter-spacing: 1px; }
.product-subtitle { color: var(--muted); font-size: 13px; margin: 0 0 14px; line-height: 1.6; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { color: var(--green); font-size: 22px; font-weight: 600; font-family: var(--serif); }
.price small { font-size: 13px; margin-right: 2px; }
.price-old { color: #aaa49a; text-decoration: line-through; font-size: 13px; margin-left: 8px; }
.add-btn { border: none; background: var(--green-soft); color: var(--green); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; display: grid; place-items: center; transition: .2s; line-height: 1; }
.add-btn:hover { background: var(--green); color: #fff; }
.stock-out { opacity: .6; cursor: not-allowed; }

/* about */
.about { background: #f2efe6; position: relative; overflow: hidden; }
.about-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.about-art { height: 360px; position: relative; display: grid; place-items: center; }
.about-orb { width: 290px; height: 290px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7f3e8, #dfe6d6); box-shadow: 0 20px 50px rgba(47,93,79,.1); }
.about-seal { position: absolute; width: 120px; height: 120px; border: 2px solid var(--green); color: var(--green); border-radius: 8px; display: grid; place-items: center; font-family: var(--serif); font-size: 30px; line-height: 1.2; text-align: center; background: rgba(255,255,255,.55); transform: rotate(-6deg); }
.about-copy h2 { font-family: var(--serif); font-size: 36px; margin: 0 0 20px; letter-spacing: 3px; color: var(--green-deep); }
.about-intro { color: #5f5a50; font-size: 15px; line-height: 2.1; white-space: pre-wrap; }
.about-quote { font-family: var(--serif); font-size: 17px; color: var(--gold); margin: 26px 0; letter-spacing: 1px; }
.about-stats { display: flex; gap: 40px; border-top: 1px solid var(--line); padding-top: 24px; }
.about-stats div { display: flex; flex-direction: column; }
.about-stats strong { font-family: var(--serif); font-size: 24px; color: var(--green); }
.about-stats small { color: var(--muted); font-size: 12px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.contact-icon { width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-family: var(--serif); font-size: 18px; }
.contact-card small { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.contact-card strong { font-size: 15px; word-break: break-all; font-weight: 600; }
.wechat-line { text-align: center; margin-top: 22px; color: var(--muted); }

/* footer */
.site-footer { background: var(--green-deep); color: rgba(255,255,255,.78); padding: 44px 0; font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner strong { font-family: var(--serif); color: #fff; font-size: 18px; letter-spacing: 2px; }
.footer-inner p { margin: 4px 0 0; color: rgba(255,255,255,.55); }
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: #fff; }
.footer-inner > small { width: 100%; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; color: rgba(255,255,255,.45); font-size: 12px; }

/* drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(20,30,25,.4); z-index: 80; backdrop-filter: blur(2px); }
.cart-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: var(--paper); z-index: 90; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.12); animation: slideIn .25s ease; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-family: var(--serif); font-size: 22px; }
.icon-btn { border: none; background: transparent; font-size: 28px; color: var(--muted); line-height: 1; padding: 0 4px; }
.icon-btn:hover { color: var(--ink); }
.drawer-body { flex: 1; overflow: auto; padding: 12px 24px; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item img, .cart-item .cart-ph { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--green-soft); flex: none; display: grid; place-items: center; color: var(--green); font-family: var(--serif); font-size: 26px; }
.cart-item-main { flex: 1; min-width: 0; }
.cart-item-main strong { display: block; font-size: 14px; }
.cart-item-main small { color: var(--muted); }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 24px; height: 24px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: var(--green); line-height: 1; }
.qty span { min-width: 18px; text-align: center; }
.cart-price { color: var(--green); font-weight: 600; }
.cart-empty { text-align: center; color: var(--muted); padding: 90px 0; }
.drawer-foot { padding: 20px 24px 26px; border-top: 1px solid var(--line); }
.total-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.total-line strong { font-size: 26px; color: var(--green); font-family: var(--serif); }

/* modal */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,30,25,.5); backdrop-filter: blur(3px); }
.modal-panel { position: relative; background: var(--paper); border-radius: 20px; width: min(880px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 70px rgba(0,0,0,.2); animation: pop .22s ease; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; right: 18px; top: 14px; z-index: 2; }
.product-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.product-modal-gallery { background: #f3f1e9; min-height: 440px; display: grid; place-items: center; padding: 26px; }
.product-modal-gallery img { max-height: 420px; width: 100%; object-fit: contain; border-radius: 12px; }
.product-modal-gallery .image-placeholder { font-size: 90px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.gallery-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--green); }
.product-modal-info { padding: 44px 38px; }
.product-modal-info h2 { font-family: var(--serif); font-size: 30px; margin: 8px 0 10px; letter-spacing: 1px; }
.modal-desc { color: var(--muted); white-space: pre-wrap; line-height: 1.9; }
.modal-price { font-family: var(--serif); font-size: 32px; color: var(--green); margin: 22px 0 6px; }
.spec-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.spec-list button { border: 1px solid var(--line); background: #fff; padding: 6px 14px; border-radius: 8px; color: var(--muted); }
.spec-list button.active { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.modal-actions { display: flex; gap: 12px; margin-top: 26px; }
.modal-actions .btn-primary { flex: 1; }
.checkout-modal { width: min(480px, 100%); padding: 34px; }
.checkout-modal h3 { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
.modal-sub { color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.checkout-summary { background: #f7f5ee; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; font-size: 13px; }
.checkout-summary div { display: flex; justify-content: space-between; padding: 3px 0; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #555047; }
.form input, .form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fff; color: var(--ink); outline: none; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,79,.08); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--green-deep); color: #fff; padding: 12px 24px; border-radius: 999px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 14px; animation: pop .2s ease; }

@media (max-width: 980px) {
  .nav { display: none; }
  .hero-inner, .about-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-art { height: 320px; }
  .product-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .product-modal-body { grid-template-columns: 1fr; }
  .product-modal-gallery { min-height: 300px; }
  .product-modal-info { padding: 28px 24px 36px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 28px); }
  .header-inner { height: 66px; }
  .brand-text small { display: none; }
  .cart-btn span:not(.cart-count) { display: none; }
  .hero { padding: 52px 0 46px; }
  .hero h1 { font-size: 36px; }
  .section { padding: 56px 0; }
  .section-head h2, .about-copy h2 { font-size: 30px; }
  .product-grid, .contact-grid, .features { grid-template-columns: 1fr; }
  .feature { padding: 8px 0; }
  .about-stats { gap: 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================
   店铺装修：8 套排版 + 8 种背景
   ========================================================== */

/* --- 排版 1：经典陈列（默认样式） --- */

/* --- 排版 2：杂志大图 --- */
body.layout-2 .product-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 30px; }
body.layout-2 .product-card { border: none; background: transparent; box-shadow: none; }
body.layout-2 .product-card:hover { box-shadow: none; }
body.layout-2 .product-image { aspect-ratio: 16 / 10; border-radius: 14px; }
body.layout-2 .product-info { padding: 18px 4px 0; }
body.layout-2 .product-name { font-size: 25px; }
body.layout-2 .product-subtitle { font-size: 14px; }
body.layout-2 .price { font-size: 27px; }

/* --- 排版 3：清爽列表 --- */
body.layout-3 .product-grid { grid-template-columns: 1fr; gap: 0; }
body.layout-3 .product-card { flex-direction: row; align-items: stretch; border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 18px 0; }
body.layout-3 .product-card:hover { transform: none; box-shadow: none; background: rgba(255,255,255,.35); }
body.layout-3 .product-image { width: 190px; height: 142px; aspect-ratio: auto; flex: none; border-radius: 10px; }
body.layout-3 .product-info { padding: 10px 24px; }
body.layout-3 .product-name { font-size: 21px; }
body.layout-3 .product-subtitle { margin-bottom: 10px; }
body.layout-3 .product-bottom { max-width: 340px; }

/* --- 排版 4：画廊细框 --- */
body.layout-4 .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.layout-4 .product-card { border: 1px solid var(--gold); background: var(--paper); text-align: center; }
body.layout-4 .product-image { aspect-ratio: 1 / 1; margin: 12px 12px 0; border-radius: 4px; }
body.layout-4 .product-info { align-items: center; padding: 16px 14px 22px; }
body.layout-4 .product-name { font-size: 20px; }
body.layout-4 .product-bottom { flex-direction: column; gap: 12px; }

/* --- 排版 5：紧凑货架 --- */
body.layout-5 .product-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
body.layout-5 .product-card { border-radius: 10px; }
body.layout-5 .product-image { aspect-ratio: 1 / 1; }
body.layout-5 .product-info { padding: 12px; }
body.layout-5 .product-name { font-size: 15px; letter-spacing: 0; }
body.layout-5 .product-subtitle, body.layout-5 .price-old { display: none; }
body.layout-5 .product-category { font-size: 10px; margin-bottom: 3px; }
body.layout-5 .price { font-size: 18px; }
body.layout-5 .add-btn { width: 28px; height: 28px; font-size: 16px; }

/* --- 排版 6：焦点专题 --- */
body.layout-6 .product-grid { grid-template-columns: repeat(3, 1fr); }
body.layout-6 .product-card:first-child { grid-column: span 2; flex-direction: row; }
body.layout-6 .product-card:first-child .product-image { width: 50%; aspect-ratio: auto; flex: none; }
body.layout-6 .product-card:first-child .product-info { justify-content: center; padding: 28px; }
body.layout-6 .product-card:first-child .product-name { font-size: 28px; }
body.layout-6 .product-card:first-child .product-subtitle { font-size: 15px; }
body.layout-6 .product-card:first-child .price { font-size: 30px; }

/* --- 排版 7：错落拼贴 --- */
body.layout-7 .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
body.layout-7 .product-card { border: none; background: #f1f4ee; }
body.layout-7 .product-card:nth-child(even) { background: #f7f1e6; }
body.layout-7 .product-card:nth-child(3n+2) { transform: translateY(30px); }
body.layout-7 .product-card:nth-child(3n) { transform: translateY(15px); }
body.layout-7 .product-card:hover { transform: translateY(20px); }

/* --- 排版 8：深色雅集 --- */
body.layout-8 .product-card { background: #264a3d; border-color: #264a3d; }
body.layout-8 .product-card:hover { border-color: var(--gold); }
body.layout-8 .product-name, body.layout-8 .product-category { color: #f2e9d6; }
body.layout-8 .product-subtitle { color: #bccdc0; }
body.layout-8 .price { color: #e8cb8e; }
body.layout-8 .price-old { color: #93a89a; }
body.layout-8 .add-btn { background: rgba(255,255,255,.12); color: #e8cb8e; }
body.layout-8 .add-btn:hover { background: var(--gold); color: #1c362c; }
body.layout-8 .image-placeholder { color: rgba(255,255,255,.22); }

/* --- 背景 1：米白原色（默认） --- */
body.bg-1 { --bg: #faf8f3; --paper: #ffffff; --ink: #292821; --muted: #7d786c; --line: #e9e3d6; --hero-a: #faf8f3; --hero-c: #f3f1e8; --hero-b: #eaf1eb; --alt: #f2efe6; }

/* --- 背景 2：春绿 --- */
body.bg-2 { --bg: #f1f6f0; --paper: #ffffff; --ink: #26302a; --muted: #768379; --line: #dfe9df; --hero-a: #f1f6f0; --hero-c: #e3efe2; --hero-b: #d8e8d8; --alt: #e6f0e4; }

/* --- 背景 3：暖棕 --- */
body.bg-3 { --bg: #faf5ed; --paper: #fffdf9; --ink: #322b23; --muted: #84786a; --line: #eae0d1; --hero-a: #faf5ed; --hero-c: #f3e7d5; --hero-b: #ebdac3; --alt: #f3e9d9; }

/* --- 背景 4：豆沙 --- */
body.bg-4 { --bg: #fbf4f2; --paper: #ffffff; --ink: #332827; --muted: #877571; --line: #eddfdc; --hero-a: #fbf4f2; --hero-c: #f4e2df; --hero-b: #eed6d2; --alt: #f7e8e5; }

/* --- 背景 5：云雾蓝 --- */
body.bg-5 { --bg: #f3f7fa; --paper: #ffffff; --ink: #26313a; --muted: #75838e; --line: #dfe7ee; --hero-a: #f3f7fa; --hero-c: #e2ecf3; --hero-b: #d8e7f0; --alt: #e9f0f5; }

/* --- 背景 6：宣纸黄 --- */
body.bg-6 { --bg: #faf6e9; --paper: #fffdf4; --ink: #332f22; --muted: #857d66; --line: #ebe3ca; --hero-a: #faf6e9; --hero-c: #f3ead0; --hero-b: #eee1bd; --alt: #f5edd8; }

/* --- 背景 7：墨绿夜 --- */
body.bg-7 { --bg: #1c2b26; --paper: #243a33; --ink: #f2eee3; --muted: #b3c1b8; --line: rgba(255,255,255,.15); --hero-a: #1c2b26; --hero-c: #243b32; --hero-b: #2d493d; --alt: #21362d; }
body.bg-7 .hero h1, body.bg-7 .section-head h2, body.bg-7 .about-copy h2 { color: #ecdfc2; }
body.bg-7 .feature strong, body.bg-7 .contact-card strong, body.bg-7 .product-name, body.bg-7 .modal-price { color: #ece4d2; }
body.bg-7 .feature small, body.bg-7 .section-head p, body.bg-7 .about-intro, body.bg-7 .product-subtitle, body.bg-7 .hero-copy > p, body.bg-7 .modal-desc { color: #b8c5bb; }
body.bg-7 .btn-ghost { background: rgba(255,255,255,.08); color: #ece4d2; }
body.bg-7 .about-quote { color: #d9bd83; }
body.bg-7 .checkout-summary { background: rgba(255,255,255,.06); color: #d8e0d9; }
body.bg-7 .product-image, body.bg-7 .product-modal-gallery { background: #2e4b3e; }
body.bg-7 .hero-circle { background: linear-gradient(145deg, #2d493d, #233a31); }
body.bg-7 .about-orb { background: radial-gradient(circle at 35% 30%, #335346, #243a31); }
body.bg-7 .site-header { background: rgba(28,43,38,.94); }
body.bg-7 .form input, body.bg-7 .form textarea { background: #2c443a; color: #f0ece0; border-color: rgba(255,255,255,.18); }
body.bg-7 .filter button { border-color: rgba(255,255,255,.2); color: #b8c5bb; }
body.bg-7 .filter button.active { color: #fff; }
body.bg-7 .cart-drawer, body.bg-7 .modal-panel { background: #243a33; color: #f2eee3; }
body.bg-7 .drawer-head, body.bg-7 .drawer-foot { border-color: rgba(255,255,255,.14); }
body.bg-7 .product-modal-info h2, body.bg-7 .checkout-modal h3 { color: #ecdfc2; }

/* --- 背景 8：自定义（颜色 / 图片由后台设置） --- */
body.bg-8 { --bg: var(--custom-1, #faf8f3); --paper: #ffffff; --ink: #292821; --muted: #7d786c; --line: #e9e3d6; --hero-a: var(--custom-1, #faf8f3); --hero-c: var(--custom-2, #f3f1e8); --hero-b: var(--custom-2, #eaf1eb); --alt: var(--custom-2, #f2efe6); }
body.bg-8.has-bg-image { background-image: linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.9)), var(--custom-image); background-size: cover; background-position: center; background-attachment: fixed; }

/* 背景主题的公共覆盖：让渐变区跟随配色 */
body[class*="bg-"] .hero { background: linear-gradient(120deg, var(--hero-a) 0%, var(--hero-c) 55%, var(--hero-b) 100%); }
body[class*="bg-"] .about { background: var(--alt); }
body[class*="bg-"] .site-header { background: color-mix(in srgb, var(--bg) 92%, transparent); }

/* 装修后的响应式适配 */
@media (max-width: 1100px) {
  body.layout-5 .product-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 980px) {
  body.layout-5 .product-grid { grid-template-columns: repeat(3, 1fr); }
  body.layout-4 .product-grid, body.layout-6 .product-grid, body.layout-7 .product-grid { grid-template-columns: repeat(2, 1fr); }
  body.layout-6 .product-card:first-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  body.layout-2 .product-grid, body.layout-4 .product-grid, body.layout-5 .product-grid,
  body.layout-6 .product-grid, body.layout-7 .product-grid { grid-template-columns: 1fr; }
  body.layout-6 .product-card:first-child { grid-column: span 1; flex-direction: column; }
  body.layout-6 .product-card:first-child .product-image { width: 100%; aspect-ratio: 4 / 3; }
  body.layout-6 .product-card:first-child .product-info { padding: 18px; }
  body.layout-3 .product-card { flex-direction: column; }
  body.layout-3 .product-image { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  body.layout-3 .product-info { padding: 14px 4px; }
  body.layout-7 .product-card:nth-child(n) { transform: none; }
  body.layout-7 .product-card:hover { transform: translateY(-4px); }
}
