/* ===== Hero Carousel ===== */
.hero {
    position: relative;
    width: 100%;
    /* 使用视口宽度计算高度，基于 1920:720 的比例 (720/1920 = 0.375) */
    height: 0;
    padding-bottom: 37.5%;
    /* 720/1920 = 37.5% */
    margin-top: 90px;
    overflow: hidden;
    /* 设置最小和最大高度以确保在极端屏幕尺寸下的可用性 */
    min-height: 300px;
    max-height: 720px;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    /* 使用 cover 确保图片填满整个容器，不留空白 */
    object-fit: cover;
    /* 居中显示图片，确保主要内容可见 */
    object-position: center center;
}

/* 平板和移动设备响应式调整 */
@media (max-width: 768px) {
    .hero {
        margin-top: 80px;
        /* 在小屏幕上允许更大的高度比例以保持可视性 */
        max-height: 500px;
    }
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    align-items: center;
}

.carousel-content {
    color: var(--secondary-color);
    max-width: 600px;
}

.carousel-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.carousel-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    pointer-events: none;
}

.carousel-nav button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--secondary-color);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
}

.carousel-nav button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    width: 36px;
    border-radius: 6px;
    background-color: var(--secondary-color);
}

/* ===== Categories Grid & Products Grid Layout ===== */
.categories-grid,
.products-grid,
.news-grid {
    display: grid;
    gap: 30px;
}

.categories-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .categories-grid {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .categories-grid .category-card {
        padding: 20px 15px;
    }

    .categories-grid .category-title {
        font-size: 18px;
    }

    .categories-grid .category-description {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

.products-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.news-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Why Choose Us / Features ===== */
/* Moved to main.css */

/* ===== About Section Specific ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 430px;
}

.about-image.has-video {
    max-width: 640px;
}

.about-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.about-video video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.about-image-slider {

    position: relative;
    width: 100%;
    aspect-ratio: 500 / 525;
}

.about-image-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.about-image-slider img.active {
    opacity: 1;
}

.about-image-slider .slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.about-image-slider .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.about-image-slider .dot.active {
    background-color: white;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    padding: 20px;
    background-color: var(--accent-blue);
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-medium);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--secondary-color);
    text-align: center;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.95;
}