/* =============================================
   顺忻商贸 - 全局样式（响应式/H5自适应）
   主色调：深蓝 #1a3a5c  强调色：金色 #c8a84b
   ============================================= */

:root {
    --color-primary:    #1a3a5c;
    --color-primary-dark: #122840;
    --color-accent:     #c8a84b;
    --color-accent-light: #f0d98a;
    --color-bg:         #f0f2f5;
    --color-white:      #ffffff;
    --color-text:       #2c3e50;
    --color-text-light: #7f8c8d;
    --color-border:     #dce1e7;
    --color-danger:     #c0392b;
    --color-success:    #27ae60;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 4px rgba(26,58,92,0.08);
    --shadow-md: 0 4px 16px rgba(26,58,92,0.12);
    --shadow-lg: 0 8px 32px rgba(26,58,92,0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; -webkit-tap-highlight-color: rgba(0,0,0,0); }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 768px) { .container { padding: 0 12px; } }

/* =============================================
   顶部导航
   ============================================= */
.site-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(26,58,92,0.3);
}

.site-header::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 15px;
}

.logo a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    color: var(--color-primary-dark);
    letter-spacing: -1px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(200,168,75,0.4);
}

.logo-text-wrap { display: flex; flex-direction: column; }
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: 2px; color: #fff; line-height: 1.2; }
.logo-sub { font-size: 10px; color: var(--color-accent-light); letter-spacing: 1px; line-height: 1; }

.site-url-display {
    flex: 1;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-links { display: flex; gap: 12px; align-items: center; }
.nav-link, .nav-user { color: rgba(255,255,255,0.9); font-size: 13px; white-space: nowrap; }
.nav-link:hover { color: var(--color-accent-light); text-decoration: none; }

.cart-link {
    position: relative;
    padding: 5px 12px;
    background: rgba(200,168,75,0.25);
    border: 1px solid rgba(200,168,75,0.4);
    border-radius: var(--radius-sm);
    color: #fff;
}
.cart-link:hover { background: rgba(200,168,75,0.4); color: #fff; }

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 18px;
    margin-left: 4px;
}

@media (max-width: 768px) {
    .header-inner { padding: 0 12px; height: 50px; gap: 8px; }
    .logo-badge { width: 30px; height: 30px; font-size: 11px; border-radius: 6px; }
    .logo-text { font-size: 15px; letter-spacing: 1px; }
    .logo-sub { display: none; }
    .site-url-display { font-size: 10px; padding: 3px 6px; }
    .nav-links { gap: 8px; }
    .nav-link, .nav-user { font-size: 12px; }
    .nav-user { max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
}

/* =============================================
   主内容区域
   ============================================= */
.main-content { flex: 1; padding: 20px 0; }
@media (max-width: 768px) { .main-content { padding: 12px 0; } }

/* =============================================
   首页 Banner
   ============================================= */
.banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2e6da4 60%, #1a3a5c 100%);
    color: #fff;
    padding: 36px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.banner::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: rgba(200,168,75,0.08);
    border-radius: 50%;
}
.banner::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -30px;
    width: 250px; height: 250px;
    background: rgba(200,168,75,0.06);
    border-radius: 50%;
}
.banner-content { position: relative; z-index: 1; }
.banner-content h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; letter-spacing: 2px; }
.banner-content p { font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 16px; letter-spacing: 1px; }
.banner-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.banner-badge {
    background: rgba(200,168,75,0.2);
    border: 1px solid rgba(200,168,75,0.5);
    color: var(--color-accent-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
    .banner { padding: 24px 15px; }
    .banner-content h2 { font-size: 18px; }
    .banner-content p { font-size: 12px; }
    .banner-badge { font-size: 11px; padding: 3px 10px; }
}

/* =============================================
   分类导航
   ============================================= */
.category-nav {
    background: var(--color-white);
    padding: 14px 20px;
    border-bottom: 2px solid var(--color-border);
    position: sticky;
    top: 59px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}
.category-nav-inner {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 0 auto;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.cat-btn {
    padding: 6px 16px;
    background: #f0f2f5;
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-text);
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
    flex-shrink: 0;
}
.cat-btn:hover { background: #e8edf2; color: var(--color-primary); text-decoration: none; }
.cat-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-weight: 600; }
@media (max-width: 768px) {
    .category-nav { padding: 10px 12px; top: 53px; }
    .cat-btn { font-size: 12px; padding: 5px 12px; }
}

/* =============================================
   商品区域
   ============================================= */
.shop-main { max-width: 1200px; margin: 0 auto; padding: 20px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    position: relative;
    padding-left: 12px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--color-accent);
    border-radius: 2px;
}
.product-count { font-size: 13px; color: var(--color-text-light); }
@media (max-width: 768px) { .shop-main { padding: 12px; } .section-title { font-size: 15px; } }

/* =============================================
   商品网格
   ============================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; } }
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* =============================================
   商品卡片
   ============================================= */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: rgba(26,58,92,0.2); }

.product-image { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f8f9fa; display: block; }

.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-name {
    font-size: 14px; font-weight: 500; color: var(--color-text); margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.4; min-height: 40px;
}
.product-spec { font-size: 12px; color: var(--color-text-light); margin-bottom: 8px; }
.product-price { margin-bottom: 10px; display: flex; align-items: baseline; gap: 6px; }
.price-current { font-size: 18px; font-weight: 700; color: var(--color-danger); }
.price-current small { font-size: 13px; }
.price-original { font-size: 12px; color: var(--color-text-light); text-decoration: line-through; }
.product-actions { padding: 0 12px 12px; }

/* 通用按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

.btn-add-cart {
    width: 100%;
    padding: 8px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-add-cart:hover { background: var(--color-primary-dark); }
.add-cart-form { margin: 0; }

@media (max-width: 768px) {
    .product-info { padding: 8px; }
    .product-name { font-size: 13px; min-height: 36px; }
    .price-current { font-size: 15px; }
    .product-actions { padding: 0 8px 8px; }
    .btn-add-cart { font-size: 12px; padding: 6px; }
}

/* =============================================
   空状态
   ============================================= */
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-light); }
.empty-state p { font-size: 1.1rem; margin-bottom: 15px; }

/* =============================================
   表单样式
   ============================================= */
.form-container {
    max-width: 450px;
    margin: 40px auto;
    background: var(--color-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.form-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--color-primary); }
.form-subtitle { text-align: center; font-size: 13px; color: var(--color-text-light); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--color-text); font-size: 13px; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbfc;
    color: var(--color-text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
    background: #fff;
}
.form-textarea { resize: vertical; min-height: 80px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.form-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--color-text-light); }
.form-footer a { color: var(--color-primary); font-weight: 500; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13px; }
.alert-error { background: #fdf0f0; color: var(--color-danger); border: 1px solid #f5c6c6; }
.alert-success { background: #f0faf4; color: var(--color-success); border: 1px solid #b7dfca; }

/* 登录/注册专属 */
.auth-box {
    max-width: 420px;
    margin: 50px auto;
    background: var(--color-white);
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.auth-box h1 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; color: var(--color-primary); }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), #2e6da4);
    border-radius: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
}
.auth-logo-badge span { font-size: 20px; font-weight: 900; color: var(--color-accent-light); letter-spacing: -1px; }
.auth-site-name { font-size: 18px; font-weight: 700; color: var(--color-primary); letter-spacing: 2px; display: block; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--color-text-light); }
.auth-footer a { color: var(--color-primary); font-weight: 600; }

@media (max-width: 768px) {
    .form-container { margin: 20px auto; padding: 20px 16px; }
    .auth-box { margin: 20px auto; padding: 28px 20px; }
    .form-input, .form-select, .form-textarea { font-size: 16px; }
}

/* =============================================
   购物车
   ============================================= */
.cart-container, .checkout-container { max-width: 1000px; margin: 0 auto; }

.page-title { font-size: 20px; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; padding-left: 12px; border-left: 4px solid var(--color-accent); }
.breadcrumb { font-size: 13px; color: var(--color-text-light); margin-bottom: 16px; }
.breadcrumb a { color: var(--color-primary); }

.cart-table {
    width: 100%;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}
.cart-table table { width: 100%; border-collapse: collapse; }
.cart-table th { background: #f5f7fa; padding: 12px 14px; text-align: left; font-weight: 600; font-size: 13px; color: var(--color-text); border-bottom: 2px solid var(--color-border); }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid #f0f2f5; font-size: 14px; }

.cart-item-image { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }

.quantity-control { display: flex; align-items: center; gap: 6px; }
.quantity-btn {
    width: 28px; height: 28px;
    border: 1.5px solid var(--color-border);
    background: #f5f7fa;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--color-text);
    transition: all 0.2s;
}
.quantity-btn:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.quantity-input { width: 50px; text-align: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 4px; font-size: 14px; }

.cart-summary {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}
.cart-total { font-size: 16px; color: var(--color-text); }
.cart-total strong { font-size: 22px; color: var(--color-danger); font-weight: 700; }
.btn-checkout {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--color-accent), #e8c060);
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}
.btn-checkout:hover { background: linear-gradient(135deg, #b8943b, var(--color-accent)); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(200,168,75,0.4); text-decoration: none; color: var(--color-primary-dark); }

.empty-cart { text-align: center; padding: 60px 20px; color: var(--color-text-light); }
.empty-cart p { font-size: 16px; margin-bottom: 20px; }

@media (max-width: 768px) {
    .cart-table { overflow-x: auto; }
    .cart-table table { min-width: 580px; }
    .cart-table th, .cart-table td { padding: 10px 8px; font-size: 12px; }
    .cart-item-image { width: 60px; height: 60px; }
    .quantity-btn { width: 24px; height: 24px; font-size: 14px; }
    .quantity-input { width: 38px; font-size: 12px; }
    .cart-summary { flex-direction: column; align-items: stretch; gap: 12px; }
    .btn-checkout { width: 100%; text-align: center; }
}

/* =============================================
   结算页面
   ============================================= */
.checkout-steps {
    background: var(--color-white);
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}
.steps { display: flex; justify-content: center; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 6px; color: var(--color-text-light); font-size: 13px; padding: 0 8px; }
.step.active { color: var(--color-primary); font-weight: 600; }
.step.done { color: var(--color-success); }
.step-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #e0e5ea;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step.active .step-num { background: var(--color-primary); }
.step.done .step-num { background: var(--color-success); }
.step-arrow { color: var(--color-border); font-size: 18px; padding: 0 4px; }

.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }

.checkout-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    margin-bottom: 16px;
}
.section-heading {
    font-size: 15px; font-weight: 700; color: var(--color-primary);
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; gap: 6px;
}
.section-icon { font-size: 16px; }

.address-option {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.address-option:hover { border-color: var(--color-primary); background: #f8fafc; }
.address-option.selected { border-color: var(--color-primary); background: #f0f5fa; }
.address-option input[type="radio"] { margin-top: 3px; accent-color: var(--color-primary); }
.address-name { font-weight: 600; color: var(--color-text); }
.address-phone { color: var(--color-text-light); font-size: 13px; margin-left: 8px; }
.address-detail { font-size: 13px; color: var(--color-text-light); margin-top: 4px; }
.default-tag {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 10px; font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.checkout-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.checkout-item:last-child { border-bottom: none; }
.checkout-item-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); flex-shrink: 0; }
.checkout-item-info { flex: 1; }
.checkout-item-name { font-size: 14px; font-weight: 500; color: var(--color-text); margin-bottom: 3px; }
.checkout-item-spec { font-size: 12px; color: var(--color-text-light); }
.checkout-item-price { font-size: 14px; font-weight: 700; color: var(--color-danger); white-space: nowrap; }

.amount-summary {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    position: sticky;
    top: 80px;
}
.amount-rows { margin-bottom: 16px; }
.amount-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 14px; color: var(--color-text);
    border-bottom: 1px solid #f5f7fa;
}
.amount-row:last-child { border-bottom: none; }
.free-shipping { color: var(--color-success); font-weight: 600; font-size: 13px; }
.discount-row { color: var(--color-success); }
.discount-amount { font-weight: 600; }
.amount-divider { height: 1px; background: var(--color-border); margin: 8px 0; }
.amount-final { font-size: 16px; font-weight: 700; padding: 12px 0 0; border-bottom: none !important; }
.final-label { color: var(--color-text); font-size: 15px; }
.final-price { color: var(--color-danger); font-size: 22px; }

.submit-order-area { border-top: 1px solid var(--color-border); padding-top: 16px; }
.submit-info { font-size: 13px; color: var(--color-text-light); margin-bottom: 10px; text-align: right; }
.submit-price { color: var(--color-danger); font-size: 16px; }

.btn-alipay {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1677ff, #0958d9);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.btn-alipay:hover { background: linear-gradient(135deg, #0958d9, #003eb3); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,119,255,0.4); }
.btn-submit-order { display: block; text-align: center; }

.buyer-info-display { background: #f8fafc; border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--color-border); }
.buyer-info-row { display: flex; gap: 8px; font-size: 13px; margin-bottom: 4px; color: var(--color-text); }
.buyer-info-row:last-child { margin-bottom: 0; }
.buyer-info-label { color: var(--color-text-light); flex-shrink: 0; }

.remark-input { width: 100%; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px; font-size: 14px; resize: none; transition: border-color 0.2s; }
.remark-input:focus { outline: none; border-color: var(--color-primary); }
.remark-counter { text-align: right; font-size: 12px; color: var(--color-text-light); margin-top: 4px; }
.no-address-tip { color: var(--color-text-light); font-size: 14px; padding: 10px 0; }

@media (max-width: 768px) {
    .checkout-steps { padding: 12px; margin-bottom: 12px; }
    .step { font-size: 11px; padding: 0 4px; }
    .step-num { width: 20px; height: 20px; font-size: 11px; }
    .checkout-card { padding: 14px; }
    .amount-summary { position: static; padding: 14px; }
    .final-price { font-size: 18px; }
    .btn-alipay { font-size: 15px; padding: 12px; }
}

/* =============================================
   地址管理
   ============================================= */
.address-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 20px; }
.address-card {
    background: var(--color-white);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.address-card:hover { border-color: var(--color-primary); }
.address-card.selected { border-color: var(--color-primary); background: #f0f5fa; }
.default-badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 2px 8px; border-radius: 3px;
    font-size: 11px; font-weight: 700;
}
@media (max-width: 768px) { .address-list { grid-template-columns: 1fr; gap: 10px; } .address-card { padding: 12px; } }

/* =============================================
   订单列表
   ============================================= */
.order-card { background: var(--color-white); border-radius: var(--radius-md); border: 1px solid var(--color-border); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.order-card-header { background: #f5f7fa; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border); }
.order-no { font-size: 13px; color: var(--color-text-light); }
.order-date { font-size: 12px; color: var(--color-text-light); }
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-pending { background: #fff7e6; color: #d46b08; }
.status-paid { background: #f0faf4; color: var(--color-success); }
.status-shipped { background: #e8f4fd; color: #1677ff; }
.status-completed { background: #f0faf4; color: var(--color-success); }
.status-cancelled { background: #fdf0f0; color: var(--color-danger); }

/* =============================================
   订单成功页
   ============================================= */
.success-box {
    text-align: center; padding: 36px 20px 24px;
    background: var(--color-white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); margin-bottom: 20px;
}
.success-icon { font-size: 56px; margin-bottom: 12px; }
.success-title { font-size: 22px; font-weight: 700; color: var(--color-success); margin-bottom: 8px; }
.success-subtitle { font-size: 14px; color: var(--color-text-light); }

.order-detail-box { background: var(--color-white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); margin-bottom: 20px; }
.order-detail-box h3 { font-size: 16px; font-weight: 700; color: var(--color-primary); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.detail-row { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid #f5f7fa; }
.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--color-text-light); flex-shrink: 0; min-width: 90px; }

.order-items-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.order-items-table th { background: #f5f7fa; padding: 8px 10px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--color-border); }
.order-items-table td { padding: 8px 10px; border-bottom: 1px solid #f5f7fa; }

.order-amount-summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.success-actions { text-align: center; padding: 10px 0 20px; }
.success-actions .btn { padding: 12px 40px; font-size: 15px; }

/* =============================================
   商品详情页
   ============================================= */
.product-detail-container { max-width: 900px; margin: 0 auto; padding: 20px; }
.product-detail-card { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--color-border); }
.product-detail-image { width: 100%; max-height: 400px; object-fit: cover; display: block; }
.product-detail-info { padding: 24px; }
.product-detail-name { font-size: 20px; font-weight: 700; color: var(--color-text); margin-bottom: 10px; line-height: 1.4; }
.product-detail-price { font-size: 28px; font-weight: 700; color: var(--color-danger); margin-bottom: 16px; }
.product-detail-price small { font-size: 16px; }
.product-detail-spec { font-size: 14px; color: var(--color-text-light); margin-bottom: 12px; }
.product-detail-desc { font-size: 14px; color: var(--color-text); line-height: 1.7; margin-bottom: 20px; padding: 14px; background: #f8fafc; border-radius: var(--radius-sm); border-left: 3px solid var(--color-accent); }
.product-detail-actions { display: flex; gap: 12px; }
.product-detail-actions .btn { flex: 1; padding: 14px; font-size: 15px; font-weight: 600; }
@media (max-width: 768px) {
    .product-detail-container { padding: 12px; }
    .product-detail-info { padding: 16px; }
    .product-detail-name { font-size: 17px; }
    .product-detail-price { font-size: 22px; }
    .product-detail-actions { flex-direction: column; }
}

/* =============================================
   页脚
   ============================================= */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.6); padding: 24px 20px 16px; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-brand-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: rgba(200,168,75,0.3);
    border: 1px solid rgba(200,168,75,0.5);
    border-radius: 6px;
    font-size: 10px; font-weight: 900;
    color: var(--color-accent-light);
    letter-spacing: -1px;
}
.footer-brand-name { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); letter-spacing: 1px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 12px; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-accent-light); text-decoration: none; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 12px; margin-top: 8px; }
.footer-url { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 4px; }
@media (max-width: 768px) { .site-footer { padding: 18px 14px 12px; } .footer-copy { font-size: 11px; } }

/* =============================================
   工具类
   ============================================= */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-muted { color: var(--color-text-light); }
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }

/* =============================================
   增强移动端自适应（补充）
   ============================================= */

/* 购物车移动端：改为卡片式布局替代横向滚动表格 */
@media (max-width: 520px) {
    /* 购物车表格在极小屏幕改为卡片 */
    .cart-items-table table,
    .cart-items-table thead,
    .cart-items-table tbody,
    .cart-items-table th,
    .cart-items-table td,
    .cart-items-table tr { display: block; }
    .cart-items-table thead { display: none; }
    .cart-items-table tr {
        border: 1px solid #dce1e7;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 10px;
        background: #fff;
    }
    .cart-items-table td { border: none; padding: 4px 0; font-size: 13px; }
    .cart-img { width: 64px !important; height: 64px !important; }
}

/* 商品卡片在极小屏幕优化 */
@media (max-width: 380px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-card { font-size: 12px; }
    .product-name { font-size: 13px; }
    .price-current { font-size: 15px; }
    .shop-main { padding: 10px 8px; }
}

/* 导航栏在极小屏幕优化 */
@media (max-width: 380px) {
    .logo-text { font-size: 14px; }
    .logo-sub { font-size: 9px; }
    .logo-badge { width: 30px; height: 30px; font-size: 11px; }
    .nav-link { font-size: 12px; padding: 0 6px; }
}

/* 结算页面移动端优化 */
@media (max-width: 520px) {
    .checkout-card { padding: 14px; }
    .checkout-item-img { width: 52px; height: 52px; }
    .checkout-item-name { font-size: 13px; }
    .amount-summary { position: static !important; }
    .steps { gap: 0; }
    .step-name { display: none; }
    .step-num { width: 22px; height: 22px; font-size: 11px; }
    .step-arrow { font-size: 14px; padding: 0 2px; }
}

/* 登录/注册页移动端优化 */
@media (max-width: 480px) {
    .auth-container { padding: 12px; }
    .auth-box { padding: 24px 16px; }
    .auth-logo-badge { width: 52px; height: 52px; font-size: 18px; }
    .auth-title { font-size: 20px; }
}

/* 地址管理页移动端优化 */
@media (max-width: 480px) {
    .address-list { grid-template-columns: 1fr; }
    .address-card { padding: 12px; }
}

/* 商品详情页移动端优化 */
@media (max-width: 480px) {
    .product-detail-container { padding: 8px; }
    .product-detail-info { padding: 14px; }
    .product-detail-name { font-size: 16px; }
    .product-detail-price { font-size: 20px; }
    .product-detail-desc { padding: 10px; font-size: 13px; }
    .product-detail-actions .btn { padding: 12px; font-size: 14px; }
}

/* 页脚移动端优化 */
@media (max-width: 480px) {
    .footer-links { gap: 10px; }
    .footer-links a { font-size: 11px; }
    .footer-brand-name { font-size: 13px; }
}

/* 通用：防止水平溢出 */
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
.container { box-sizing: border-box; }

/* 触摸设备优化：增大可点击区域 */
@media (hover: none) and (pointer: coarse) {
    .cat-btn { padding: 8px 16px; }
    .nav-link { padding: 8px 10px; }
    .qty-btn { width: 32px; height: 32px; }
    .btn { min-height: 44px; }
    .btn-to-checkout { padding: 15px; }
    .btn-submit { padding: 16px; }
}

/* =============================================
   商品详情页 - product.php 专用样式
   ============================================= */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
}
.product-detail-image {
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    min-height: 320px;
}
.product-detail-image img {
    width: 100%; height: 100%; max-height: 420px;
    object-fit: cover; display: block;
}
.product-detail-info { padding: 28px 24px; }
.product-detail-name { font-size: 20px; font-weight: 700; color: var(--color-text); margin-bottom: 10px; line-height: 1.4; }
.product-detail-spec { font-size: 13px; color: var(--color-text-light); margin-bottom: 14px; line-height: 1.6; }
.product-detail-price {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.price-label { font-size: 13px; color: var(--color-text-light); }
.price-big { font-size: 30px; font-weight: 700; color: var(--color-danger); }
.price-big::before { content: '¥'; font-size: 18px; }
.price-original { font-size: 15px; color: var(--color-text-light); text-decoration: line-through; }
.price-save {
    font-size: 12px; font-weight: 600;
    background: #fff0f0; color: var(--color-danger);
    padding: 2px 8px; border-radius: 3px;
}
.product-detail-stock { font-size: 13px; color: var(--color-text-light); margin-bottom: 16px; }
.product-detail-desc {
    background: #f8fafc; border-radius: var(--radius-sm);
    padding: 14px; margin-bottom: 20px;
    border-left: 3px solid var(--color-accent);
}
.product-detail-desc h3 { font-size: 14px; font-weight: 600; color: var(--color-primary); margin-bottom: 8px; }
.product-detail-desc p { font-size: 13px; color: var(--color-text); line-height: 1.7; }
.quantity-selector {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
}
.quantity-selector label { font-size: 14px; color: var(--color-text-light); }
.quantity-selector button {
    width: 32px; height: 32px;
    border: 1.5px solid var(--color-border);
    background: #f5f7fa; border-radius: var(--radius-sm);
    font-size: 18px; cursor: pointer; color: var(--color-text);
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.quantity-selector button:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.quantity-selector input {
    width: 56px; text-align: center;
    border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
    padding: 6px; font-size: 15px; font-weight: 600;
}
.product-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.product-buttons .btn { flex: 1; min-width: 120px; padding: 13px; font-size: 15px; font-weight: 600; }
.out-of-stock { color: var(--color-text-light); font-size: 14px; padding: 10px 0; }
@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
    .product-detail-image { min-height: 240px; }
    .product-detail-info { padding: 18px; }
    .product-detail-name { font-size: 17px; }
    .price-big { font-size: 24px; }
    .product-buttons .btn { padding: 12px; font-size: 14px; }
}
@media (max-width: 480px) {
    .product-detail-info { padding: 14px; }
    .product-detail-name { font-size: 16px; }
    .price-big { font-size: 22px; }
    .product-buttons { flex-direction: column; }
    .product-buttons .btn { min-width: unset; }
}
