:root {
    --primary-color: #0f172a;
    --accent-color: #3b82f6;
    --text-color: #334155;
    --bg-color: #f8fafc;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --transition: all 0.3s ease;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    height: 60px;
}

.logo img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), #60a5fa);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.lang-switch {
    cursor: pointer;
    padding: 0.5rem 1.2rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slide-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
}

/* Sections */
.section {
    padding: 3rem 5%;
}

.bg-light {
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* About */
.about-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-image {
    flex: 0 0 400px;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.about-content {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-summary-text {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1.5rem;
    color: #475569;
    white-space: pre-wrap;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Products */
.product-scroll-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    /* Space for buttons */
}

.product-scroll {
    display: flex;
    gap: 20px;
    /* Fixed gap for easier calculation */
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px 5px 30px;
    /* Top padding for shadow, bottom for hover movement */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
}

.product-scroll::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.product-card {
    /* 5 items per row: (100% - 4 * 20px) / 5 = 20% - 16px */
    flex: 0 0 calc(20% - 16px);
    min-width: 220px;
    /* Prevent too small on resize before breakpoint */
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    top: 0;
    text-decoration: none;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
}

.product-img {
    width: 100%;
    height: 220px;
    background-color: #f8fafc;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    background: white;
    position: relative;
    z-index: 2;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
}

.product-card:hover .product-name {
    color: var(--accent-color);
}

.product-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3em;
    /* Fixed height to align cards */
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 0.8;
    padding-bottom: 4px;
}

.scroll-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.scroll-left {
    left: 5px;
}

.scroll-right {
    right: 5px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .product-card {
        flex: 0 0 calc(25% - 15px);
        /* 4 items */
    }
}

@media (max-width: 992px) {
    .product-card {
        flex: 0 0 calc(33.333% - 14px);
        /* 3 items */
    }
}

@media (max-width: 768px) {
    .product-scroll-container {
        padding: 0 20px;
        /* Less padding on mobile */
    }

    .product-scroll {
        padding-bottom: 20px;
    }

    .product-card {
        flex: 0 0 260px;
        /* Fixed width on mobile for better swiping */
        min-width: 260px;
    }

    .scroll-btn {
        display: none;
        /* Hide buttons on mobile, use touch */
    }
}

/* Ad Banner */
.cta-banner {
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 0 2rem 0;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1rem;
}

/* News Center - 5 columns */
.news-section {
    background-color: #f8fafc;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.news-item:hover .news-img {
    transform: scale(1.1);
}

.news-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(59, 130, 246, 0.85);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.news-date-day {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 3px;
}

.news-date-month {
    display: block;
    font-size: 0.85rem;
    opacity: 0.95;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3rem;
}

.news-desc {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.7rem;
}

.news-read-more {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.news-item:hover .news-read-more {
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 5%;
    text-align: center;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: white;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

/* Product Card Enhancements */
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 0 1rem;
    margin: 1rem 0 0.5rem;
}

.product-card p {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.product-card .btn-secondary {
    margin: 0 1rem 1rem;
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* News Card Enhancements */
.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .news-content {
    padding: 1.5rem;
}

.news-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.news-card .news-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card a {
    color: var(--accent-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-card a:hover {
    color: #2563eb;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.slider-controls button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: white;
    transform: scale(1.1);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: white;
    transform: scale(1.2);
}

/* Ad Banner Image */
.cta-banner img {
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.7rem;
}

.news-read-more {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.news-item:hover .news-read-more {
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 5%;
    text-align: center;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: white;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

/* Product Card Enhancements */
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 0 1rem;
    margin: 1rem 0 0.5rem;
}

.product-card p {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.product-card .btn-secondary {
    margin: 0 1rem 1rem;
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* News Card Enhancements */
.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .news-content {
    padding: 1.5rem;
}

.news-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.news-card .news-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card a {
    color: var(--accent-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-card a:hover {
    color: #2563eb;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.slider-controls button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: white;
    transform: scale(1.1);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: white;
    transform: scale(1.2);
}

/* Ad Banner Image */
.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Search Styles */
.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    background: #f1f5f9;
    color: var(--accent-color);
}

.search-overlay {
    position: fixed;
    top: 94px;
    /* 与 hero-slider margin-top 一致，紧贴导航栏 */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    /* 半透明背景 */
    backdrop-filter: blur(8px);
    /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(8px);
    z-index: 990;
    /* 低于导航栏(1000)，高于Banner */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    position: relative;
}

.search-form {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form input {
    width: 100%;
    max-width: 800px;
    padding: 0.6rem 3rem 0.6rem 1.5rem;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    outline: none;
    height: 42px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-form input:focus {
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    width: 100%;
    /* 聚焦时保持宽度 */
}

.search-form input::placeholder {
    color: #94a3b8;
    font-size: 0.95rem;
}

.search-form button {
    position: absolute;
    right: calc(50% - 400px + 10px);
    /* 定位到输入框右侧 */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

@media (max-width: 1200px) {
    .search-form button {
        right: 2rem;
        /* 响应式调整 */
    }

    .search-form input {
        max-width: 100%;
    }
}

.search-form button:hover {
    color: var(--accent-color);
}

.search-form button svg {
    width: 20px;
    height: 20px;
}

.close-search {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slider {
        height: 300px;
    }

    .slide-content h1 {
        font-size: 1.8rem;
    }

    .nav-links {
        display: none;
    }

    .about-wrapper {
        flex-direction: column;
    }

    .about-image {
        flex: 1;
        max-width: 100%;
    }

    .product-scroll-container {
        padding: 0 20px;
    }

    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Slider - Added to fix banner issue */
.hero-slider {
    position: relative;
    width: 100%;
    height: 500px;
    margin-top: 94px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}