/* ===== 巴西批发商城风格 ===== */
:root {
    --primary: #FF4E1F;
    --primary-dark: #E65100;
    --primary-light: #FFF3ED;
    --secondary: #2E7D32;
    --secondary-light: #EAF6EE;
    --danger: #E53935;
    --text: #212121;
    --text-muted: #757575;
    --text-secondary: #757575;
    --border: #E0E0E0;
    --bg: #F5F7FA;
    --card-bg: #FFFFFF;
    --dark: #1A1A1A;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; 
    font-size: 14px; 
    color: var(--text); 
    background: var(--bg); 
    line-height: 1.5;
}
a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }
.container { width: 1240px; max-width: 96%; margin: 0 auto; }

/* ===== 顶部工具栏 ===== */
.topbar { background: #17211B; color: #fff; font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.topbar-left { display: flex; align-items: center; gap: 20px; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-right > span a { color: #fff; font-size: 12px; }
.topbar-right > span a:hover { color: #fff; text-decoration: underline; }
.topbar-badge { background: var(--secondary); color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }

/* ===== 用户下拉菜单 ===== */
.lang-switcher { display: flex; align-items: center; gap: 6px; margin-right: 12px; font-size: 12px; }
.lang-switcher a { color: rgba(255,255,255,0.9); transition: all 0.2s; font-size: 12px; padding: 2px 10px; border-radius: 12px; }
.lang-switcher a:hover { color: #fff; background: rgba(255,255,255,0.2); }
.lang-switcher a.active { color: #fff; background: rgba(255,255,255,0.25); font-weight: 700; }
.lang-sep { color: rgba(255,255,255,0.4); }

.user-dropdown { position: relative; }
.user-dropdown-trigger {
    display: flex; align-items: center; gap: 6px;
    color: rgba(255,255,255,0.9); font-size: 12px;
    padding: 4px 10px; border-radius: 16px;
    transition: background 0.2s;
}
.user-dropdown-trigger:hover { background: rgba(255,255,255,0.08); color: #fff; }
.user-icon { font-size: 14px; }
.user-name { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-arrow { font-size: 10px; opacity: 0.7; }
.user-dropdown-menu {
    position: absolute; top: 100%; right: 0;
    background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 200px; padding: 8px 0; z-index: 200;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}
.user-dropdown:hover .user-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.user-greeting { font-size: 12px; color: var(--text-muted); display: block; }
.user-dropdown-name { font-size: 14px; font-weight: 700; color: var(--text); display: block; margin-top: 2px; }
.user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; font-size: 13px; color: var(--text);
    transition: background 0.15s;
}
.user-dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.user-dropdown-item.logout { color: #E53935; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.user-dropdown-item.logout:hover { background: #FFEBEE; color: #C62828; }

/* ===== 头部 ===== */
.header { background: #FFFFFF; color: var(--text); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.10); border-bottom: 1px solid #E5E7EB; }
.header-inner { display: flex; align-items: center; padding: 18px 0; gap: 28px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.logo-text { color: var(--primary); }
.header .logo-text2 { color: var(--text); }
.logo-tag { background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }

.search-box { flex: 1; max-width: 620px; }
.search-box form { display: flex; border: 2px solid #E5E7EB; border-radius: 28px; overflow: hidden; background: #fff; }
.search-box input { flex: 1; border: none; outline: none; padding: 12px 20px; font-size: 14px; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #9CA3AF; }
.search-box button { background: var(--primary); color: #fff; border: none; padding: 0 28px; cursor: pointer; font-size: 14px; font-weight: 700; transition: background 0.2s; border-radius: 0 28px 28px 0; }
.search-box button:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-cart { position: relative; }
.cart-btn { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1.5px solid var(--secondary); border-radius: 24px; background: #fff; color: var(--secondary); font-weight: 600; transition: all 0.2s; }
.cart-btn:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.cart-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cart-count { position: absolute; top: -8px; right: -8px; background: var(--primary); color: #fff; border-radius: 50%; min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.cart-added-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 292px;
    padding: 18px;
    background: #fff;
    color: var(--text);
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    z-index: 260;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s ease;
    text-align: center;
}
.cart-added-popover::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}
.cart-added-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.cart-added-title {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.cart-added-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    border-radius: 5px;
    background: var(--secondary);
    color: #fff;
    font-weight: 800;
}
.cart-added-link:hover { background: #0f5f35; color: #fff; }

/* ===== 主导航 ===== */
html body nav.nav { background-color: #FFFFFF !important; color: var(--text); border-bottom: 2px solid #F3F4F6; }
html body nav.nav .nav-inner { background-color: #FFFFFF !important; }
.nav-inner { display: flex; align-items: center; gap: 8px; }
.nav-list { display: flex; list-style: none; gap: 4px; }
html body nav.nav .nav-list li a { display: block; padding: 14px 20px; color: var(--text) !important; font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; transition: all 0.2s; }
.nav-list li a:hover { color: var(--secondary); border-bottom-color: var(--secondary-light); }
html body nav.nav .nav-list li a.active { color: var(--primary) !important; border-bottom-color: var(--primary); }
.nav-dept {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary) !important;
    font-weight: 700;
    font-size: 13px;
    padding: 14px 0;
}
.nav-dept:hover { color: var(--primary); }
html body nav.nav .nav-dept.active { color: var(--primary) !important; }

/* ===== 轮播图 ===== */
.banner { padding: 24px 0; }
.banner-slider { border-radius: var(--radius-lg); overflow: hidden; height: 360px; position: relative; }
.banner-slides { position: relative; height: 100%; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; opacity: 0; animation: fade 12s infinite; padding: 0 60px; }
.banner-slide a.banner-link { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.banner-slide .banner-content { position: relative; z-index: 2; }
.banner-slide:nth-child(1) { animation-delay: 0s; }
.banner-slide:nth-child(2) { animation-delay: 4s; }
.banner-slide:nth-child(3) { animation-delay: 8s; }
@keyframes fade { 0%,30% { opacity: 1; } 35%,100% { opacity: 0; } }
.banner-0 { background: linear-gradient(135deg, #00703C 0%, #00A86B 100%); }
.banner-1 { background: linear-gradient(135deg, #FF5A00 0%, #FFA46E 100%); }
.banner-2 { background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%); }
.banner-content { color: #fff; max-width: 520px; }
.banner-content h2 { font-size: 44px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.banner-content p { font-size: 18px; margin-bottom: 28px; opacity: 0.95; }
.banner-btn { display: inline-block; padding: 12px 32px; background: #fff; color: var(--primary); border-radius: 24px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.banner-btn:hover { background: var(--primary-light); color: var(--primary-dark); }

/* ===== 快捷分类 ===== */
.quick-cats { padding: 24px 0; }
.quick-cats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.quick-cat-item { background: var(--card-bg); border-radius: var(--radius-lg); padding: 20px 12px 18px; text-align: center; box-shadow: var(--shadow); transition: all 0.25s; border: 1px solid var(--border); min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.quick-cat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.quick-cat-media { width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; border-radius: 18px; overflow: hidden; background: var(--primary-light); border: 1px solid #f2ddd3; }
.quick-cat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quick-cat-icon {
    width: 100%; height: 100%; border-radius: 18px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; transition: all 0.25s;
    border: 2px solid transparent;
}
.quick-cat-item:hover .quick-cat-icon {
    background: var(--primary); color: #fff; border-color: var(--primary);
    transform: scale(1.05);
}
.quick-cat-name { font-size: 14px; color: var(--text); font-weight: 600; }

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -6px 0 20px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.category-filter-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}
.category-filter-item:hover,
.category-filter-item.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* ===== 主体内容 ===== */
.main { padding: 16px 0 48px; }
.section { margin-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title h3 { font-size: 22px; font-weight: 800; color: var(--text); }
.section-title::before { content: ''; display: block; width: 5px; height: 24px; background: var(--secondary); border-radius: 3px; }
.section-more { color: var(--text-muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.section-more:hover { color: var(--primary); }

/* ===== 商品卡片 ===== */
.product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* ===== 商品轮播 ===== */
.product-carousel { position: relative; }
.product-carousel-track {
    display: flex; gap: 16px;
    overflow: hidden;
    scroll-behavior: smooth;
}
.product-carousel-track .product-card {
    flex: 0 0 calc(20% - 13px);
    min-width: 0;
}
.product-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; border: 2px solid var(--border);
    color: var(--secondary); font-size: 16px; font-weight: 800;
    cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: all 0.2s;
}
.product-carousel-btn:hover {
    background: var(--secondary); border-color: var(--secondary); color: #fff;
    box-shadow: 0 6px 16px rgba(0,112,60,0.3);
}
.product-carousel-btn.prev { left: -22px; }
.product-carousel-btn.next { right: -22px; }
.product-carousel-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.product-carousel-btn:disabled:hover { background: #fff; border-color: var(--border); color: var(--secondary); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.product-card { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all 0.25s; position: relative; }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: var(--secondary); }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--secondary); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px; z-index: 2; letter-spacing: 0.3px; }
.product-badge.wholesale { background: var(--primary); }
.product-img { width: 100%; height: 180px; background: #F9FAFB; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s; }
.product-card:hover .product-img img { transform: scale(1.06); }
.product-info { padding: 16px; }
.product-name { font-size: 14px; font-weight: 600; color: var(--text); height: 44px; line-height: 22px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-unit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; color: #233027; font-size: 12px; background: #fff; padding: 7px 10px; border-radius: 8px; border: 1px solid #D7DDD8; font-weight: 800; text-transform: uppercase; }
.product-unit::before { content: '📦'; font-size: 14px; line-height: 1; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.product-price-box { display: flex; flex-direction: column; }
.price-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.price { color: var(--secondary); font-size: 22px; font-weight: 800; line-height: 1.2; }
.price b { font-weight: 800; }
.unit { color: var(--text-muted); font-size: 12px; }
.product-actions { display: flex; gap: 8px; width: 100%; }
.product-qty-box {
    display: grid;
    grid-template-columns: 42px minmax(42px, 1fr) auto 42px;
    align-items: center;
    width: 100%;
    border: 1px solid #D7DDD8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.product-qty-btn {
    width: 42px;
    height: 38px;
    border: none;
    background: #fff;
    color: var(--secondary);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}
.product-qty-btn.primary {
    background: #fff;
    color: var(--secondary);
}
.product-qty-btn:hover,
.product-qty-btn.primary:hover {
    background: var(--secondary);
    color: #fff;
}
.product-qty-input {
    width: 100%;
    height: 38px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    outline: none;
    color: var(--text);
    border-left: 1px solid #EEF0EE;
}
.product-qty-input::-webkit-outer-spin-button,
.product-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.product-qty-input[type=number] {
    -moz-appearance: textfield;
}
.product-qty-unit {
    height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    color: var(--secondary);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    text-transform: uppercase;
    border-right: 1px solid #EEF0EE;
}
.btn-icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; color: var(--text-muted); }
.btn-icon:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-icon.primary { background: var(--primary); border-color: var(--primary); color: #fff; }

.product-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px;
    background: var(--primary); color: #fff;
    border-radius: 10px; border: none;
    font-size: 13px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255,90,0,0.3);
}
.product-add-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,90,0,0.4); }
.product-add-btn:active { transform: translateY(0); }
.product-add-btn .add-plus { font-size: 16px; font-weight: 800; line-height: 1; }
.product-add-btn .add-price { font-size: 13px; font-weight: 800; }
.product-add-btn .add-unit { font-size: 10px; opacity: 0.9; font-weight: 600; }

/* ===== 面包屑 ===== */
.breadcrumb { padding: 14px 0; color: var(--text-muted); font-size: 13px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ===== 商品详情 ===== */
.product-detail { display: flex; gap: 32px; background: var(--card-bg); padding: 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 32px; }
.detail-left { width: 420px; flex-shrink: 0; }
.detail-img { width: 100%; height: 420px; background: #f8f9fa; border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-right { flex: 1; }
.detail-category { color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.detail-name { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.detail-desc { color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; font-size: 14px; }
.detail-price-box { background: var(--secondary-light); border: 1px solid #C9E5D3; padding: 24px; border-radius: 14px; margin-bottom: 24px; }
.detail-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.detail-price .label { font-size: 12px; color: var(--secondary); text-transform: uppercase; font-weight: 700; }
.detail-price .price { color: var(--secondary); font-size: 40px; font-weight: 800; }
.detail-price .unit { color: var(--text-muted); font-size: 14px; }
.detail-original { display: flex; align-items: center; gap: 8px; }
.original-price { color: var(--text-muted); text-decoration: line-through; font-size: 14px; }
.original-label { font-size: 12px; color: var(--text-muted); }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.meta-card { background: #f8f9fa; padding: 14px; border-radius: var(--radius); text-align: center; }
.meta-card .label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.meta-card .value { font-size: 16px; font-weight: 700; color: var(--text); }
.detail-action { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.quantity-box { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.qty-btn { width: 42px; height: 42px; border: none; background: transparent; cursor: pointer; font-size: 18px; color: var(--text); }
.qty-btn:hover { background: #f0f0f0; }
#quantity { width: 64px; height: 42px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); outline: none; font-size: 15px; font-weight: 600; }
.btn-cart { padding: 14px 28px; border: 2px solid var(--secondary); background: #fff; color: var(--secondary); border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 700; transition: all 0.2s; }
.btn-cart:hover { background: var(--secondary); color: #fff; }
.btn-buy { padding: 14px 28px; background: var(--primary); color: #fff; border: 2px solid var(--primary); border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 700; transition: all 0.2s; }
.btn-buy:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.detail-tips { display: flex; gap: 24px; color: var(--text-muted); font-size: 13px; }
.detail-tips span { display: flex; align-items: center; gap: 6px; }

/* ===== 底部 ===== */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 48px 0 24px; margin-top: 48px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 16px; font-weight: 700; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); font-size: 13px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); }

/* ===== 登录注册 ===== */
.auth-page { min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-box { background: var(--card-bg); border-radius: var(--radius-lg); padding: 40px; width: 460px; max-width: 92vw; box-shadow: var(--shadow-hover); border: 1px solid var(--border); }
.auth-box h2 { font-size: 24px; margin-bottom: 6px; color: var(--text); }
.auth-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.auth-tip { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 13px; }
.auth-tip a { color: var(--primary); font-weight: 600; }
.back-home { display: block; text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 12px; }
.readonly-tip { margin-bottom: 16px; color: var(--text-muted); font-size: 13px; background: #f8f9fa; border: 1px dashed var(--border); padding: 10px 12px; border-radius: 8px; }
.btn-submit { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 12px; transition: all 0.2s; box-shadow: 0 4px 12px rgba(255,90,0,0.25); }
.btn-submit:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(255,90,0,0.35); transform: translateY(-1px); }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; margin-bottom: 6px; color: var(--text); font-size: 13px; font-weight: 500; }
.form-item input, .form-item select, .form-item textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; transition: border-color 0.2s; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== 购物车 ===== */
.cart-section { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { background: #f8f9fa; padding: 16px; text-align: left; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table tr:hover { background: #fafafa; }
.cart-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); vertical-align: middle; margin-right: 12px; background: #f8f9fa; }
.text-red { color: var(--primary); font-weight: 700; }
.link-danger { color: #D32F2F; font-size: 13px; }
.link-danger:hover { color: #B71C1C; }
.qty-wrap { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); }
.qty-wrap button { width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; color: var(--text); }
.qty-wrap button:hover { background: #f0f0f0; }
.qty-wrap input { width: 50px; height: 32px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); outline: none; font-weight: 600; }
.cart-footer { display: flex; justify-content: flex-end; align-items: center; padding: 20px 24px; background: #f8f9fa; gap: 24px; }
.cart-total { font-size: 15px; color: var(--text); }
.total-price { color: var(--primary); font-size: 26px; font-weight: 800; margin-left: 8px; }
.total-price b { font-weight: 800; }
.btn-checkout { padding: 14px 40px; background: var(--primary); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(255,90,0,0.25); }
.btn-checkout:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(255,90,0,0.35); transform: translateY(-1px); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 80px 0; color: var(--text-muted); font-size: 15px; }
.empty a { color: var(--primary); font-weight: 600; }

/* ===== 结算 ===== */
.checkout-section { background: var(--card-bg); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.checkout-section input[readonly] { background: #f8f9fa; color: var(--text-muted); cursor: not-allowed; }
.checkout-section textarea { min-height: 160px; resize: vertical; }
.section-h3 { font-size: 17px; margin-bottom: 20px; color: var(--text); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-h3::before { content: ''; display: block; width: 5px; height: 18px; background: var(--secondary); border-radius: 3px; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-item { display: block; }
.pay-item input { display: none; }
.pay-content { border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: all 0.2s; }
.pay-item input:checked + .pay-content { border-color: var(--secondary); background: var(--secondary-light); }
.pay-title { font-weight: 700; margin-bottom: 6px; color: var(--text); }
.pay-desc { color: var(--text-muted); font-size: 12px; }
.checkout-footer { display: flex; justify-content: flex-end; align-items: center; padding: 24px; background: var(--card-bg); border-radius: var(--radius); gap: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }

/* ===== 订单 ===== */
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.order-head { display: flex; align-items: center; gap: 20px; padding: 14px 20px; background: #f8f9fa; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.order-head .tag { margin-left: auto; }
.order-body { display: flex; justify-content: space-between; align-items: center; padding: 20px; }
.order-info p { margin-bottom: 6px; color: var(--text-muted); }
.order-info span { color: var(--text); }
.order-actions { text-align: right; }
.btn-detail { display: inline-block; padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; margin-left: 8px; font-weight: 500; }
.btn-detail:hover { border-color: var(--primary); color: var(--primary); }
.btn-cancel { display: inline-block; padding: 8px 20px; border: 1px solid #D32F2F; border-radius: var(--radius); color: #D32F2F; font-size: 13px; margin-left: 8px; cursor: pointer; }
.btn-cancel:hover { background: #D32F2F; color: #fff; }

/* ===== 订单详情 ===== */
.order-detail { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.detail-head { padding: 24px; border-bottom: 1px solid var(--border); }
.detail-head h3 { font-size: 18px; margin-bottom: 10px; font-weight: 700; }
.order-status { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }
.detail-section { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.detail-section h4 { font-size: 15px; margin-bottom: 14px; color: var(--text); font-weight: 700; }
.detail-section p { margin-bottom: 8px; color: var(--text-muted); }
.detail-foot { padding: 20px 24px; text-align: right; font-size: 15px; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.tag-green { background: var(--secondary-light); color: var(--secondary); }
.tag-orange { background: var(--primary-light); color: var(--primary-dark); }
.tag-blue { background: #EFF6FF; color: #1E40AF; }
.tag-purple { background: #FAF5FF; color: #6B21A8; }
.tag-gray { background: #F3F4F6; color: var(--text-muted); }

/* ===== 会员中心 ===== */
.member-layout { display: flex; gap: 24px; }
.member-sidebar { width: 260px; flex-shrink: 0; }
.member-info-card { background: var(--card-bg); border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.avatar { width: 68px; height: 68px; border-radius: 50%; background: var(--primary); color: #fff; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.member-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.member-company { color: var(--text-muted); font-size: 13px; }
.member-menu { list-style: none; background: var(--card-bg); border-radius: var(--radius); padding: 8px 0; box-shadow: var(--shadow); border: 1px solid var(--border); }
.member-menu li a { display: block; padding: 14px 22px; color: var(--text); font-weight: 500; }
.member-menu li a:hover { background: var(--secondary-light); color: var(--secondary); }
.member-menu li a.active { background: var(--secondary-light); color: var(--secondary); border-left: 3px solid var(--secondary); }
.member-main { flex: 1; }
.panel { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.panel-title { padding: 18px 22px; font-weight: 700; border-bottom: 1px solid var(--border); font-size: 15px; }
.panel-body { padding: 22px; }

/* ===== 错误提示 ===== */
.error-msg { color: #D32F2F; font-size: 13px; margin-bottom: 12px; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-cats-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; gap: 16px; }
    .search-box { order: 3; max-width: 100%; width: 100%; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-cats-grid { grid-template-columns: repeat(3, 1fr); }
    .product-detail { flex-direction: column; }
    .detail-left { width: 100%; }
    .pay-methods { grid-template-columns: 1fr; }
    .member-layout { flex-direction: column; }
    .member-sidebar { width: 100%; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .nav-list { overflow-x: auto; }
    .banner-slider { height: 260px; }
    .banner-content h2 { font-size: 28px; }
    .quick-cats-grid { grid-template-columns: repeat(2, 1fr); }
}





/* ===== Box unit & per-box labels ===== */
.per-box { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-left: 2px; }
.add-per { font-size: 10px; opacity: 0.85; font-weight: 600; margin-left: 1px; }
.product-price-box { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; }

/* ===== Qty unit label in cart & detail ===== */
.qty-unit { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--text-secondary); vertical-align: middle; }
.qty-unit-label { display: inline-flex; align-items: center; padding: 0 8px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.qty-wrap { display: inline-flex; align-items: center; gap: 0; }
.qty-wrap + .qty-unit { display: block; margin-top: 4px; text-align: center; }

/* ===== Cart table price column with per-box ===== */
.cart-table td.text-red { white-space: nowrap; }

/* ===== Product add button refinement ===== */
.product-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(255,90,0,0.25);
}
.product-add-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,90,0,0.4); }
.product-add-btn:active { transform: translateY(0); }
.product-add-btn .add-plus { font-size: 15px; font-weight: 800; line-height: 1; }
.product-add-btn .add-price { font-size: 13px; font-weight: 800; }
.product-add-btn .add-box-text {
    margin-left: 3px;
    padding-left: 6px;
    border-left: 1px solid rgba(255,255,255,0.3);
    font-size: 11px;
    font-weight: 700;
    opacity: 0.92;
}

/* ===== Detail page quantity box ===== */
.quantity-box { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.quantity-box .qty-btn { width: 36px; height: 36px; background: var(--bg); border: none; cursor: pointer; font-size: 18px; color: var(--text); transition: background 0.2s; }
.quantity-box .qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.quantity-box input { width: 60px; height: 36px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 14px; outline: none; }

/* ===== Language switcher refinement ===== */
.lang-switcher { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.lang-switcher a { color: rgba(255,255,255,0.85); text-decoration: none; transition: color 0.2s; }
.lang-switcher a:hover { color: #fff; }
.lang-switcher a.active { color: #fff; font-weight: 700; }
.lang-sep { color: rgba(255,255,255,0.4); }

/* ===== Auth page topbar ===== */
.auth-page .topbar { position: static; }

/* ===== Detail price refinement ===== */
.detail-price .unit { font-size: 14px; color: var(--text-secondary); font-weight: 500; margin-left: 2px; }


/* ===== Language dropdown ===== */
.lang-switcher { display: inline-flex; align-items: center; font-size: 12px; margin-right: 0; }
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 24px 4px 10px;
    font-size: 12px;
    border-radius: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><polygon points='0,2 10,2 5,8' fill='white'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
}
.lang-select:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}
.lang-select option {
    color: #333;
    background: #fff;
    padding: 6px 10px;
}

/* ===== Currency symbol ===== */
.cur-symbol { font-weight: 600; font-size: 0.85em; margin-right: 1px; vertical-align: baseline; }
.product-price-box .cur-symbol { font-size: 14px; font-weight: 600; }
.product-price-box .price { font-size: 20px; color: var(--danger); font-weight: 700; }
.product-add-btn .add-price .cur-symbol { font-size: 12px; }
.total-price .cur-symbol { font-size: 14px; }

/* ===== Full-banner clickable ===== */
.banner-slide .banner-content {
    pointer-events: none;
}
.banner-slide .banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.banner-slide:has(.banner-image)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 0;
}
.banner-slide:has(.banner-image) .banner-content { z-index: 2; }
.banner-slide .banner-content .banner-btn {
    pointer-events: auto;
}

/* ===== Unit price + whole-box purchase ===== */
.product-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.product-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    width: 100%;
}
.unit-price-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px;
}
.box-price,
.detail-box-price,
.cart-unit-note {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}
.box-price {
    white-space: nowrap;
}
.detail-box-price {
    margin-top: 4px;
}
.detail-box-tip {
    margin-top: 4px;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 700;
}
.product-add-btn .add-box-text {
    font-size: 12px;
    font-weight: 800;
}
.cart-price-cell .text-red {
    white-space: nowrap;
}

