/* ============================================================
   优选好物小店 - 主样式表 (精简版)
   功能: 商品分类 / 展示 / 购物车 / 结算 / 联系方式
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
    --primary: #ff4d4f;
    --primary-dark: #cf1322;
    --primary-light: #ff7875;
    --primary-soft: rgba(255, 77, 79, 0.08);
    --success: #52c41a;

    --bg: #f5f5f7;
    --bg-white: #ffffff;
    --text: #1a1a2e;
    --text-muted: #8c8c8c;
    --text-faint: #bfbfbf;
    --border: #f0f0f0;
    --border-strong: #d9d9d9;

    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.12);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --container: 1240px;
    --footer-h: 56px;
    --t-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --t: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. 基础重置 ---------- */
*, *::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;
    background: var(--bg); color: var(--text); line-height: 1.6; font-size: 14px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--footer-h);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
i[class^="ri-"], i[class*=" ri-"] { display: inline-block; font-style: normal; line-height: 1; vertical-align: middle; }

/* ---------- 3. 布局 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-title { font-size: 26px; font-weight: 800; display: inline-flex; align-items: center; gap: 16px; letter-spacing: 1px; }
.title-line { display: inline-block; width: 36px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--primary)); }
.title-line:last-child { background: linear-gradient(90deg, var(--primary), transparent); }
.section-sub { color: var(--text-muted); margin-top: 8px; font-size: 14px; }

/* ---------- 4. 顶部栏 ---------- */
.shop-header { background: var(--bg-white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.shop-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--primary); }
.logo-icon i[class^="ri-"] { font-size: 28px; }
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.logo-accent { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.addr-btn { display: flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; background: var(--bg); color: var(--text-muted); font-size: 14px; font-weight: 600; border: 1.5px solid transparent; transition: all var(--t-fast); position: relative; }
.addr-btn:hover { color: var(--primary); border-color: var(--primary); }
.addr-btn i[class^="ri-"] { font-size: 20px; }

.cart-btn { display: flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 600; border: 1.5px solid transparent; transition: all var(--t-fast); position: relative; }
.cart-btn:hover { border-color: var(--primary); }
.cart-btn i[class^="ri-"] { font-size: 20px; }
.cart-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg-white); }

/* ---------- 5. 分类导航 ---------- */
.category-nav { background: var(--bg-white); border-bottom: 1px solid var(--border); position: sticky; top: 64px; z-index: 150; }
.category-inner { display: flex; gap: 6px; overflow-x: auto; padding: 10px 20px; scrollbar-width: none; }
.category-inner::-webkit-scrollbar { display: none; }
.cat-item { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-muted); white-space: nowrap; transition: all var(--t-fast); }
.cat-item i[class^="ri-"] { font-size: 17px; }
.cat-item:hover { color: var(--primary); background: var(--primary-soft); }
.cat-item.active { background: var(--primary); color: #fff; }

/* ---------- 6. 商品货架 ---------- */
.products-section { padding: 28px 0 48px; }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.product-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); transition: all var(--t); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.product-img { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, var(--c1, #f0f0f0), var(--c2, #e8e8e8)); display: grid; place-items: center; position: relative; overflow: hidden; }
.product-img i[class^="ri-"] { font-size: 64px; color: rgba(255, 255, 255, 0.6); transition: transform var(--t); }
.product-card:hover .product-img i[class^="ri-"] { transform: scale(1.12); }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.product-badge.hot { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.product-badge.new { background: linear-gradient(135deg, #48dbfb, #0abde3); }
.product-badge.sale { background: linear-gradient(135deg, #feca57, #ff9f43); }

.product-info { padding: 16px 18px 18px; }
.product-code { display: block; font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: 1px; margin-bottom: 6px; }
.product-name { font-size: 15px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 45px; margin-bottom: 6px; }
.product-card:hover .product-name { color: var(--primary); }
.product-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.product-meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.product-price { font-size: 22px; font-weight: 800; color: var(--primary); }
.product-price small { font-size: 13px; font-weight: 600; }
.product-original { font-size: 13px; color: var(--text-faint); text-decoration: line-through; }
.product-add { width: 100%; padding: 10px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; transition: all var(--t-fast); }
.product-add:hover { background: var(--primary); color: #fff; }
.product-add i[class^="ri-"] { font-size: 17px; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state i[class^="ri-"] { font-size: 56px; color: var(--text-faint); }
.empty-state p { margin-top: 16px; font-size: 15px; }

/* ---------- 7. 联系我们 ---------- */
.contact-section { padding: 40px 0 60px; background: var(--bg-white); }
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card { display: flex; align-items: center; gap: 14px; background: var(--bg); border-radius: var(--radius); padding: 20px; transition: all var(--t); }
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-ico { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #ff7a45); color: #fff; border-radius: 12px; }
.contact-ico i[class^="ri-"] { font-size: 24px; }
.contact-card strong { display: block; font-size: 13px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.contact-card span { color: var(--text); font-size: 16px; font-weight: 600; }

/* ---------- 8. 固定底部栏 ---------- */
.shop-footer { position: fixed; bottom: 0; left: 0; right: 0; height: var(--footer-h); background: var(--bg-white); border-top: 1px solid var(--border); z-index: 200; box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06); }
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 20px; height: 100%; }
.footer-info { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); }
.footer-info i[class^="ri-"] { font-size: 16px; color: var(--primary); }
.footer-copy { font-size: 12px; color: var(--text-faint); }

/* ---------- 9. 购物车侧栏 ---------- */
.cart-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 400; opacity: 0; visibility: hidden; transition: all var(--t); }
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer { position: fixed; top: 0; right: 0; width: 420px; max-width: 100%; height: 100vh; background: var(--bg-white); z-index: 500; display: flex; flex-direction: column; transform: translateX(100%); transition: transform var(--t); box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12); }
.cart-drawer.open { transform: translateX(0); }

.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cart-header h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cart-header i[class^="ri-"] { font-size: 22px; color: var(--primary); }
.cart-close { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-muted); transition: all var(--t-fast); }
.cart-close:hover { background: var(--bg); color: var(--primary); }
.cart-close i[class^="ri-"] { font-size: 20px; }

.cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-body::-webkit-scrollbar { width: 4px; }
.cart-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.cart-empty { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.cart-empty i[class^="ri-"] { font-size: 56px; color: var(--text-faint); }
.cart-empty p { margin-top: 16px; font-size: 14px; }

.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 64px; height: 64px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--c1, #f0f0f0), var(--c2, #e8e8e8)); display: grid; place-items: center; flex-shrink: 0; }
.cart-item-img i[class^="ri-"] { font-size: 28px; color: rgba(255, 255, 255, 0.6); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cart-item-code { font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: 1px; }
.cart-item-del { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--text-faint); transition: all var(--t-fast); }
.cart-item-del:hover { color: var(--primary); background: var(--primary-soft); }
.cart-item-name { font-size: 13.5px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.cart-item-meta { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-size: 16px; font-weight: 800; color: var(--primary); }
.cart-item-qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 28px; height: 28px; display: grid; place-items: center; color: var(--text-muted); transition: all var(--t-fast); }
.qty-btn:hover { color: var(--primary); background: var(--primary-soft); }
.qty-btn i[class^="ri-"] { font-size: 14px; }
.qty-val { min-width: 32px; text-align: center; font-size: 14px; font-weight: 600; }

.cart-footer { border-top: 1px solid var(--border); padding: 20px 24px; flex-shrink: 0; }
.cart-summary { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cart-total-label { font-size: 14px; color: var(--text-muted); }
.cart-total-price { font-size: 24px; font-weight: 800; color: var(--primary); }
.cart-actions { display: flex; gap: 10px; }
.cart-clear { flex: 1; padding: 13px; border-radius: var(--radius-sm); background: var(--bg); color: var(--text-muted); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; transition: all var(--t-fast); border: 1px solid var(--border); }
.cart-clear i[class^="ri-"] { font-size: 16px; }
.cart-clear:hover { color: var(--danger); border-color: var(--danger); }
.cart-checkout { flex: 1.5; padding: 13px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; transition: background var(--t-fast); }
.cart-checkout:hover { background: var(--primary-dark); }

/* ---------- 10. 结算弹窗 ---------- */
.checkout-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 600; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: all var(--t); padding: 20px; }
.checkout-overlay.open { opacity: 1; visibility: visible; }

.checkout-modal { background: var(--bg-white); border-radius: var(--radius-lg); width: 480px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; transform: scale(0.9); transition: transform var(--t); }
.checkout-overlay.open .checkout-modal { transform: scale(1); }

.checkout-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.checkout-head h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.checkout-head i[class^="ri-"] { font-size: 22px; color: var(--primary); }
.checkout-close { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-muted); transition: all var(--t-fast); }
.checkout-close:hover { background: var(--bg); color: var(--primary); }
.checkout-close i[class^="ri-"] { font-size: 20px; }

.checkout-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.checkout-body::-webkit-scrollbar { width: 4px; }
.checkout-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* 地址区域 */
.addr-block { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.addr-block-head { font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 12px; }
.addr-block-head i[class^="ri-"] { font-size: 18px; color: var(--primary); }
.addr-change-btn { font-size: 13px; font-weight: 600; color: var(--primary); background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0; }
.addr-change-btn:hover { text-decoration: underline; }
.addr-optional { font-size: 12px; font-weight: 400; color: var(--text-faint); }
.addr-empty { text-align: center; padding: 16px 0; }
.addr-empty p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }

.addr-skip { width: 100%; padding: 10px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; font-weight: 600; transition: all var(--t-fast); margin-top: 8px; }
.addr-skip:hover { color: var(--primary); border-color: var(--primary); }
.addr-skip.active { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); border-style: solid; }
.addr-select-btn { width: 100%; padding: 10px; border: 1.5px dashed var(--primary); border-radius: var(--radius-sm); color: var(--primary); font-size: 14px; font-weight: 600; background: var(--primary-soft); cursor: pointer; transition: all var(--t-fast); margin-top: 8px; }
.addr-select-btn:hover { background: var(--primary); color: #fff; }

.addr-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; transition: all var(--t-fast); }
.addr-card:hover { border-color: var(--primary-light); }
.addr-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.addr-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; display: grid; place-items: center; color: transparent; transition: all var(--t-fast); margin-top: 2px; }
.addr-radio.checked { border-color: var(--primary); background: var(--primary); color: #fff; }
.addr-radio i[class^="ri-"] { font-size: 13px; }
.addr-card-info { flex: 1; min-width: 0; }
.addr-card-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.addr-card-phone { font-size: 13px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.addr-card-detail { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* 主页地址管理 - 已移至弹窗，保留卡片样式给弹窗用 */
.addr-manage-empty { text-align: center; padding: 48px 20px; }
.addr-manage-empty i[class^="ri-"] { font-size: 48px; color: var(--text-faint); }
.addr-manage-empty p { color: var(--text-muted); font-size: 15px; margin-top: 16px; }

/* 地址管理弹窗 */
.addr-mgmt-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 650; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: all var(--t); padding: 20px; }
.addr-mgmt-overlay.open { opacity: 1; visibility: visible; }
.addr-mgmt-modal { background: var(--bg-white); border-radius: var(--radius-lg); width: 500px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; transform: scale(0.9); transition: transform var(--t); }
.addr-mgmt-overlay.open .addr-mgmt-modal { transform: scale(1); }
.addr-mgmt-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.addr-mgmt-head h3 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.addr-mgmt-head i[class^="ri-"] { font-size: 20px; color: var(--primary); }
.addr-mgmt-close { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text-muted); transition: all var(--t-fast); }
.addr-mgmt-close:hover { background: var(--bg); color: var(--primary); }
.addr-mgmt-close i[class^="ri-"] { font-size: 19px; }
.addr-mgmt-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.addr-mgmt-body::-webkit-scrollbar { width: 4px; }
.addr-mgmt-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.addr-mgmt-footer { padding: 16px 24px; border-top: 1px solid var(--border); flex-shrink: 0; }

.addr-add-main { display: flex; align-items: center; gap: 6px; justify-content: center; width: 100%; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 15px; font-weight: 600; transition: all var(--t-fast); margin-top: 8px; }
.addr-add-main i[class^="ri-"] { font-size: 18px; }
.addr-add-main:hover { color: var(--primary); border-color: var(--primary); }

.addr-manage-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; background: var(--bg-white); border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; transition: all var(--t); }
.addr-manage-card:hover { box-shadow: var(--shadow-sm); }
.addr-manage-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.addr-manage-info { flex: 1; min-width: 0; }
.addr-manage-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr-manage-name span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.addr-manage-name em { font-size: 11px; font-weight: 600; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 999px; font-style: normal; }
.addr-manage-detail { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.addr-manage-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.addr-set-default { font-size: 13px; font-weight: 600; color: var(--primary); padding: 6px 12px; border: 1px solid var(--primary); border-radius: var(--radius-sm); transition: all var(--t-fast); white-space: nowrap; }
.addr-set-default:hover { background: var(--primary); color: #fff; }
.addr-edit, .addr-del-main { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--text-muted); transition: all var(--t-fast); }
.addr-edit i[class^="ri-"], .addr-del-main i[class^="ri-"] { font-size: 17px; }
.addr-edit:hover { color: var(--primary); background: var(--primary-soft); }
.addr-del-main:hover { color: var(--danger); background: rgba(255, 77, 79, 0.08); }

/* 地址弹窗 */
.addr-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 700; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: all var(--t); padding: 20px; }
.addr-overlay.open { opacity: 1; visibility: visible; }
.addr-modal { background: var(--bg-white); border-radius: var(--radius-lg); width: 440px; max-width: 100%; display: flex; flex-direction: column; transform: scale(0.9); transition: transform var(--t); }
.addr-overlay.open .addr-modal { transform: scale(1); }
.addr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.addr-modal-head h3 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.addr-modal-head i[class^="ri-"] { font-size: 20px; color: var(--primary); }
.addr-modal-close { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text-muted); transition: all var(--t-fast); }
.addr-modal-close:hover { background: var(--bg); color: var(--primary); }
.addr-modal-close i[class^="ri-"] { font-size: 19px; }
.addr-modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.addr-form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.addr-form-group input, .addr-form-group textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; color: var(--text); background: var(--bg-white); transition: border-color var(--t-fast); resize: none; }
.addr-form-group input:focus, .addr-form-group textarea:focus { outline: none; border-color: var(--primary); }
.addr-modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border); }
.addr-cancel { padding: 10px 22px; border-radius: var(--radius-sm); background: var(--bg-white); color: var(--text-muted); font-size: 14px; font-weight: 600; border: 1px solid var(--border); transition: all var(--t-fast); }
.addr-cancel:hover { color: var(--text); }
.addr-save { padding: 10px 22px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; transition: background var(--t-fast); }
.addr-save:hover { background: var(--primary-dark); }

.checkout-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center; }
.checkout-item:last-child { border-bottom: none; }
.checkout-item-img { width: 56px; height: 56px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--c1, #f0f0f0), var(--c2, #e8e8e8)); display: grid; place-items: center; flex-shrink: 0; }
.checkout-item-img i[class^="ri-"] { font-size: 26px; color: rgba(255, 255, 255, 0.6); }
.checkout-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.checkout-item-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.checkout-item-name { font-size: 15px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; min-width: 0; }
.checkout-item-qty { font-size: 18px; font-weight: 700; color: var(--text); flex-shrink: 0; line-height: 1.4; }
.checkout-item-detail { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.checkout-item-code { font-weight: 600; color: var(--primary); letter-spacing: 1px; font-size: 14px; }
.checkout-item-amount { font-size: 18px; font-weight: 800; color: var(--primary); flex-shrink: 0; align-self: center; }

.checkout-footer { border-top: 1px solid var(--border); padding: 20px 24px; }
.checkout-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.checkout-total span { font-size: 14px; color: var(--text-muted); }
.checkout-total strong { font-size: 28px; font-weight: 800; color: var(--primary); }
.checkout-tip { text-align: center; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px; background: var(--primary-soft); border-radius: var(--radius-sm); }
.checkout-tip i[class^="ri-"] { font-size: 15px; color: var(--primary); }

.checkout-done { text-align: center; padding: 48px 24px; }
.checkout-done i[class^="ri-"] { font-size: 64px; color: var(--success); }
.checkout-done h4 { font-size: 18px; font-weight: 700; margin-top: 16px; }
.checkout-done p { color: var(--text-muted); margin-top: 8px; font-size: 14px; }

/* ---------- Toast 提示 ---------- */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); background: rgba(0,0,0,0.75); color: #fff; padding: 14px 28px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; z-index: 9999; opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; }
.toast i { color: var(--success); font-size: 18px; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1100px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .cart-drawer { width: 100%; }
    .container { padding: 0 14px; }
    .product-img i[class^="ri-"] { font-size: 48px; }
    .footer-inner { flex-direction: column; gap: 4px; }
    .footer-info { font-size: 12px; }
    .footer-copy { font-size: 11px; }
    .contact-cards { grid-template-columns: 1fr; }
    .section-title { font-size: 22px; }
    .cart-btn-text, .addr-btn-text { display: none; }

    /* 结算弹窗移动端适配 */
    .checkout-overlay { padding: 0; align-items: stretch; }
    .checkout-modal { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; min-height: 100vh; transform: translateY(100%); }
    .checkout-overlay.open .checkout-modal { transform: translateY(0); }
    .checkout-head { padding: 16px 16px; }
    .checkout-head h3 { font-size: 16px; }
    .checkout-head i[class^="ri-"] { font-size: 20px; }
    .checkout-body { padding: 12px 16px; }
    .addr-card { padding: 10px; }
    .addr-card-name { font-size: 14px; }
    .addr-card-detail { font-size: 12px; }
    .addr-manage-card { padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .addr-manage-actions { width: 100%; justify-content: flex-end; }
    .addr-mgmt-overlay { padding: 0; align-items: stretch; }
    .addr-mgmt-modal { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; min-height: 100vh; transform: translateY(100%); }
    .addr-mgmt-overlay.open .addr-mgmt-modal { transform: translateY(0); }
    .addr-overlay { padding: 0; align-items: stretch; }
    .addr-modal { width: 100%; max-width: 100%; border-radius: 0; min-height: 100vh; transform: translateY(100%); }
    .addr-overlay.open .addr-modal { transform: translateY(0); }
    .checkout-item { gap: 10px; padding: 12px 0; }
    .checkout-item-img { width: 48px; height: 48px; }
    .checkout-item-img i[class^="ri-"] { font-size: 22px; }
    .checkout-item-name { font-size: 14px; }
    .checkout-item-qty { font-size: 16px; }
    .checkout-item-detail { font-size: 13px; gap: 8px; }
    .checkout-item-code { font-size: 13px; }
    .checkout-item-amount { font-size: 16px; }
    .checkout-footer { padding: 16px; }
    .checkout-total strong { font-size: 24px; }
    .checkout-tip { font-size: 12px; padding: 8px; }
}
@media (max-width: 480px) {
    .product-price { font-size: 18px; }

    /* 小屏结算弹窗进一步优化 */
    .checkout-item { align-items: center; }
    .checkout-item-amount { font-size: 15px; }
    .checkout-item-detail { gap: 6px; font-size: 12px; }
    .checkout-item-code { font-size: 12px; }
    .cart-actions { flex-direction: column; gap: 8px; }
    .cart-clear, .cart-checkout { width: 100%; }
}

/* ---------- 12. 动画 ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.product-card { animation: fadeInUp 0.35s ease both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
