/**
 * 首页特殊商品展示区域样式
 * 包含4种特殊展示区域的样式定义
 */

/* 整体容器 */
.special-goods-sections {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* 单个区域 */
.special-section {
    margin-bottom: 60px;
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.special-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* 区域头部 */
.section-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-style: italic;
}

/* 轮播容器 */
.section-carousel-wrapper {
    position: relative;
    padding: 10px 60px;
}

/* 滑动容器 */
.section-content-slider {
    overflow: hidden;
    width: 100%;
}

.section-content-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

/* 调整商品列表为flex布局 - 强制单行显示 - 更高优先级 */
.special-section .section-content-track .am-g,
.special-section .section-content-track > ul,
.special-goods-sections .section-content-track .am-g,
.special-goods-sections .section-content-track > ul {
    display: flex !important;
    flex-wrap: nowrap !important;  /* 强制不换行 */
    margin: 0 !important;
    width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
}

/* 支持ul>li结构和div网格结构 - 更高优先级 */
.special-section .section-content-track .am-u-lg-2-5,
.special-section .section-content-track .am-u-md-2-5,
.special-section .section-content-track .am-u-sm-6,
.special-section .section-content-track > ul > li,
.special-goods-sections .section-content-track .am-u-lg-2-5,
.special-goods-sections .section-content-track .am-u-md-2-5,
.special-goods-sections .section-content-track .am-u-sm-6,
.special-goods-sections .section-content-track > ul > li {
    flex: 0 0 20% !important;  /* 每个商品固定占20%宽度 */
    max-width: 20% !important;
    min-width: 20% !important;
    width: 20% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    float: none !important;  /* 禁用float */
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn i {
    font-size: 24px;
    color: #333;
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

/* 禁用状态 */
.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.5);
}

.carousel-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* 区域内容 */
.section-content {
    padding: 10px 0;
}

/* 不同区域的主题色 */
.top-new-disposable .section-header::after {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.top-new-disposable .section-title {
    color: #667eea;
}

.new-arrivals .section-header::after {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.new-arrivals .section-title {
    color: #f5576c;
}

.best-sellers .section-header::after {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.best-sellers .section-title {
    color: #4facfe;
}

.best-eliquids .section-header::after {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.best-eliquids .section-title {
    color: #43e97b;
}

/* 商品卡片增强 */
.special-section .goods-list-content {
    transition: transform 0.3s ease;
}

.special-section .goods-list-content:hover {
    transform: translateY(-5px);
}

/* 响应式设计 - 确保每行商品数量 - 更高优先级 */
@media (max-width: 1200px) {
    .special-section .section-content-track .am-u-lg-2-5,
    .special-section .section-content-track .am-u-md-2-5,
    .special-section .section-content-track > ul > li,
    .special-goods-sections .section-content-track .am-u-lg-2-5,
    .special-goods-sections .section-content-track .am-u-md-2-5,
    .special-goods-sections .section-content-track > ul > li {
        flex: 0 0 25% !important;  /* 4个商品 */
        max-width: 25% !important;
        min-width: 25% !important;
        width: 25% !important;
    }
}

@media (max-width: 992px) {
    .special-section .section-content-track .am-u-lg-2-5,
    .special-section .section-content-track .am-u-md-2-5,
    .special-section .section-content-track > ul > li,
    .special-goods-sections .section-content-track .am-u-lg-2-5,
    .special-goods-sections .section-content-track .am-u-md-2-5,
    .special-goods-sections .section-content-track > ul > li {
        flex: 0 0 33.333% !important;  /* 3个商品 */
        max-width: 33.333% !important;
        min-width: 33.333% !important;
        width: 33.333% !important;
    }
}

@media (max-width: 768px) {
    .special-section {
        padding: 20px 15px;
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .section-subtitle {
        font-size: 12px;
    }
    
    .section-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .section-carousel-wrapper {
        padding: 10px 50px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn i {
        font-size: 20px;
    }
    
    .special-section .section-content-track .am-u-lg-2-5,
    .special-section .section-content-track .am-u-md-2-5,
    .special-section .section-content-track .am-u-sm-6,
    .special-section .section-content-track > ul > li,
    .special-goods-sections .section-content-track .am-u-lg-2-5,
    .special-goods-sections .section-content-track .am-u-md-2-5,
    .special-goods-sections .section-content-track .am-u-sm-6,
    .special-goods-sections .section-content-track > ul > li {
        flex: 0 0 50% !important;  /* 2个商品 */
        max-width: 50% !important;
        min-width: 50% !important;
        width: 50% !important;
    }
}

@media (max-width: 480px) {
    .special-goods-sections {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .special-section {
        padding: 15px 10px;
        margin-bottom: 30px;
        border-radius: 8px;
    }
    
    .section-title {
        font-size: 20px;
        letter-spacing: 0.5px;
    }
    
    .section-subtitle {
        font-size: 11px;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.special-section {
    animation: fadeInUp 0.6s ease-out;
}

.special-section:nth-child(1) {
    animation-delay: 0.1s;
}

.special-section:nth-child(2) {
    animation-delay: 0.2s;
}

.special-section:nth-child(3) {
    animation-delay: 0.3s;
}

.special-section:nth-child(4) {
    animation-delay: 0.4s;
}

/* 商品列表网格优化 */
.special-section .am-g {
    margin: 0 -10px;
}

.special-section .am-u-lg-2-5,
.special-section .am-u-md-2-5 {
    padding: 0 10px;
}

/* 商品卡片间距 - 去除底部间距，确保单行 */
.special-section .goods-list-content {
    margin-bottom: 0;
}

/* 确保商品图片不会导致换行 */
.special-section .goods-list-content img {
    max-width: 100%;
    height: auto;
}

/* 防止商品标题过长导致高度不一致 */
.special-section .goods-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4em;
    max-height: 2.8em;
}

/* 空状态 */
.special-section-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.special-section-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.special-section-empty p {
    font-size: 14px;
    margin: 0;
}

/* 查看更多按钮（可选） */
.section-view-more {
    text-align: center;
    margin-top: 30px;
}

.section-view-more-btn {
    display: inline-block;
    padding: 12px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* 特殊标签 */
.section-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

/* 热门标记 */
.hot-badge {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* 新品标记 */
.new-badge {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

