/* ==============================================
   产品列表页 CSS v4 - 苹果极简光晕风
   设计方向：#f5f5f7 浅灰背景 + 纯白卡片 + 柔和背光
============================================== */

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

/* ==============================================
   1. 轮播横幅模块 (.uc-home-1)
   ============================================== */
.uc-home-1 {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: auto;
    margin-top: 65px;
}

.uc-home-1::after {
    /*content: '';*/
    /*position: absolute;*/
    /*bottom: 0;*/
    /*left: 0;*/
    /*width: 100%;*/
    /*height: 120px;*/
    /* 苹果浅灰背景渐变 */
    /*background: linear-gradient(to bottom, transparent, var(--bg, #f5f5f7));*/
    /*pointer-events: none;*/
    /*z-index: 2;*/
}

.uc-home-1 .swiper-container1 {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.uc-home-1 .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.uc-home-1 .swiper-slide-active {
    opacity: 1;
    transform: translateY(0);
}

.uc-home-1 .banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.uc-home-1 .swiper-button-prev,
.uc-home-1 .swiper-button-next {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}
.uc-home-1 .swiper-container1:hover .swiper-button-prev,
.uc-home-1 .swiper-container1:hover .swiper-button-next {
    opacity: 1;
    transform: scale(1);
}

/* ==============================================
   2. 产品列表模块 - 苹果浅灰背景
   ============================================== */
.productlist {
    padding-top: 50px;
    /* 苹果标志性浅灰 */
    background: var(--bg, #f5f5f7);
    min-height: 60vh;
}

/* 列表容器 */
.container-list {
    max-width: 1900px;
    margin: 0 auto;
    padding: 20px;
}

/* 产品网格布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 24px;
    justify-items: start;
}

/* ==============================================
   3. 产品卡片 - 纯白极简风格
   ============================================== */
.product-card {
    grid-column: span 1;
    /* 纯白卡片 */
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: left;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 0;
    max-width: 500px;
    width: 100%;
    /* 极淡边框 */
    border: 1px solid rgba(0, 0, 0, 0.04);
    /* 苹果风格柔和投影 */
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.04),
        0 1px 4px rgba(0, 0, 0, 0.02);
    opacity: 0;
    transform: translateY(30px);
    /* 苹果风格慢速动画 */
    transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 卡片顶部微光边 - 银白 */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.4),
        transparent
    );
}

/* 卡片进入动画 */
.product-card.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 卡片悬浮效果 - 苹果风格慢速上浮+微放大 */
.product-card:hover {
    transform: translateY(-3px) scale3d(1.015, 1.015, 1);
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ==============================================
   4. 预售徽章 - 苹果蓝风格
   ============================================== */
.preorder-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    /* 苹果蓝 */
    color: #0066cc;
    margin-bottom: 12px;
    display: inline-block;
    text-align: left;
    position: absolute;
    top: 20px;
    right: 16px;
    padding: 4px 14px;
    border-radius: 20px;
    /* 苹果蓝边框 */
    border: 1px solid rgba(0, 102, 204, 0.2);
    /* 极淡蓝背景 */
    background: linear-gradient(135deg, 
        rgba(0, 102, 204, 0.06) 0%, 
        rgba(0, 122, 255, 0.04) 100%
    );
    transition: all 0.4s ease;
}

.product-card:hover .preorder-badge {
    background: linear-gradient(135deg, 
        rgba(0, 102, 204, 0.1) 0%, 
        rgba(0, 122, 255, 0.06) 100%
    );
    border-color: rgba(0, 102, 204, 0.3);
}

/* ==============================================
   5. 产品名称 - 深炭灰
   ============================================== */
.product-name {
    font-size: 22px;
    font-weight: 600;
    /* 深炭灰 - 接近黑色但不死黑 */
    color: #1d1d1f;
    margin-bottom: 10px;
    text-align: left;
    transition: color 0.4s ease;
}

.product-card:hover .product-name {
    color: #000000;
}

/* ==============================================
   6. 价格信息 / 描述 - 苹果灰
   ============================================== */
.price-info {
    font-size: 13px;
    /* 苹果风格中灰 */
    color: #86868b;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 1.25rem;
    transition: color 0.4s ease;
}

.product-card:hover .price-info {
    /* hover时更深 */
    color: #6e6e73;
}

/* ==============================================
   7. 产品图片 - 苹果风格背光效果（优雅慢速版）
   ============================================== */
.product-image {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    border-radius: 14px;
    display: block;
    object-fit: contain;
    width: 100%;
    /* 苹果风格慢速优雅动画：开始慢-中间快-结束慢 */
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    /* 简化filter */
    filter: brightness(1.03);
}

/* 背光效果用伪元素实现 */
.product-card a {
    position: relative;
    display: block;
}

.product-card a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.5) 30%,
        rgba(255, 255, 255, 0) 70%
    );
    pointer-events: none;
    z-index: -1;
    opacity: 0.8;
}

/* 投影用伪元素 */
.product-card a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 20px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.08) 0%,
        rgba(0, 0, 0, 0) 70%
    );
    pointer-events: none;
    z-index: -1;
}

/* 产品图片保持静止，不单独放大 */
.product-card:hover .product-image {
    transform: none;
}

/* ==============================================
   8. 颜色选择器 - 苹果蓝选中态
   ============================================== */
.color-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.color-selector .b {
    background-color: #1d1d1f;
    border-color: rgba(0, 0, 0, 0.1);
}

.color-selector .w {
    background-color: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.08);
}

.color-dot:hover {
    transform: scale(1.08);
}

/* 选中态 - 苹果蓝 */
.color-dot.active {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
    transform: scale(1.15);
}

/* ==============================================
   9. 图片懒加载底色（苹果风格）
   ============================================== */
.lazy-img {
    background: #f5f5f7;
    object-fit: cover;
}

/* ==============================================
   响应式适配
   ============================================== */
@media (min-width: 768px) {
    .uc-home-1 {
        height: 0;
        padding-top: 26.0417%;
    }

    .uc-home-1 .swiper-container1 {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(calc(33.33% - 13px), 1fr));
    }
}

@media (max-width: 768px) {
    .uc-home-1 {
        height: auto;
        padding-top: 0 !important;
        margin-top: 50px;
    }

    .uc-home-1 .banner-img {
        position: static;
        height: auto;
        object-fit: contain;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(calc(50% - 10px), 1fr));
    }

    .product-card {
        max-width: 300px;
    }
}

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

    .product-card {
        max-width: 100%;
    }
}
