/**
 * 首页新布局样式
 * Hero 轮播 + 产品分类2x3网格 + NEW PRODUCTS轮播
 */

/* ================================
   HERO BANNER SLIDER
   ================================ */



.hero-slider {
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.hero-prev {
    left: 16px;
}

.hero-next {
    right: 16px;
}

.hero-indicators {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.hero-indicators button.active {
    background: #e31e24;
}

@media (max-width: 767px) {
    .hero-nav {
        display: none;
    }
}

/* ================================
   ABOUT COMPANY SECTION
   ================================ */

.about-company-section {
    background: #f4f2ef;
}

.about-company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    align-items: stretch;margin-bottom: 20px;
}

.about-company-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 30px 80px rgba(105, 118, 144, 0.15);
}

.about-eyebrow {
    font-size: 14px;
    letter-spacing: 0.2em;
    font-weight: 700;
    text-transform: uppercase;
    color: #c9955a;
    margin-bottom: 16px;
}

.about-company-content h2 {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #1c1c1c;
}

.about-company-content p {
    font-size: 17px;
    line-height: 1.9;
    color: #4a4a4a;
    margin-bottom: 18px;
}

.about-company-content ul {
    padding-left: 20px;
    margin: 0 0 20px 0;
}

.about-company-content ul li {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 10px;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.about-highlight-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    background: #faf9f7;
}

.about-highlight-card strong {
    display: block;
    font-size: 24px;
    color: #e31e24;
    margin-bottom: 6px;
}

.about-highlight-card span {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

.about-link {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid rgba(51, 51, 51, 0.3);
    padding-bottom: 4px;
}

.about-link:hover {
    color: #e31e24;
    border-color: #e31e24;
}

.about-company-visual {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.about-hero-image {
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 30px 80px rgba(105, 118, 144, 0.15);
}

.about-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-gallery-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.about-gallery-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(105, 118, 144, 0.15);
}

.about-gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

@media (max-width: 1023px) {
    .about-company-content {
        padding: 32px;
    }

    .about-company-content h2 {
        font-size: 30px;
    }

    .about-gallery-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .about-company-grid {
        gap: 30px;
    }

    .about-company-content {
        padding: 28px 24px;
    }

    .about-company-content h2 {
        font-size: 26px;
    }

    .about-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-gallery-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-gallery-card img {
        height: 100px;
    }
}

/* ================================
   产品分类 2x3 网格布局（参考截图设计）
   ================================ */

.categories-grid-2x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.category-card-grid {
    position: relative;
    display: block;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-card-image {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 比例，更接近截图 */
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.category-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card-grid:hover .category-card-image img {
    transform: scale(1.08);
}

.category-card-name {
    padding: 20px 15px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* View More Button */
.btn-view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: transparent;
    border: 2px solid #E31E24;
    border-radius: 50px;
    color: #E31E24;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-view-more:hover {
    background: #E31E24;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 30, 36, 0.35);
}

/* 骨架屏动画 */
.skeleton-card {
    pointer-events: none;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.category-card-grid.skeleton-card .category-card-image {
    height: 300px;
}

.category-card-grid.skeleton-card .category-card-title {
    height: 24px;
    margin: 20px;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================
   NEW PRODUCTS 轮播
   ================================ */

.products-carousel-wrapper {
    position: relative;
    margin-top: 40px;
    padding: 0 70px;
}

.products-carousel {
    overflow: hidden;
}

.products-carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-carousel {
    flex: 0 0 calc((100% - 90px) / 4);
    min-width: calc((100% - 90px) / 4);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-decoration: none;
}

.product-card-carousel:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(227, 30, 36, 0.2);
}

.product-carousel-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9f9f9;
    position: relative;
}

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

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

.product-carousel-info {
    padding: 20px;
    text-align: center;
}

.product-carousel-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 44px;
}

.product-sku {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #fff;
    border: 2px solid #E31E24;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.15);
}

.carousel-btn:hover {
    background: #E31E24;
    border-color: #E31E24;
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn svg {
    width: 28px;
    height: 28px;
    color: #E31E24;
    transition: color 0.3s ease;
}

.carousel-btn:hover svg {
    color: #fff;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 轮播指示器 */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #E31E24;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicators .indicator.active {
    background: #E31E24;
    transform: scale(1.3);
}

.carousel-indicators .indicator:hover {
    transform: scale(1.2);
}

/* 产品卡骨架屏 */
.product-card-carousel.skeleton-card .product-carousel-image {
    height: 350px;
}

.product-card-carousel.skeleton-card .skeleton-title {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-card-carousel.skeleton-card .skeleton-text {
    height: 14px;
    border-radius: 4px;
    width: 60%;
    margin: 0 auto;
}

/* ================================
   响应式设计
   ================================ */

/* 大屏幕 (1400px+) */
@media (min-width: 1400px) {
    .categories-grid-2x3 {
        gap: 40px;
    }
    
    .products-carousel-track .product-card-carousel {
        flex: 0 0 calc((100% - 90px) / 4);
        min-width: calc((100% - 90px) / 4);
    }
}

/* 中等屏幕 (1024px - 1399px) */
@media (max-width: 1399px) {
    .products-carousel-track .product-card-carousel {
        flex: 0 0 calc((100% - 60px) / 3);
        min-width: calc((100% - 60px) / 3);
    }
}

/* 平板横屏 (768px - 1023px) */
@media (max-width: 1023px) {
    .categories-grid-2x3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .category-card-name {
        font-size: 16px;
        padding: 18px 12px;
    }
    
    .category-card-image {
        padding-bottom: 80%; /* 稍微调整比例 */
    }
    
    .products-carousel-wrapper {
        padding: 0 60px;
    }
    
    .products-carousel-track {
        gap: 24px;
    }
    
    .products-carousel-track .product-card-carousel {
        flex: 0 0 calc((100% - 24px) / 2);
        min-width: calc((100% - 24px) / 2);
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
    }
    
    .carousel-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* 平板竖屏 (480px - 767px) */
@media (max-width: 767px) {
    .categories-grid-2x3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 30px;
    }
    
    .category-card-name {
        font-size: 14px;
        padding: 15px 10px;
    }
    
    .category-card-image {
        padding-bottom: 85%; /* 手机端调整比例 */
    }
    
    .btn-view-more {
        padding: 12px 32px;
        font-size: 14px;
    }
    
    .products-carousel-wrapper {
        padding: 0 50px;
    }
    
    .products-carousel-track {
        gap: 20px;
    }
    
    .products-carousel-track .product-card-carousel {
        flex: 0 0 calc((100% - 20px) / 2);
        min-width: calc((100% - 20px) / 2);
    }
    
    .product-carousel-info {
        padding: 16px;
    }
    
    .product-carousel-info h4 {
        font-size: 14px;
        min-height: 40px;
    }
    
    .product-sku {
        font-size: 12px;
    }
    
    .carousel-btn {
        width: 44px;
        height: 44px;
    }
    
    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 手机 (< 480px) */
@media (max-width: 479px) {
    .categories-grid-2x3 {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 25px;
    }
    
    .category-card-name {
        font-size: 16px;
        padding: 18px 15px;
    }
    
    .category-card-image {
        padding-bottom: 75%; /* 单列时保持4:3比例 */
    }
    
    .btn-view-more {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .products-carousel-wrapper {
        padding: 0 40px;
    }
    
    .products-carousel-track {
        gap: 16px;
    }
    
    .products-carousel-track .product-card-carousel {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-indicators {
        gap: 10px;
    }
    
    .carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }
}

/* ================================
   打印样式
   ================================ */

@media print {
    .categories-grid-2x3 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        page-break-inside: avoid;
    }
    
    .products-carousel-wrapper {
        display: none;
    }
    
    .carousel-btn,
    .carousel-indicators,
    .btn-view-more {
        display: none;
    }
}

