/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-hover: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00d4aa;
    --accent-5v: #4fc3f7;
    --accent-12v: #ff7043;
    --border: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 36px;
}

.logo span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    padding: 160px 20px 100px;
    text-align: center;
    background: linear-gradient(180deg, #0a0a0a 0%, #0f1419 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #00d4aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 筛选区域 */
.filter-section {
    padding: 80px 0;
    background: var(--bg-dark);
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 14px 45px 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.voltage-filter {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 500;
}

.filter-btn[data-voltage="5v"].active {
    background: var(--accent-5v);
    border-color: var(--accent-5v);
}

.filter-btn[data-voltage="12v"].active {
    background: var(--accent-12v);
    border-color: var(--accent-12v);
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 212, 170, 0.1);
}

.product-card.hidden {
    display: none;
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.voltage-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.voltage-tag.v5 {
    background: var(--accent-5v);
    color: #000;
}

.voltage-tag.v12 {
    background: var(--accent-12v);
    color: #fff;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.product-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 6代墙充 */
.wall-charger-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #0f1419 0%, #0a0a0a 100%);
}

.charger-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 14px 35px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.tab-content {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.tab-panel {
    display: none;
    padding: 30px;
}

.tab-panel.active {
    display: block;
}

.tab-panel img {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    cursor: zoom-in;
}

/* 关于我们 */
.about-section {
    padding: 80px 0;
    background: var(--bg-dark);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.qr-code {
    text-align: center;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.qr-code img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.qr-code p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 页脚 */
.footer {
    padding: 40px 0;
    background: #050505;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 8px 0;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

.modal-gallery {
    margin-bottom: 25px;
}

.gallery-main {
    position: relative;
    margin-bottom: 20px;
}

.gallery-main img {
    width: 100%;
    border-radius: 12px;
    cursor: zoom-in;
    display: block;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.nav-arrow:hover {
    background: var(--accent);
    color: #000;
}

.nav-arrow.prev {
    left: 15px;
}

.nav-arrow.next {
    right: 15px;
}

.image-counter {
    text-align: center;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-thumbs img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.gallery-thumbs img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbs img.active {
    border-color: var(--accent);
    opacity: 1;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
    border-color: var(--accent);
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.voltage-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.voltage-badge.v5 {
    background: var(--accent-5v);
    color: #000;
}

.voltage-badge.v12 {
    background: var(--accent-12v);
    color: #fff;
}

.modal-info p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* 在线客服悬浮按钮 */
.chat-button {
    position: fixed;
    right: 25px;
    bottom: 100px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4aa 0%, #00a884 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 170, 0.6);
}

.chat-button svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.chat-button span {
    font-size: 0.7rem;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 212, 170, 0.7);
    }
}

/* 移动端适配客服按钮 */
@media (max-width: 768px) {
    .chat-button {
        right: 15px;
        bottom: 80px;
        width: 50px;
        height: 50px;
    }
    
    .chat-button svg {
        width: 20px;
        height: 20px;
    }
    
    .chat-button span {
        font-size: 0.6rem;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .voltage-filter {
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .charger-tabs {
        flex-wrap: wrap;
    }
}
