﻿/* WSTPARTS - 主样式文件 */
/* 黄黑白配色方案 - 工程机械风格 */

/* ==================== 字体引入 ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==================== 全局变量 ==================== */
:root {
    /* 主色调 - 黄色系 */
    --primary-yellow: #F5A623;
    --primary-yellow-dark: #FFA000;
    --primary-yellow-light: #FFECB3;
    
    /* 辅助色 */
    --primary-black: #1A1A1A;
    --primary-gray: #4A4A4A;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #666666;
    
    /* 功能色 */
    --success-green: #4CAF50;
    --error-red: #F44336;
    --warning-orange: #FF9800;
    --info-blue: #2196F3;
    
    /* 文字颜色 */
    --text-primary: #1A1A1A;
    --text-secondary: #333333;
    --text-tertiary: #666666;
    --text-placeholder: #999999;
    
    /* 背景色 */
    --bg-white: #FFFFFF;
    --bg-light: #FAFAFA;
    --bg-dark: #1A1A1A;
    --bg-black: #000000;
    
    /* 边框 */
    --border-light: #E0E0E0;
    --border-medium: #CCCCCC;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.25);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4.5rem;
    
    /* 布局 */
    --container-width: 1400px;
    --header-height: 68px;
    
    /* 过渡 */
    --transition-fast: 0.15s;
    --transition-normal: 0.25s;
    --transition-slow: 0.45s;
}

/* ==================== 重置样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    letter-spacing: 0.01em;
}

/* ==================== 布局容器 ==================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* ==================== 顶部导航 ==================== */
.top-bar {
    background-color: var(--primary-black);
    color: var(--bg-white);
    font-size: 13px;
    height: 36px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}

.top-bar-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.top-bar-phone {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
    white-space: nowrap;
}

.top-bar a {
    color: var(--bg-white);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.top-bar a:hover {
    color: var(--primary-yellow);
}

/* 主导航栏 */
.main-header {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-bottom: 3px solid var(--primary-yellow);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 10px; /* 添加间距 */
}

/* 调整搜索框宽度 */
.search-box {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-input {
    padding: 9px 14px;
    border: 1.5px solid var(--border-medium);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    width: 220px;
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
    background: #fff;
}

.search-input:focus {
    border-color: var(--primary-yellow);
    background: #fffdf0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 23px;
    font-weight: 800;
    color: var(--primary-black);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.logo-text span {
    color: var(--primary-yellow-dark);
}

/* 导航菜单 */
.main-nav {
    flex: 1;
    margin: 0 var(--spacing-lg);
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: nowrap; /* 防止换行 */
    white-space: nowrap; /* 防止文字换行 */
}

.main-nav li {
    position: relative;
}

.main-nav > ul > li {
    margin: 0 8px; /* 减小间距 */
}

.main-nav a {
    display: block;
    padding: 10px 14px; /* 减小内边距 */
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px; /* 稍微减小字体 */
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap; /* 防止文字换行 */
}

.main-nav a:hover {
    background-color: var(--primary-yellow);
    color: var(--primary-black);
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.main-nav li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-light);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    padding: 10px 15px;
    font-size: 14px;
}

/* 搜索框样式已在上面定义 */

.search-btn {
    padding: 9px 18px;
    background: var(--primary-yellow);
    color: var(--primary-black);
    border: 1.5px solid var(--primary-yellow);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-yellow-dark);
    border-color: var(--primary-yellow-dark);
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 8px;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-yellow-dark) 100%);
    color: var(--primary-black);
    box-shadow: 0 4px 14px rgba(255,193,7,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-yellow-dark) 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,193,7,0.4);
}

.btn-secondary {
    background-color: var(--primary-black);
    color: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-secondary:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-black);
    color: var(--primary-black);
}

.btn-outline:hover {
    background-color: var(--primary-black);
    color: var(--bg-white);
}

.btn-large {
    padding: 14px 34px;
    font-size: 17px;
    border-radius: var(--radius-lg);
}

.btn-small {
    padding: 7px 16px;
    font-size: 13px;
}

/* ==================== 轮播图 ==================== */
.carousel-section {
    padding: 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
    background: var(--primary-black);
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 轮播图片 */
.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,10,0.85) 0%, rgba(40,40,40,0.6) 60%, rgba(0,0,0,0.3) 100%);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

/* 文字内容层 */
.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 var(--spacing-xl);
    max-width: 900px;
}

.carousel-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.carousel-title span {
    color: var(--primary-yellow);
}

.carousel-subtitle {
    font-size: 20px;
    margin-bottom: var(--spacing-xl);
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* 左右切换按钮 */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 4;
    pointer-events: none;
}

.carousel-btn {
    pointer-events: auto;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
}

.carousel-btn:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--primary-black);
    transform: scale(1.1);
}

/* 圆点指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: var(--primary-yellow);
    transform: scale(1.3);
}

.carousel-indicator:hover {
    background: rgba(255,255,255,0.8);
}

/* 无图片时的渐变占位背景 */
.carousel-slide:nth-child(1) { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.carousel-slide:nth-child(2) { background: linear-gradient(135deg, #2d1b00 0%, #4a2c00 50%, #6b3e00 100%); }
.carousel-slide:nth-child(3) { background: linear-gradient(135deg, #0d2137 0%, #1a3a52 50%, #0d2137 100%); }

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ==================== 英雄区域 ==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--primary-gray) 100%);
    color: var(--bg-white);
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-yellow-dark) 100%);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-yellow);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: var(--spacing-xl);
    color: var(--primary-yellow-light);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

/* ==================== 通用区块 ==================== */
section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    position: relative;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-yellow), var(--primary-yellow-dark));
    border-radius: 2px;
    margin: 12px auto 0;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ==================== 产品展示 ==================== */
.products-section {
    background-color: var(--bg-light);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: var(--primary-yellow);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--light-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    background: var(--primary-yellow);
    color: var(--primary-black);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.product-info {
    padding: var(--spacing-md);
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-code {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-xs);
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
}

.price-current {
    font-size: 24px;
    font-weight: 700;
    color: var(--warning-orange);
}

.price-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ==================== 表格样式 ==================== */
.table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table-striped {
    width: 100%;
}

.table-striped thead {
    background-color: var(--primary-black);
    color: var(--bg-white);
}

.table-striped th,
.table-striped td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table-striped th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.table-striped tbody tr:hover {
    background-color: var(--primary-yellow-light);
}

.table-striped tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
}

.form-row .form-group {
    flex: 1;
}

/* ==================== 分页样式 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xl);
}

.page-item {
    padding: 8px 16px;
    border: 1px solid var(--border-medium);
    background: var(--bg-white);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.page-item:hover,
.page-item.active {
    background: var(--primary-yellow);
    color: var(--primary-black);
    border-color: var(--primary-yellow);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        height: 56px;
        padding: 0;
        flex-direction: row;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 0;
    }
    
    .search-box {
        display: none;
    }
    
    .search-input {
        flex: 1;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-title {
        font-size: 28px;
    }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-black); }
.text-secondary { color: var(--primary-gray); }
.text-yellow { color: var(--primary-yellow); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--spacing-sm); }

/* ==================== 品牌展示 ==================== */
.brands-section {
    background: #242424;
    padding: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.brands-carousel {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    min-width: 80px;
}

.brand-item:hover {
    background: rgba(255,193,7,0.1);
    transform: translateY(-3px);
}

.brand-item img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.brand-item:hover img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(79%) sepia(90%) saturate(500%) hue-rotate(2deg);
}

.brand-item span {
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
}

.brand-item:hover span {
    color: var(--primary-yellow);
}

/* ==================== 产品分类 ==================== */
.categories-section {
    background: #ffffff;
    padding: var(--spacing-2xl) 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-sm);
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #333;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.category-item:hover {
    background: #fff;
    border-color: var(--primary-yellow);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(255,193,7,0.2);
}

.category-icon {
    font-size: 38px;
    margin-bottom: 10px;
    line-height: 1;
    transition: transform var(--transition-normal);
}

.category-item:hover .category-icon {
    transform: scale(1.15);
}

.category-item h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}

.category-item p {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.category-item:hover h3 {
    color: var(--primary-yellow-dark);
}

/* 分类图片模式 */
.category-item.has-img {
    padding: 0;
    overflow: hidden;
    position: relative;
}

.category-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    display: block;
}

.category-item.has-img:hover .category-img-wrap img {
    transform: scale(1.08);
}

.category-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.55) 100%);
}

.category-item.has-img h3 {
    padding: 4px 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.category-item.has-img p {
    padding: 0 10px 10px;
    font-size: 11px;
    color: #888;
}

/* 无图占位符 — WSTPARTS 品牌水印 */
.category-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 60%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 斜纹网格背景 */
.category-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255,193,7,.04) 0px,
            rgba(255,193,7,.04) 1px,
            transparent 1px,
            transparent 14px
        );
    pointer-events: none;
}

/* 品牌水印文字 */
.category-placeholder::after {
    content: 'WSTPARTS';
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    color: rgba(255,193,7,.25);
    text-transform: uppercase;
    pointer-events: none;
}

.category-placeholder .ph-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 6px;
    opacity: .85;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(255,193,7,.3));
}

.category-placeholder .ph-brand {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
    color: rgba(255,193,7,.7);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.category-placeholder .ph-brand span {
    color: rgba(255,255,255,.45);
}

/* 整体category-item无图模式（has-img类，但内容为占位符） */
.category-item.cat-no-img {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: transparent;
}

.category-item.cat-no-img:hover .category-placeholder {
    background: linear-gradient(135deg, #222 0%, #333 60%, #222 100%);
}

.category-item.cat-no-img:hover .category-placeholder .ph-icon {
    transform: scale(1.12);
    transition: transform .3s ease;
}

.category-item.cat-no-img h3 {
    padding: 5px 10px 1px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.category-item.cat-no-img p {
    padding: 0 10px 10px;
    font-size: 11px;
    color: #888;
}


/* ==================== 促销活动 ==================== */
.promotions-section {
    background: #1a1a1a;
    padding: var(--spacing-2xl) 0;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.promo-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
    border: 1px solid #444;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    transition: all var(--transition-normal);
}

.promo-item:hover {
    border-color: var(--primary-yellow);
    box-shadow: 0 8px 32px rgba(255,193,7,0.15);
    transform: translateY(-4px);
}

.promo-image {
    width: 140px;
    min-height: 180px;
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px;
    flex-shrink: 0;
}

.promo-badge {
    background: var(--primary-yellow);
    color: var(--primary-black);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-info {
    padding: var(--spacing-md);
    flex: 1;
}

.promo-info h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.promo-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.promo-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.promo-old {
    font-size: 14px;
    color: #666;
    text-decoration: line-through;
}

.promo-new {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-yellow);
}

.promo-time {
    font-size: 12px;
    color: #777;
    margin-bottom: var(--spacing-sm);
}

/* ==================== 新闻资讯 ==================== */
.news-section {
    background: #212121;
    padding: var(--spacing-2xl) 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.news-item {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    gap: var(--spacing-md);
    transition: all var(--transition-normal);
}

.news-item:hover {
    border-color: var(--primary-yellow);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    background: var(--primary-yellow);
    color: var(--primary-black);
    border-radius: var(--radius-md);
    padding: 8px 6px;
    text-align: center;
    align-self: flex-start;
}

.news-date .day {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.news-date .month {
    font-size: 12px;
    font-weight: 600;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-yellow);
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-summary {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 10px;
}

.news-more {
    font-size: 13px;
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

.news-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ==================== 页脚 ==================== */
.main-footer {
    background: #1a1a1a;
}

.footer-top {
    padding: var(--spacing-2xl) 0;
    background: #1e1e1e;
    border-top: 3px solid var(--primary-yellow);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
}

.footer-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-yellow);
    margin-bottom: var(--spacing-md);
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.footer-section p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    padding: 5px 0;
    color: #aaa;
    font-size: 14px;
}

.footer-section a {
    color: #aaa;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-yellow);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-links a {
    padding: 6px 12px;
    background: #333;
    border-radius: var(--radius-sm);
    color: #aaa;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-yellow);
    color: var(--primary-black);
}

.footer-bottom {
    background: #141414;
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid #2a2a2a;
}

.footer-bottom p {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
}

.footer-bottom a {
    color: #888;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--primary-yellow);
}

/* ── 底部「合作伙伴 & 友情链接」横幅 ─────────────────── */
.footer-partners {
    background: #0f0f0f;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    padding: 14px 0;
}
.fp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.fp-title {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.fp-divider {
    flex: 1;
    height: 1px;
    background: #222;
}
.fp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
}
.fp-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #2a2a2a;
    background: #161616;
    color: #888;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    cursor: default;
}
a.fp-item {
    cursor: pointer;
}
a.fp-item:hover {
    border-color: #F5A62355;
    color: #F5A623;
    background: #F5A62309;
}
.fp-item img {
    max-height: 18px;
    max-width: 60px;
    object-fit: contain;
    vertical-align: middle;
}


/* ==================== 客服悬浮 ==================== */
.customer-service {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    overflow: hidden;
    min-width: 130px;
}

.cs-toggle {
    background: var(--primary-yellow);
    color: var(--primary-black);
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: background var(--transition-fast);
}

.cs-toggle:hover {
    background: var(--primary-yellow-dark);
}

.cs-content {
    display: none;
    flex-direction: column;
    background: #2a2a2a;
}

.customer-service.active .cs-content {
    display: flex;
}

.cs-content h4 {
    padding: 10px 14px 6px;
    color: var(--primary-yellow);
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #333;
}

.cs-item {
    display: block;
    padding: 10px 14px;
    color: #ccc;
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid #333;
    cursor: pointer;
}

.cs-item:last-child {
    border-bottom: none;
}

.cs-item:hover {
    background: #333;
    color: var(--primary-yellow);
    padding-left: 18px;
}

/* ==================== 区块通用标题 ==================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-yellow);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 15px;
    color: #888;
    margin-top: 6px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); }
}

@media (max-width: 900px) {
    .carousel-container { height: 400px; }
    .carousel-title { font-size: 34px; }
    .carousel-subtitle { font-size: 16px; }
    .news-grid { grid-template-columns: 1fr; }
    .promo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .carousel-container { height: 300px; }
    .carousel-title { font-size: 24px; }
    .carousel-btn { width: 36px; height: 36px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .brands-carousel { gap: 8px; }
    .brand-item { padding: 6px 10px; min-width: 60px; }
    .footer-grid { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; }
    .promo-item { flex-direction: column; }
    .promo-image { width: 100%; min-height: 80px; }
}

/* Hide text-based logo, using image only */
.logo-text { display: none !important; }
