*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #1E293B; background: #fff; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  a { text-decoration: none; color: inherit; }
  img { max-width: 100%; display: block; }
  button { font-family: inherit; cursor: pointer; border: none; background: none; }
  input, select { font-family: inherit; outline: none; }

  :root {
    --primary: #0EA5A4; --primary-light: #CCFBF1;
    --accent: #F97316; --accent-light: #FFEDD5;
    --agent: #8B5CF6; --agent-light: #EDE9FE;
    --text-dark: #1E293B; --text-mid: #64748B; --text-light: #94A3B8;
    --bg-soft: #F8FAFC; --border: #E2E8F0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  }

  /* ===== Navigation ===== */
  .nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .nav-inner {
    max-width: 1120px; margin: 0 auto;
    padding: 0 20px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .logo {
    font-size: 20px; font-weight: 700; color: var(--text-dark);
    display: flex; align-items: center; gap: 8px;
  }
  .logo-mark {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--primary);
    display: grid; place-items: center;
    color: #fff; font-size: 16px; font-weight: 800;
  }
  .nav-links { display: flex; gap: 28px; list-style: none; }
  .nav-links a { font-size: 15px; color: var(--text-mid); transition: color .2s; }
  .nav-links a:hover { color: var(--primary); }

  .nav-right { display: flex; align-items: center; gap: 12px; }
  .cart-btn {
    position: relative;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; cursor: pointer;
    transition: background .2s;
    font-size: 20px;
  }
  .cart-btn:hover { background: var(--bg); }
  .cart-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 18px; height: 18px;
    background: var(--accent); color: #fff;
    border-radius: 9px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
  }
  .cart-badge.hidden { display: none; }
  .nav-cta {
    padding: 8px 18px;
    background: var(--primary); color: #fff;
    border-radius: 8px; font-size: 14px; font-weight: 600;
    transition: background .2s;
  }
  .nav-cta:hover { background: #0D9488; }
  .btn-auth {
    padding: 8px 18px;
    background: transparent; color: var(--text-dark);
    border: 1.5px solid var(--border);
    border-radius: 8px; font-size: 14px; font-weight: 600;
    transition: border-color .2s, color .2s;
  }
  .btn-auth:hover { border-color: var(--primary); color: var(--primary); }
  .user-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: var(--bg-soft);
    border-radius: 100px;
    font-size: 13px; font-weight: 600;
  }
  .user-role {
    padding: 2px 10px; border-radius: 100px;
    font-size: 11px; font-weight: 700;
  }
  .user-role.agent { background: var(--agent-light); color: var(--agent); }
  .user-role.retail { background: var(--primary-light); color: var(--primary); }
  .btn-logout {
    font-size: 13px; color: var(--text-light);
    transition: color .2s;
  }
  .btn-logout:hover { color: #EF4444; }
  .nav-toggle { display: none; font-size: 24px; color: var(--text-dark); }

  /* ===== Hero ===== */
  .hero {
    background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 60%, #FFF7ED 100%);
    padding: 72px 20px 80px;
  }
  .hero-inner {
    max-width: 1120px; margin: 0 auto;
    display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px;
    align-items: center;
  }
  .hero-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--primary-light); color: var(--primary);
    border-radius: 100px; font-size: 13px; font-weight: 600;
    margin-bottom: 20px;
  }
  .hero h1 {
    font-size: 44px; line-height: 1.2; font-weight: 800;
    color: var(--text-dark); margin-bottom: 20px;
  }
  .hero h1 em { font-style: normal; color: var(--primary); }
  .hero p {
    font-size: 17px; color: var(--text-mid);
    margin-bottom: 32px; max-width: 480px;
  }
  .hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
  .btn-primary {
    padding: 13px 28px;
    background: var(--accent); color: #fff;
    border-radius: 10px; font-size: 15px; font-weight: 600;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(249,115,22,.3);
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249,115,22,.4); }
  .btn-ghost {
    padding: 13px 28px;
    background: #fff; color: var(--text-dark);
    border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 15px; font-weight: 600;
    transition: border-color .2s;
  }
  .btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

  .hero-visual {
    aspect-ratio: 4/3; border-radius: 20px;
    background: linear-gradient(135deg, #0EA5A4 0%, #14B8A6 50%, #2DD4BF 100%);
    position: relative; overflow: hidden;
    display: grid; place-items: center;
    box-shadow: var(--shadow-md);
  }
  .hero-visual::before {
    content: ''; position: absolute; width: 200px; height: 200px;
    border-radius: 50%; background: rgba(255,255,255,.15);
    top: -60px; right: -60px;
  }
  .hero-visual::after {
    content: ''; position: absolute; width: 140px; height: 140px;
    border-radius: 50%; background: rgba(255,255,255,.1);
    bottom: -40px; left: -40px;
  }
  .hero-visual span {
    font-size: 64px; font-weight: 800; color: #fff; letter-spacing: 4px;
  }

  /* ===== Features ===== */
  .features { padding: 64px 20px; background: #fff; }
  .features-inner {
    max-width: 1120px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  }
  .feature-card {
    padding: 32px 28px; border-radius: var(--radius);
    background: var(--bg-soft); text-align: center;
    transition: transform .2s, box-shadow .2s;
  }
  .feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
  .feature-icon {
    width: 56px; height: 56px; margin: 0 auto 18px;
    border-radius: 14px; display: grid; place-items: center; font-size: 26px;
  }
  .feature-icon.green { background: var(--primary-light); color: var(--primary); }
  .feature-icon.orange { background: var(--accent-light); color: var(--accent); }
  .feature-icon.purple { background: var(--agent-light); color: var(--agent); }
  .feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
  .feature-card p { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

  /* ===== Category Cards (全部页) ===== */
  .category-grid {
    max-width: 1120px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  }
  .category-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
  }
  .category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
  .category-card-img {
    height: 140px;
    display: grid; place-items: center;
    font-size: 48px;
  }
  .category-card-img.c1 { background: linear-gradient(135deg, #FEE2E2, #FCA5A5); }
  .category-card-img.c2 { background: linear-gradient(135deg, #DBEAFE, #93C5FD); }
  .category-card-img.c3 { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); }
  .category-card-body { padding: 20px 22px 24px; }
  .category-card-name {
    font-size: 18px; font-weight: 800; color: var(--text-dark);
    margin-bottom: 6px;
  }
  .category-card-desc {
    font-size: 13px; color: var(--text-mid);
    margin-bottom: 14px;
  }
  .category-card-meta {
    display: flex; align-items: center; justify-content: space-between;
  }
  .category-count {
    font-size: 13px; color: var(--text-light); font-weight: 600;
  }
  .category-enter {
    font-size: 13px; font-weight: 700; color: var(--primary);
  }

  /* ===== Products ===== */
  .products { padding: 64px 20px 80px; background: var(--bg-soft); }
  .section-head {
    max-width: 1120px; margin: 0 auto 16px; text-align: center;
  }
  .section-head h2 {
    font-size: 32px; font-weight: 800; color: var(--text-dark); margin-bottom: 10px;
  }
  .section-head p { font-size: 15px; color: var(--text-mid); }
  .price-note {
    max-width: 1120px; margin: 0 auto 24px;
    text-align: center; font-size: 13px; color: var(--text-mid);
  }
  .price-note strong { color: var(--agent); }
  .category-bar {
    max-width: 1120px; margin: 0 auto 28px;
    display: flex; gap: 10px; flex-wrap: wrap;
    justify-content: center; align-items: center;
  }
  .search-box {
    flex: 1; min-width: 200px; max-width: 320px;
    position: relative;
  }
  .search-box input {
    width: 100%; padding: 8px 16px 8px 38px;
    border: 1.5px solid var(--border); border-radius: 100px;
    font-size: 14px; outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
  }
  .search-box input:focus { border-color: var(--primary); }
  .search-box::before {
    content: '🔍';
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 14px; opacity: .6;
  }
  .cat-btn {
    padding: 8px 20px;
    background: #fff; color: var(--text-mid);
    border: 1.5px solid var(--border);
    border-radius: 100px; font-size: 14px; font-weight: 600;
    transition: all .2s;
  }
  .cat-btn:hover { border-color: var(--primary); color: var(--primary); }
  .cat-btn.active {
    background: var(--primary); color: #fff;
    border-color: var(--primary);
  }
  .sort-select {
    padding: 8px 14px;
    background: #fff; color: var(--text-mid);
    border: 1.5px solid var(--border);
    border-radius: 100px; font-size: 13px; font-weight: 600;
    outline: none; cursor: pointer;
  }
  .sort-select:focus { border-color: var(--primary); }
  .product-count {
    font-size: 12px; color: var(--text-light);
    text-align: center; margin-bottom: 20px;
  }
  .product-grid {
    max-width: 1120px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  }
  .product-card {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
  }
  .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .product-img {
    aspect-ratio: 1/1; display: grid; place-items: center; font-size: 36px;
  }
  .product-img.p1 { background: linear-gradient(135deg, #FEE2E2, #FECACA); }
  .product-img.p2 { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); }
  .product-img.p3 { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); }
  .product-img.p4 { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
  .product-img.p5 { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); }
  .product-img.p6 { background: linear-gradient(135deg, #E0E7FF, #C7D2FE); }
  .product-info { padding: 10px 12px 14px; }
  .product-cat {
    font-size: 10px; color: var(--text-light); font-weight: 600;
    text-transform: uppercase; letter-spacing: .3px; margin-bottom: 3px;
  }
  .product-name {
    font-size: 13px; font-weight: 700; color: var(--text-dark);
    margin-bottom: 6px; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
  .product-price {
    font-size: 15px; font-weight: 800; color: var(--accent);
  }
  .product-price.agent-price { color: var(--agent); }
  .price-tag {
    font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 100px;
  }
  .price-tag.retail { background: var(--accent-light); color: var(--accent); }
  .price-tag.agent { background: var(--agent-light); color: var(--agent); }
  .product-price small { font-size: 10px; font-weight: 400; color: var(--text-light); }
  .login-hint {
    font-size: 13px; color: var(--text-mid);
  }
  .login-hint a { color: var(--primary); font-weight: 600; cursor: pointer; }

  /* ===== 加购按钮 & 购物车弹窗 ===== */
  .add-cart-btn {
    width: 100%;
    margin-top: 8px;
    padding: 6px 0;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    border: none;
  }
  .add-cart-btn:hover { background: var(--primary); color: #fff; }
  .qty-selector {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
    background: var(--primary-light);
    border-radius: 8px;
    overflow: hidden;
  }
  .qty-selector button {
    width: 32px; height: 28px;
    background: transparent; border: none;
    color: var(--primary); font-size: 16px; font-weight: 700;
    cursor: pointer;
  }
  .qty-selector button:hover { background: rgba(14,165,164,.1); }
  .qty-selector span {
    flex: 1; text-align: center;
    font-size: 14px; font-weight: 700; color: var(--primary);
  }
  .cart-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.5); z-index: 1000;
    display: none; align-items: center; justify-content: center;
  }
  .cart-modal.show { display: flex; }
  #profileModal { z-index: 1050; }
  #rechargeModal { z-index: 1100; }
  #contactModal { z-index: 1150; }
  #authModal { z-index: 1200; }
  #cartModal { z-index: 1000; }
  #addressModal { z-index: 1000; }
  #orderConfirmModal { z-index: 1000; }
  .cart-modal-body {
    width: 90%; max-width: 480px;
    background: #fff; border-radius: 16px;
    max-height: 80vh; display: flex; flex-direction: column;
  }
  .cart-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .cart-modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text-dark); }
  .cart-modal-close {
    font-size: 24px; cursor: pointer; color: var(--text-light);
    line-height: 1;
  }
  .cart-list { flex: 1; overflow-y: auto; padding: 16px 24px; }
  .cart-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--bg);
  }
  .cart-item-info { flex: 1; }
  .cart-item-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }
  .cart-item-price { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 2px; }
  .cart-item-qty {
    display: flex; align-items: center; gap: 8px;
  }
  .cart-item-qty button {
    width: 24px; height: 24px; border-radius: 6px;
    border: 1px solid var(--border); background: #fff;
    cursor: pointer; font-size: 14px; line-height: 1;
  }
  .cart-item-qty span { min-width: 20px; text-align: center; font-size: 14px; font-weight: 600; }
  .cart-item-remove {
    margin-left: 12px; color: #ef4444; font-size: 12px; cursor: pointer;
  }
  .cart-empty { text-align: center; padding: 40px 0; color: var(--text-light); font-size: 14px; }
  .cart-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }
  .cart-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
  }
  .cart-total-label { font-size: 14px; color: var(--text-mid); }
  .cart-total-price { font-size: 20px; font-weight: 800; color: var(--accent); }
  .cart-checkout-btn {
    width: 100%; padding: 12px;
    background: var(--primary); color: #fff;
    border-radius: 10px; font-size: 15px; font-weight: 700;
    border: none; cursor: pointer;
  }
  .cart-checkout-btn:hover { background: #0D9488; }

  /* ===== 充值弹窗 ===== */
  .recharge-modal-body {
    width: 90%; max-width: 420px;
  }
  .recharge-amount {
    text-align: center; padding: 20px 24px;
  }
  .recharge-amount label {
    font-size: 13px; color: var(--text-mid); display: block; margin-bottom: 8px;
  }
  .recharge-amount input {
    width: 100%; padding: 12px;
    border: 2px solid var(--border); border-radius: 10px;
    font-size: 24px; font-weight: 800; text-align: center;
    outline: none; box-sizing: border-box;
  }
  .recharge-amount input:focus { border-color: var(--primary); }
  .recharge-amount .min-tip {
    font-size: 12px; color: #f59e0b; margin-top: 6px;
  }
  .pay-method {
    display: flex; gap: 12px; padding: 0 24px 16px;
  }
  .pay-method-btn {
    flex: 1; padding: 12px;
    border: 2px solid var(--border); border-radius: 10px;
    text-align: center; cursor: pointer;
    transition: all .2s;
  }
  .pay-method-btn.selected { border-color: var(--primary); background: var(--primary-light); }
  .pay-method-btn .pay-icon { font-size: 24px; }
  .pay-method-btn .pay-name { font-size: 13px; font-weight: 600; margin-top: 4px; }
  .qrcode-area {
    text-align: center; padding: 16px 24px;
  }
  .qrcode-img {
    width: 200px; height: 200px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--text-light);
  }
  .countdown-timer {
    font-size: 14px; color: #ef4444; font-weight: 700;
    margin-top: 12px;
  }
  .recharge-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }
  .recharge-tip {
    font-size: 12px; color: var(--text-mid); text-align: center; margin-bottom: 12px;
  }
  .recharge-confirm-btn {
    width: 100%; padding: 12px;
    background: var(--primary); color: #fff;
    border-radius: 10px; font-size: 15px; font-weight: 700;
    border: none; cursor: pointer;
  }

  /* ===== About ===== */
  .about { padding: 72px 20px; background: #fff; }
  .about-inner {
    max-width: 900px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  }
  .about h2 { font-size: 28px; font-weight: 800; color: var(--text-dark); margin-bottom: 16px; }
  .about p { font-size: 15px; color: var(--text-mid); margin-bottom: 12px; line-height: 1.8; }
  .about-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px;
  }
  .stat {
    text-align: center; padding: 20px 12px;
    background: var(--bg-soft); border-radius: var(--radius);
  }
  .stat-num { font-size: 24px; font-weight: 800; color: var(--primary); }
  .stat-label { font-size: 12px; color: var(--text-mid); margin-top: 4px; }
  .about-visual {
    aspect-ratio: 1/1; border-radius: 20px;
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    display: grid; place-items: center; font-size: 80px;
  }

  /* ===== CTA ===== */
  .cta-section {
    padding: 72px 20px;
    background: linear-gradient(135deg, #0EA5A4 0%, #0D9488 100%);
    text-align: center;
  }
  .cta-section h2 { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 12px; }
  .cta-section p {
    font-size: 16px; color: rgba(255,255,255,.85);
    margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto;
  }
  .cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
  .btn-white {
    padding: 13px 32px; background: #fff; color: var(--primary);
    border-radius: 10px; font-size: 15px; font-weight: 700;
    transition: transform .15s;
  }
  .btn-white:hover { transform: translateY(-2px); }
  .btn-outline-white {
    padding: 13px 32px; background: transparent; color: #fff;
    border: 1.5px solid rgba(255,255,255,.5);
    border-radius: 10px; font-size: 15px; font-weight: 600;
    transition: border-color .2s;
  }
  .btn-outline-white:hover { border-color: #fff; }

  /* ===== Footer ===== */
  .footer {
    padding: 40px 20px; background: var(--text-dark);
    color: var(--text-light); text-align: center; font-size: 13px;
  }
  .footer-inner { max-width: 1120px; margin: 0 auto; }
  .footer-logo { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 12px; }
  .footer-links {
    display: flex; gap: 24px; justify-content: center;
    margin: 16px 0; list-style: none;
  }
  .footer-links a { color: var(--text-light); transition: color .2s; }
  .footer-links a:hover { color: #fff; }

  /* ===== Toast ===== */
  .toast {
    position: fixed; bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text-dark); color: #fff;
    padding: 12px 24px; border-radius: 10px;
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-md); opacity: 0;
    transition: transform .3s, opacity .3s;
    z-index: 2000; pointer-events: none;
  }
  .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

  /* ===== Modal 通用 ===== */
  .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    display: grid; place-items: center;
    z-index: 200;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  .modal-overlay.show { opacity: 1; pointer-events: auto; }
  .modal {
    background: #fff; border-radius: 20px;
    padding: 32px 28px 28px;
    width: 90%; max-width: 380px;
    position: relative;
    transform: translateY(20px) scale(.96);
    transition: transform .25s;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    max-height: 90vh; overflow-y: auto;
  }
  .modal-overlay.show .modal { transform: translateY(0) scale(1); }
  .modal-close {
    position: absolute; top: 14px; right: 18px;
    font-size: 24px; color: var(--text-light); line-height: 1;
  }
  .modal-close:hover { color: var(--text-dark); }
  .modal-title {
    font-size: 20px; font-weight: 800; color: var(--text-dark);
    text-align: center; margin-bottom: 6px;
  }
  .modal-sub {
    font-size: 13px; color: var(--text-mid);
    text-align: center; margin-bottom: 24px;
  }

  /* ===== Contact Modal ===== */
  .modal-options { display: flex; flex-direction: column; gap: 12px; }
  .contact-option {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; background: var(--bg-soft);
    border-radius: 14px; text-align: left;
    transition: background .2s, transform .15s; width: 100%;
  }
  .contact-option:hover { background: #EEF2F7; transform: translateY(-2px); }
  .contact-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center;
    font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0;
  }
  .contact-icon.wx { background: #22C55E; }
  .contact-icon.tg { background: #0EA5E9; }
  .contact-info { flex: 1; min-width: 0; }
  .contact-name { font-size: 15px; font-weight: 700; color: var(--text-dark); }
  .contact-id { font-size: 13px; color: var(--text-mid); margin-top: 2px; }
  .contact-arrow { font-size: 18px; color: var(--text-light); }
  .modal-tip {
    font-size: 12px; color: var(--text-light);
    text-align: center; margin-top: 20px;
  }

  /* ===== Auth Modal ===== */
  .auth-tabs {
    display: flex; background: var(--bg-soft);
    border-radius: 10px; padding: 4px; margin-bottom: 24px;
  }
  .auth-tab {
    flex: 1; padding: 10px; text-align: center;
    font-size: 14px; font-weight: 600; color: var(--text-mid);
    border-radius: 8px; transition: all .2s;
  }
  .auth-tab.active { background: #fff; color: var(--text-dark); box-shadow: var(--shadow-sm); }
  .auth-form { display: flex; flex-direction: column; gap: 14px; }
  .form-group { display: flex; flex-direction: column; gap: 6px; }
  .form-label { font-size: 13px; font-weight: 600; color: var(--text-dark); }
  .form-input {
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 14px;
    transition: border-color .2s;
  }
  .form-input:focus { border-color: var(--primary); }
  .role-select {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  }
  .role-option {
    padding: 14px 10px; text-align: center;
    border: 1.5px solid var(--border); border-radius: 12px;
    cursor: pointer; transition: all .2s;
  }
  .role-option.selected { border-color: var(--agent); background: var(--agent-light); }
  .role-option.selected.retail-role { border-color: var(--primary); background: var(--primary-light); }
  .role-icon { font-size: 24px; margin-bottom: 6px; }
  .role-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
  .role-desc { font-size: 11px; color: var(--text-mid); margin-top: 2px; }
  .agent-apply {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: var(--agent-light);
    border-radius: 12px;
    cursor: pointer;
    transition: opacity .2s;
    margin-top: 10px;
  }
  .agent-apply:hover { opacity: .85; }
  .btn-submit {
    padding: 13px;
    background: var(--primary); color: #fff;
    border-radius: 10px; font-size: 15px; font-weight: 700;
    transition: background .2s; margin-top: 6px;
  }
  .btn-submit:hover { background: #0D9488; }

  /* ===== Responsive ===== */
  @media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero h1 { font-size: 32px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .about-inner { grid-template-columns: 1fr; gap: 32px; }
    .about-visual { max-width: 320px; margin: 0 auto; }
  }
  @media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .features-inner { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-grid { grid-template-columns: 1fr; gap: 14px; }
    .hero { padding: 48px 20px 56px; }
    .hero h1 { font-size: 28px; }
    .section-head h2 { font-size: 24px; }
    .about-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-num { font-size: 20px; }
    .nav-right .btn-auth { padding: 6px 12px; font-size: 13px; }
    .user-badge { padding: 4px 10px; font-size: 12px; }
    .category-bar { gap: 8px; }
    .cat-btn { padding: 6px 14px; font-size: 13px; }
    .sort-select { padding: 6px 10px; font-size: 12px; }
  }

/* ===== 站点补充样式（由 app.js 使用） ===== */
body { overflow-x: hidden; }
.nav-links.open { display: flex; }
@media (max-width: 640px) {
  .nav-inner { padding: 0 12px; gap: 6px; }
  .logo { font-size: 17px; gap: 6px; flex-shrink: 0; }
  .logo-mark { width: 28px; height: 28px; font-size: 14px; }
  .nav-right { gap: 4px; min-width: 0; }
  .nav-right .nav-cta { display: none; }
  .nav-right .btn-auth { padding: 6px 10px; font-size: 12px; }
  .nav-right [data-nav="profile"]:not(.user-badge) { display: none; }
  .nav-right a[href="/admin"] { display: none; }
  .user-badge { padding: 4px 8px; max-width: 118px; overflow: hidden; }
  .user-badge span:first-child { max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-logout { font-size: 12px; }
  .nav-toggle { display: block; margin-left: 2px; }
  .hero-inner { gap: 26px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; padding: 16px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
    gap: 14px;
  }
}
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.toolbar { max-width: 1120px; margin: 0 auto 18px; display: flex; gap: 10px; justify-content: flex-end; }
.search-box { max-width: 1120px; }
.empty-tip { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--text-light); font-size: 14px; }
.profile-list { display: flex; flex-direction: column; gap: 10px; }
.skeleton { background: linear-gradient(90deg,#f1f5f9,#e2e8f0,#f1f5f9); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.badge-soft { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; background:var(--primary-light); color:var(--primary); }
.badge-warn { background:#FEF3C7; color:#B45309; }
.badge-muted { background:#F1F5F9; color:#64748B; }
.qr-placeholder { width:200px; height:200px; display:grid; place-items:center; text-align:center; padding:16px; border:1px dashed var(--border); border-radius:10px; color:var(--text-light); font-size:12px; background:var(--bg-soft); }
.order-card { border:1px solid var(--border); border-radius:12px; padding:14px; }
.order-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.order-no { font-size:12px; color:var(--text-light); }
.order-total { font-weight:800; color:var(--accent); }
.order-actions { display:flex; gap:8px; margin-top:10px; }
.mini-btn { padding:6px 12px; border-radius:8px; border:1px solid var(--border); font-size:12px; font-weight:600; background:#fff; }
.mini-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 系列分类：左侧栏（桌面）/ 横向滑动条（窄屏） ===== */
.products-body { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.products-body.no-side { display: block; }
.cat-sidebar {
  display: none; position: sticky; top: 84px;
  max-height: calc(100vh - 110px); overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; box-shadow: var(--shadow-sm); scrollbar-width: thin;
}
.cat-sidebar.show { display: block; }
.cat-sidebar::-webkit-scrollbar { width: 6px; }
.cat-sidebar::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
.cat-sidebar-head { font-size: 11px; color: var(--text-light); padding: 8px 10px 6px; letter-spacing: .5px; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text-mid);
  cursor: pointer; line-height: 1.4; transition: background .15s, color .15s;
}
.cat-item:hover { background: var(--bg-soft); color: var(--primary); }
.cat-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.cat-item .cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .num { font-size: 11px; color: var(--text-light); flex-shrink: 0; }
.cat-item.active .num { color: var(--primary); }
.cat-item.cat-back { display: block; text-align: center; font-size: 12px; color: var(--text-light); margin-top: 4px; border-top: 1px dashed var(--border); border-radius: 0 0 8px 8px; }
.products-main { min-width: 0; }
.products-main .product-grid { max-width: none; grid-template-columns: repeat(4, 1fr); }
.products-main .product-count { margin-bottom: 14px; }
.category-bar.chips { display: none; }
.cat-btn .cat-num { font-size: 11px; opacity: .55; margin-left: 4px; }
@media (max-width: 900px) {
  .products-body { display: block; }
  .cat-sidebar { display: none !important; }
  .products-main .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-bar.chips {
    display: flex; justify-content: flex-start; flex-wrap: nowrap;
    overflow-x: auto; gap: 8px; margin-bottom: 14px; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .category-bar.chips .cat-btn { flex: 0 0 auto; }
}
@media (max-width: 640px) {
  .products-main .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 卡片尺寸：仓库 / 系列 / 商品 ===== */
/* 一级仓库卡片：更紧凑，数量少时居中 */
.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 300px));
  justify-content: center;
  max-width: 980px;
  gap: 16px;
}
.category-card-img { height: 76px; font-size: 26px; }
.category-card-body { padding: 14px 16px 16px; }
.category-card-name { font-size: 16px; margin-bottom: 4px; }
.category-card-desc { font-size: 12px; margin-bottom: 10px; }
.category-count, .category-enter { font-size: 12px; }

/* 二级系列卡片：一行 5 个，去掉图标 */
.series-grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
}
.series-card {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 14px 12px 16px; cursor: pointer;
  overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.series-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary); opacity: .55;
}
.series-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.series-card-name {
  font-size: 13px; font-weight: 700; color: var(--text-dark); line-height: 1.4;
  height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.series-card-count { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.series-card-enter { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 10px; }

/* 三级商品卡片：固定尺寸，图片等比缩放不裁剪 */
.products-main .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.product-grid { gap: 10px; }
.product-card { display: flex; flex-direction: column; }
.product-img {
  aspect-ratio: auto; height: 128px; padding: 6px; background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-img img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.product-info { padding: 9px 10px 11px; display: flex; flex-direction: column; flex: 1; }
.product-name {
  font-size: 12.5px; line-height: 1.35; height: 2.7em; margin-bottom: 6px;
  white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.product-price { font-size: 14px; }
.add-cart-btn { margin-top: auto; padding: 6px 0; font-size: 12px; }
.qty-selector { margin-top: auto; }

@media (max-width: 900px) {
  .series-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .products-main .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 240px)); }
  .product-img { height: 118px; }
}
@media (max-width: 640px) {
  .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products-main .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: 1fr; }
  .product-img { height: 110px; }
  .series-card-name { font-size: 12px; }
}
