/* ==========================================================================
   云发卡 · 前台共用样式
   主色 #241160  辅色 #0f8b8d
   ========================================================================== */

:root {
  --primary: #241160;
  --primary-2: #2b1a72;
  --primary-3: #3d258c;
  --accent: #0f8b8d;
  --accent-2: #0b7375;
  --ink: #1d1b2f;
  --muted: #6f6b85;
  --line: #e8e6f0;
  --bg: #f5f5fa;
  --surface: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 26px rgba(36, 17, 96, .07);
  --shadow-lg: 0 16px 40px rgba(36, 17, 96, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }

/* ---------------- 顶部公告 & 导航 ---------------- */
.announcement {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 7px 16px;
  letter-spacing: .3px;
}
.announcement-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #7ff3d0; margin-right: 8px; vertical-align: middle;
  box-shadow: 0 0 8px #7ff3d0;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; gap: 22px;
  min-height: 68px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 800; font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(36, 17, 96, .25);
}
.brand-text { font-size: 19px; font-weight: 800; color: var(--primary); letter-spacing: .5px; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.nav-link {
  white-space: nowrap; padding: 8px 11px; border-radius: 8px;
  color: #4b4763; font-weight: 500; transition: .18s;
}
.nav-link:hover { color: var(--primary); background: #f1eefb; }
.nav-link.active { color: #fff; background: var(--primary); }
.header-search { display: flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #faf9fe; }
.header-search input {
  border: 0; outline: 0; background: transparent; padding: 8px 12px;
  width: 168px; min-width: 0; color: var(--ink);
}
.header-search button {
  border: 0; background: var(--primary); color: #fff; padding: 0 14px; font-weight: 600;
}
.header-search button:hover { background: var(--primary-3); }
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cart-link { font-weight: 600; color: var(--primary); white-space: nowrap; }
.cart-link:hover { color: var(--accent); }
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--accent); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; vertical-align: middle;
}
.admin-link { font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; white-space: nowrap; }
.admin-link:hover { color: var(--accent); }
.user-menu { display: flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 2px; }
.link-btn:hover { color: #c0392b; }

/* ---------------- 通用组件 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
  font-weight: 600; font-size: 14px; transition: .18s; line-height: 1.3;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-3); box-shadow: 0 6px 18px rgba(36,17,96,.22); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: #f1eefb; color: var(--primary); }
.btn-ghost:hover { background: #e6e0f7; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.tag {
  display: inline-flex; align-items: center; font-size: 11px; line-height: 1;
  padding: 4px 7px; border-radius: 5px; font-weight: 600; white-space: nowrap;
}
.tag-soft { background: #f0edf9; color: #6a5aa8; }
.tag-green { background: #e5f8ee; color: #1a8a4b; }
.tag-teal { background: #e3f5f5; color: #0f8b8d; }
.tag-blue { background: #e7f0ff; color: #2b6fc4; }
.tag-gray { background: #eeeef2; color: #888; }
.tag-warn { background: #fff2df; color: #b26b00; }
.form-error { color: #d93025; font-size: 12px; min-height: 18px; margin: 2px 0 4px; }
.page-title { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.page-subtitle { color: var(--muted); margin-bottom: 22px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-title { font-size: 17px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }

/* ---------------- 商品封面 ---------------- */
.store-cover { position: relative; overflow: hidden; background: #eceaf5; }
.store-cover .cover-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.92); font-weight: 800; font-size: 46px;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.store-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------------- 首页 ---------------- */
.hero {
  margin: 24px 0 22px; border-radius: 18px; padding: 40px 44px;
  background: linear-gradient(120deg, #241160 0%, #3a2188 52%, #0f8b8d 130%);
  color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}
.hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 10px; letter-spacing: .5px; }
.hero p { font-size: 15px; opacity: .88; max-width: 560px; }
.hero-features { display: flex; gap: 22px; margin-top: 20px; flex-wrap: wrap; }
.hero-features span { font-size: 13px; opacity: .95; }
.hero-features b { color: #8ff3df; }

.demo-tip {
  margin-bottom: 18px; padding: 11px 16px; border-radius: 10px;
  background: #fff8e8; border: 1px solid #ffe2a8; color: #8a5a00; font-size: 13px;
}
.demo-tip strong { color: #a86a00; }

.category-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.category-tab {
  border: 1px solid var(--line); background: var(--surface); color: #4b4763;
  padding: 8px 18px; border-radius: 20px; font-weight: 600; font-size: 13px; transition: .18s;
}
.category-tab:hover { border-color: var(--primary); color: var(--primary); }
.category-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.toolbar .result-count { color: var(--muted); font-size: 13px; }
.toolbar-search { display: flex; gap: 8px; }
.toolbar-search input {
  border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 12px;
  width: 220px; outline: 0; background: #fff;
}
.toolbar-search input:focus { border-color: var(--accent); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card__cover { height: 158px; }
.product-card__cover .cover-fallback { font-size: 52px; }
.product-card__body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; }
.product-card__title { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.product-card__subtitle {
  color: var(--muted); font-size: 12px; height: 19px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; margin-bottom: 10px;
}
.product-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.product-card__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { color: #e53935; font-size: 19px; font-weight: 800; }
.price small { font-size: 12px; font-weight: 600; }
.buy-btn {
  background: var(--primary); color: #fff; padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
}
.product-card:hover .buy-btn { background: var(--accent); }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0 8px; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line);
  background: #fff; color: #4b4763; border-radius: 8px; font-weight: 600;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state__icon { font-size: 48px; color: #c9c3e0; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }

/* ---------------- 商品详情 ---------------- */
.crumbs { font-size: 12px; color: var(--muted); margin: 20px 0; }
.crumbs a:hover { color: var(--accent); }
.detail-layout { display: grid; grid-template-columns: 440px 1fr; gap: 34px; margin-bottom: 32px; }
.detail-gallery .store-cover {
  width: 100%; height: 360px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.detail-gallery .cover-fallback { font-size: 110px; }
.detail-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.detail-thumbs .store-cover {
  width: 72px; height: 72px; border-radius: 8px; border: 2px solid transparent; cursor: pointer;
}
.detail-thumbs .store-cover.active { border-color: var(--accent); }
.detail-thumbs .cover-fallback { font-size: 30px; }
.detail-info h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.detail-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.detail-price-box {
  background: linear-gradient(90deg, #fff3f2, #fff); border: 1px solid #ffe0dc;
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
}
.detail-price-box .price { font-size: 32px; }
.detail-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.detail-meta span { margin-right: 16px; }
.option-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.option-label { width: 60px; flex-shrink: 0; color: var(--muted); padding-top: 7px; }
.option-values { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-option {
  border: 1.5px solid var(--line); background: #fff; padding: 7px 15px;
  border-radius: 8px; font-weight: 600; color: #4b4763; transition: .15s;
}
.spec-option:hover { border-color: var(--accent); }
.spec-option.active { border-color: var(--primary); color: var(--primary); background: #f3efff; }
.qty-box { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-box button { width: 34px; height: 34px; border: 0; background: #f6f5fb; color: var(--primary); font-size: 18px; }
.qty-box button:hover { background: #eae6f8; }
.qty-box input { width: 46px; height: 34px; border: 0; outline: 0; text-align: center; font-weight: 700; color: var(--ink); }
.detail-actions { display: flex; gap: 12px; margin-top: 22px; }
.detail-actions .btn { padding: 12px 26px; font-size: 15px; }

.detail-content { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 30px; }
.detail-content h2 { font-size: 18px; color: var(--primary); margin-bottom: 14px; }
.rich-text { color: #45415c; font-size: 14px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.rich-text img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

/* ---------------- 购物车 ---------------- */
.cart-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-head, .cart-item {
  display: grid; grid-template-columns: 40px 1fr 140px 130px 110px 60px;
  align-items: center; gap: 12px; padding: 14px 18px;
}
.cart-head { background: #faf9fe; color: var(--muted); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.cart-item { border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item .store-cover { width: 72px; height: 72px; border-radius: 8px; display: inline-block; vertical-align: middle; margin-right: 12px; }
.cart-item .cover-fallback { font-size: 26px; }
.cart-item__name { font-weight: 700; }
.cart-item__spec { color: var(--muted); font-size: 12px; margin-top: 3px; }
.cart-item__price { font-weight: 700; }
.cart-item__subtotal { color: #e53935; font-weight: 800; font-size: 15px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.icon-btn { border: 0; background: none; color: #b0abc4; font-size: 18px; }
.icon-btn:hover { color: #d93025; }
.cart-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0; padding: 18px 22px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); flex-wrap: wrap; gap: 14px;
}
.cart-bar__left { display: flex; align-items: center; gap: 20px; color: var(--muted); }
.cart-bar__total { color: var(--muted); }
.cart-bar__total b { color: #e53935; font-size: 24px; margin-left: 6px; }

/* ---------------- 结算 ---------------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.panel h2 { font-size: 17px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.checkout-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.checkout-item:last-child { border-bottom: 0; }
.checkout-item .store-cover { width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0; }
.checkout-item .cover-fallback { font-size: 22px; }
.checkout-item__info { flex: 1; min-width: 0; }
.checkout-item__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkout-item__spec { color: var(--muted); font-size: 12px; }
.checkout-item__sub { color: #e53935; font-weight: 800; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; color: #4b4763; }
.form-control {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 10px 12px; outline: 0; background: #fcfbff; color: var(--ink);
}
.form-control:focus { border-color: var(--accent); background: #fff; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.segment { display: inline-flex; background: #f1eef9; border-radius: 10px; padding: 4px; gap: 4px; }
.segment button {
  border: 0; background: transparent; padding: 8px 22px; border-radius: 8px;
  font-weight: 600; color: #6a5aa8;
}
.segment button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(36,17,96,.1); }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; }
.pay-methods { display: flex; gap: 12px; }
.pay-method {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px;
  display: flex; align-items: center; gap: 10px; font-weight: 700; transition: .15s; cursor: pointer;
}
.pay-method:hover { border-color: var(--accent); }
.pay-method.active { border-color: var(--primary); background: #f6f3ff; }
.pay-method .pay-icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 800; }
.pay-icon.wechat { background: #09bb07; }
.pay-icon.alipay { background: #1677ff; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: #4b4763; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 700; color: var(--ink); }
.summary-row.total b { color: #e53935; font-size: 26px; }
.checkout-submit { margin-top: 8px; padding: 13px; font-size: 16px; }

/* ---------------- 支付页 ---------------- */
.pay-wrap { max-width: 520px; margin: 26px auto; }
.pay-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px; text-align: center; }
.pay-card h1 { font-size: 21px; color: var(--primary); margin-bottom: 6px; }
.pay-amount { font-size: 34px; font-weight: 800; color: #e53935; margin: 12px 0 4px; }
.pay-countdown { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.pay-countdown b { color: #d93025; font-variant-numeric: tabular-nums; }
.qr-box {
  width: 230px; height: 230px; margin: 0 auto 18px; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qr-box svg { width: 100%; height: 100%; }
.qr-fallback { font-size: 12px; word-break: break-all; color: var(--muted); text-align: left; }
.pay-tip { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.pay-status { font-weight: 700; color: var(--accent); }
.pay-mock { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.pay-mock p { font-size: 12px; color: #9a8fbf; margin-bottom: 10px; }

/* ---------------- 结果 / 订单查询 ---------------- */
.result-wrap { max-width: 760px; margin: 26px auto; }
.result-banner {
  background: linear-gradient(120deg, #e8f8f0, #f3fbf7); border: 1px solid #bfe8d2;
  border-radius: var(--radius); padding: 22px; text-align: center; margin-bottom: 18px;
}
.result-banner.error { background: #fff3f2; border-color: #ffd3ce; }
.result-banner h1 { font-size: 21px; color: #128a4d; margin-bottom: 4px; }
.result-banner.error h1 { color: #c0392b; }
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card-code {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #faf9fe; border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px;
}
.card-code code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; font-weight: 700; color: var(--primary); word-break: break-all; }
.card-code .copy-btn { border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 7px; padding: 5px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.card-code .copy-btn:hover { background: var(--accent); color: #fff; }
.notice-box { background: #fff8e8; border: 1px solid #ffe2a8; border-radius: 10px; padding: 16px 18px; color: #7a5a00; font-size: 13px; margin-top: 18px; }
.notice-box h3 { color: #a86a00; margin-bottom: 6px; }
.notice-box ol { margin: 6px 0 0; padding-left: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.info-item span { color: var(--muted); font-size: 12px; display: block; }
.info-item b { font-size: 14px; }
.query-form { display: flex; gap: 12px; flex-wrap: wrap; }
.query-form input { flex: 1; min-width: 200px; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-paid { background: #e5f8ee; color: #1a8a4b; }
.status-pending { background: #fff2df; color: #b26b00; }
.status-expired, .status-cancelled { background: #f0eef2; color: #888; }

/* ---------------- 个人中心 ---------------- */
.user-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; margin-top: 26px; align-items: start; }
.profile-card { text-align: center; }
.profile-card .user-avatar { width: 66px; height: 66px; font-size: 28px; margin: 8px auto 14px; }
.profile-card h3 { font-size: 17px; word-break: break-all; }
.profile-card .role { color: var(--muted); font-size: 12px; margin: 4px 0 18px; }
.order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap;
}
.order-row:last-child { border-bottom: 0; }
.order-row__id { font-weight: 700; color: var(--primary); }
.order-row__meta { color: var(--muted); font-size: 12px; }
.order-row__amount { font-weight: 800; color: #e53935; }

/* ---------------- 登录弹窗 / Toast ---------------- */
.auth-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.auth-modal.show { display: flex; }
.auth-modal__mask { position: absolute; inset: 0; background: rgba(20,12,50,.5); backdrop-filter: blur(3px); }
.auth-modal__box {
  position: relative; background: #fff; border-radius: 16px; padding: 30px;
  width: min(400px, 100%); box-shadow: var(--shadow-lg);
}
.auth-modal__close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 24px; color: var(--muted); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 9px; border: 0; background: #f1eef9; color: #6a5aa8; border-radius: 8px; font-weight: 700; }
.auth-tab.active { background: var(--primary); color: #fff; }
.auth-form label { display: block; font-weight: 600; margin-bottom: 12px; color: #4b4763; }
.auth-form input { display: block; width: 100%; margin-top: 6px; }
.store-toast {
  position: fixed; left: 50%; bottom: 38px; transform: translate(-50%, 20px);
  background: #2d2a44; color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: .25s; z-index: 500;
}
.store-toast.show { opacity: 1; transform: translate(-50%, 0); }
.store-toast.success { background: #128a4d; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #1b103f; color: #cfc9e4; margin-top: 50px; padding: 40px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 30px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; max-width: 360px; }
.footer-brand strong { color: #fff; font-size: 17px; }
.footer-brand p { font-size: 12px; margin-top: 6px; color: #9e96c2; }
.footer-links { display: flex; gap: 60px; }
.footer-links h4 { color: #fff; margin-bottom: 12px; font-size: 14px; }
.footer-links a { display: block; font-size: 12px; margin-bottom: 7px; color: #a9a1cb; }
.footer-links a:hover { color: #7ff3d0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 16px; font-size: 12px; color: #8e86b3; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: 340px 1fr; gap: 22px; }
  .detail-gallery .store-cover { height: 300px; }
}
@media (max-width: 780px) {
  .header-inner { gap: 12px; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; }
  .header-search { order: 2; margin-left: auto; }
  .header-search input { width: 130px; }
  .admin-link { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-gallery .store-cover { height: 280px; }
  .checkout-layout { grid-template-columns: 1fr; }
  .user-layout { grid-template-columns: 1fr; }
  .cart-head, .cart-item { grid-template-columns: 30px 1fr 90px 90px 40px; }
  .cart-head > :nth-child(4), .cart-item > :nth-child(4) { display: none; }
  .footer-links { gap: 30px; }
}
@media (max-width: 520px) {
  .container { width: calc(100% - 24px); }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 23px; }
  .brand-text { font-size: 16px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card__cover { height: 120px; }
  .product-card__body { padding: 11px; }
  .price { font-size: 16px; }
  .buy-btn { padding: 6px 10px; font-size: 12px; }
  .detail-actions .btn { flex: 1; padding: 12px 8px; }
  .cart-head, .cart-item { grid-template-columns: 24px 1fr 70px 34px; padding: 12px 10px; gap: 8px; }
  .cart-head > :nth-child(3), .cart-item > :nth-child(3) { display: none; }
  .cart-item .store-cover { width: 54px; height: 54px; }
  .pay-card { padding: 22px 18px; }
  .qr-box { width: 200px; height: 200px; }
  .info-grid { grid-template-columns: 1fr; }
  .pay-methods { flex-direction: column; }
}
