/**
 * 首页样式 - Home CSS
 * 包含Hero轮播、各区块布局、产品网格/滚动等样式
 */

/* ========== Hero Banner 轮播 ========== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
    background-color: var(--color-bg-light);
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-slide a {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    max-width: 700px;
    padding: 0 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-caption h2 {
    font-family: var(--font-family);
    font-size: 52px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.hero-caption p {
    font-family: var(--font-family-body);
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.hero-caption .btn-primary {
    display: inline-block;
    padding: 14px 40px;
    background-color: var(--color-white);
    color: var(--color-bg-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
    border: none;
}

.hero-caption .btn-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    max-width: 700px;
    padding: 0 30px;
}

.hero-slide-content h1 {
    font-family: var(--font-family);
    font-size: 52px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-slide-content p {
    font-family: var(--font-family);
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    letter-spacing: 0.5px;
    font-style: italic;
}

/* Hero SHOP NOW 按钮 */
.btn-hero-shop {
    display: inline-block;
    padding: 14px 40px;
    background-color: var(--color-white);
    color: var(--color-bg-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
}

.btn-hero-shop:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* 轮播箭头 */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--color-white);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
}

.hero-prev {
    left: 30px;
}

.hero-next {
    right: 30px;
}

/* 轮播指示点 */
.hero-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot,
.hero-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active,
.hero-dots span.active {
    background: var(--color-white);
    transform: scale(1.2);
}

/* ========== 首页区块通用 ========== */
.home-section {
    position: relative;
}

.home-section.bg-light {
    background-color: var(--color-bg-light);
}

/* 带横线的区块标题 */
.section-header-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.section-header-line .line {
    flex: 1;
    max-width: 200px;
    height: 1px;
    background-color: var(--color-text);
}

.section-title-line {
    font-family: var(--font-family-body);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text);
    white-space: nowrap;
}

/* View All 链接 */
.section-link-underline {
    display: inline-block;
    font-size: 14px;
    color: var(--color-text);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-text);
    transition: var(--transition);
}

.section-link-underline:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ========== 产品横向滚动 ========== */
.product-scroll-wrapper {
    position: relative;
    overflow: hidden;
}

.product-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.product-scroll::-webkit-scrollbar {
    display: none;
}

.product-scroll .product-card {
    flex: 0 0 280px;
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    gap: 24px;
}

.product-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.product-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ========== About Us 区块 ========== */
.about-section {
    background-color: var(--color-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    padding: 20px 0;
}

.about-title {
    font-family: var(--font-family);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text);
}

.about-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

/* ========== Why Us 区块 ========== */
.why-us-section {
    background-color: var(--color-bg-light);
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.why-us-item {
    text-align: center;
    padding: 30px 20px;
    background: #f5f5f5;
    border-radius: 0;
    transition: var(--transition);
}

.why-us-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.why-us-icon {
    display: none;
}

.why-us-item h3 {
    font-family: var(--font-family-body);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 14px;
}

.why-us-item p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* ========== Newsletter 订阅区 ========== */
.newsletter-section {
    background-color: var(--color-bg);
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
}

.newsletter-box h2 {
    font-family: var(--font-family);
    font-size: 28px;
    margin-bottom: 12px;
}

.newsletter-box p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form .form-control {
    flex: 1;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .product-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-slide-content h1,
    .hero-caption h2 {
        font-size: 36px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 50vh;
        min-height: 300px;
    }

    .hero-slide-content h1,
    .hero-caption h2 {
        font-size: 28px;
    }

    .hero-slide-content p,
    .hero-caption p {
        font-size: 14px;
    }

    .hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .hero-prev {
        left: 15px;
    }

    .hero-next {
        right: 15px;
    }

    .product-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-scroll .product-card {
        flex: 0 0 220px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .section-header {
        margin-bottom: 20px;
    }
}
