/* ========================================
   智仪全球 - 批发采购页面样式
   ======================================== */

.wholesale-hero {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #01579b 100%);
    color: #fff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.wholesale-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,188,212,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.wh-hero-content { position: relative; z-index: 1; }
.wh-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.wholesale-hero h1 {
    font-size: 36px;
    margin-bottom: 16px;
    line-height: 1.3;
}
.wholesale-hero h1 .gradient-text {
    background: linear-gradient(90deg, #00e5ff, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.wholesale-hero p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin-bottom: 24px;
}
.wh-features {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.wh-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}
.wh-feat-icon { font-size: 24px; }

/* 面包屑 */
.breadcrumb {
    background: #f5f7fa;
    padding: 12px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}
.breadcrumb a { color: #1a73e8; text-decoration: none; }

/* 主布局 */
.wholesale-main { padding: 40px 0; background: #f8f9fb; }
.wh-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: start;
}

/* 产品面板 */
.wh-products-panel {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.wh-panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.wh-panel-header h2 { font-size: 18px; margin: 0; }
.wh-search-box input {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}
.wh-search-box input:focus { border-color: #1a73e8; }

.wh-filter-bar {
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.wh-filter-bar select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* 产品列表 */
.wh-product-list {
    max-height: 700px;
    overflow-y: auto;
}
.wh-prod-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    gap: 16px;
    transition: background 0.2s;
}
.wh-prod-item:hover { background: #f8f9ff; }
.wh-prod-item.added { background: #e8f5e9; }
.wh-prod-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    border-radius: 8px;
    font-size: 28px;
    flex-shrink: 0;
}
.wh-prod-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.wh-prod-info { flex: 1; min-width: 0; }
.wh-prod-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wh-prod-meta { font-size: 12px; color: #888; margin-bottom: 6px; }
.wh-prod-tiers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.wh-tier-mini {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f4ff;
    color: #1a73e8;
    font-weight: 500;
}
.wh-tier-mini.active { background: #1a73e8; color: #fff; }
.wh-prod-action { flex-shrink: 0; }
.wh-prod-add-btn {
    padding: 8px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.wh-prod-add-btn:hover { background: #1557b0; }
.wh-prod-add-btn.added { background: #00c853; }
.wh-prod-add-btn.added:hover { background: #00a844; }

/* 采购单面板 */
.wh-cart-panel {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 20px;
}
.wh-cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9ff;
}
.wh-cart-header h2 { font-size: 18px; margin: 0; }
.wh-cart-count { font-size: 13px; color: #1a73e8; font-weight: 600; }
.wh-cart-list { max-height: 400px; overflow-y: auto; padding: 12px; }
.wh-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}
.wh-cart-empty p { margin: 12px 0 4px; font-size: 15px; }
.wh-cart-empty small { font-size: 12px; color: #ccc; }

.wh-cart-item {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}
.wh-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.wh-cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
    padding-right: 8px;
}
.wh-cart-item-remove {
    color: #ff3d00;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
}
.wh-cart-item-tiers {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.wh-cart-tier {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e0e0e0;
    color: #666;
}
.wh-cart-tier.active { background: #1a73e8; color: #fff; }
.wh-cart-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wh-cart-qty-row label { font-size: 12px; color: #666; }
.wh-qty-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    outline: none;
}
.wh-qty-input:focus { border-color: #1a73e8; }
.wh-cart-item-price {
    font-size: 13px;
    color: #1a73e8;
    font-weight: 600;
}
.wh-cart-item-price small { color: #999; font-weight: 400; }

/* 采购单汇总 */
.wh-cart-summary {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fafbfc;
}
.wh-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #555;
}
.wh-summary-row.total {
    border-top: 1px solid #ddd;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}
.wh-savings { color: #00c853; font-weight: 600; }
.wh-total-price { color: #ff5722; font-size: 22px; }

.wh-cart-actions {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #eee;
}
.wh-cart-actions .btn { flex: 1; }

/* 阶梯价格说明 */
.tier-info { padding: 60px 0; background: #fff; }
.tier-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.tier-info-table {
    width: 100%;
    border-collapse: collapse;
}
.tier-info-table th {
    background: #1a73e8;
    color: #fff;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}
.tier-info-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.tier-info-table tr:last-child td { border-bottom: none; }
.tier-info-table tr:hover td { background: #f8f9ff; }
.tier-tag {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.tier-1 { background: #e3f2fd; color: #1565c0; }
.tier-2 { background: #e8f5e9; color: #2e7d32; }
.tier-3 { background: #fff3e0; color: #e65100; }
.tier-4 { background: #fce4ec; color: #c62828; }
.tier-note {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}
.tier-note a { color: #1a73e8; }

/* 响应式 */
@media (max-width: 1024px) {
    .wh-layout { grid-template-columns: 1fr; }
    .wh-cart-panel { position: static; }
}
@media (max-width: 768px) {
    .wholesale-hero h1 { font-size: 24px; }
    .wh-features { gap: 16px; }
    .wh-search-box input { width: 100%; }
    .wh-prod-item { flex-wrap: wrap; }
    .wh-prod-action { width: 100%; }
    .wh-prod-add-btn { width: 100%; }
}
