.products-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 0px 30px;
    box-sizing: border-box;
}

/* ===== 优化Banner：移动端与容器同宽 ===== */
.banner {
    position: relative;
    width: 100%;
    max-width: 1300px;
    height: 320px;
    margin: 20px auto 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.banner:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.banner:hover .banner-image img {
    transform: scale(1.02);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(26, 26, 26, 0.1) 0%,
        rgba(26, 26, 26, 0.3) 40%,
        rgba(26, 26, 26, 0.6) 70%,
        rgba(26, 26, 26, 0.8) 100%
    );
}

.banner-content {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    z-index: 3;
    max-width: 380px;
    text-align: right;
    color: #ffffff;
}

.banner-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.banner-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #d4af37, #f4e4a6);
    margin: 15px 0 0 auto;
    border-radius: 1px;
}

.banner-subtitle {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    font-weight: 300;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    opacity: 0.9;
}

.banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d4af37, #f4e4a6);
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(212,175,55,0.3);
    border: none;
    cursor: pointer;
}

.banner-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(212,175,55,0.4);
}

.banner-cta::after {
    content: '→';
    font-size: 16px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.banner-cta:hover::after {
    transform: translateX(3px);
}

.banner-decoration {
    position: absolute;
    z-index: 2;
}

.banner-decoration-1 {
    top: 15%;
    left: 8%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.banner-decoration-2 {
    bottom: 20%;
    left: 15%;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* ===== 分类导航优化 ===== */
.categories-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 0 10px;
    justify-content: flex-start;
}

.category-link {
    padding: 10px 18px;
    border-radius: 25px;
    border: 1.5px solid #e0e0e0;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.category-link:hover {
    background: #f8f8f8;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.category-link.active {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: #fff;
    border-color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== 排序导航优化 ===== */
.sorting-nav {
    margin-bottom: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sort-link {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1.5px solid #e0e0e0;
    background: white;
    white-space: nowrap;
}

.sort-link:hover {
    color: #333;
    border-color: #ccc;
    background: #f8f8f8;
    transform: translateY(-1px);
}

.sort-link.active {
    background: linear-gradient(135deg, #d4af37, #f4e4a6);
    color: #1a1a1a;
    font-weight: 600;
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212,175,55,0.2);
}

/* ===== 商品列表样式优化 - 重点修复图片显示问题 ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,.12);
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 26px;
    text-decoration: none;
    z-index: 10;
    color: #bbb;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    background: rgba(255,255,255,0.95);
    transform: scale(1.1);
}

.wishlist-btn.liked {
    color: #e74c3c;
}

/* ===== 商品图片区域优化 - 正方形完整显示 ===== */
.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 正方形比例 */
    position: relative;
    background: #f7f7f7;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

/* 覆盖 PHP 中的内联样式 */
.product-image img,
.product-image video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为 contain 确保图片完整显示，不裁剪 */
    transition: transform 0.5s ease;
    background: #f7f7f7; /* 添加背景色填充空白区域 */
}

.product-card:hover .product-image img,
.product-card:hover .product-image video {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    min-height: 48px;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-price {
    color: #b12704; /* Amazon风格价格颜色 */
    font-size: 16px;
    font-weight: 600;
    margin-top: auto;
}

.pagination {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #333;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f5f5f5;
}

.page-link.active {
    background: #000;
    color: #fff;
}

.total-count {
    margin-top: 25px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 商品标签角标 */
.tag-badge-box {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-badge {
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    opacity: 0.9;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ===== 响应式设计优化 ===== */
@media (max-width: 1024px) {
    .banner {
        height: 280px;
    }
    
    .banner-content {
        right: 40px;
        max-width: 320px;
    }
    
    .banner-title {
        font-size: 32px;
    }
    
    .banner-subtitle {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    /* 移动端：Banner宽度与产品容器保持一致 */
    .products-container {
        padding: 0 15px 25px;
    }
    
    .banner {
        height: 240px;
        margin: 15px auto 25px;
        border-radius: 12px;
        max-width: calc(100% - 30px); /* 与容器内边距匹配 */
        width: calc(100% - 30px);
    }
    
    .banner-content {
        right: 25px;
        left: 25px;
        max-width: none;
        text-align: right;
        padding: 0 10px;
    }
    
    .banner-title {
        font-size: 26px;
        margin-bottom: 12px;
    }
    
    .banner-title::after {
        margin: 10px 0 0 auto;
    }
    
    .banner-subtitle {
        font-size: 14px;
        margin-bottom: 18px;
        line-height: 1.4;
    }
    
    .banner-cta {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* 分类导航优化：移动端水平滚动 */
    .categories-nav {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding: 10px 5px 15px;
        margin-bottom: 20px;
        gap: 12px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    
    .categories-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .categories-nav::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .categories-nav::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }
    
    .category-link {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 13px;
        min-width: fit-content;
    }
    
    /* 排序导航优化：移动端垂直排列 */
    .sorting-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
        margin-bottom: 25px;
    }
    
    .sort-link {
        text-align: center;
        padding: 10px;
        border-radius: 10px;
        font-size: 13px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .products-container {
        padding: 0 12px 20px;
    }
    
    .banner {
        height: 200px;
        border-radius: 10px;
        max-width: calc(100% - 24px);
        width: calc(100% - 24px);
        margin: 10px auto 20px;
    }
    
    .banner-content {
        right: 15px;
        left: 15px;
        text-align: center;
    }
    
    .banner-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .banner-title::after {
        margin: 8px auto 0;
    }
    
    .banner-subtitle {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .banner-cta {
        padding: 8px 18px;
        font-size: 12px;
    }
    
    .categories-nav {
        padding: 8px 3px 12px;
        gap: 10px;
    }
    
    .category-link {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    .sorting-nav {
        padding: 10px;
        gap: 6px;
    }
    
    .sort-link {
        padding: 9px;
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-name {
        font-size: 16px;
        min-height: 44px;
    }
}

/* 超小屏幕额外优化 */
@media (max-width: 360px) {
    .banner {
        height: 180px;
    }
    
    .banner-title {
        font-size: 20px;
    }
    
    .banner-subtitle {
        font-size: 12px;
    }
    
    .category-link {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .products-grid {
        gap: 12px;
    }
}

/* 针对视频的特殊处理 */
.product-image video {
    background: #000; /* 视频背景设为黑色 */
}

/* 为了确保所有图片都能完整显示，添加备用方案 */
.product-card .product-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px 12px 0 0;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .product-card {
        background: #2d2d2d;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .product-image {
        background: #1a1a1a;
    }
    
    .product-card:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    }
    
    .product-name {
        color: #ffffff;
    }
    
    .product-price {
        color: #d4af37; /* 金色价格在深色模式下更显眼 */
    }
    
    .product-image img,
    .product-image video {
        background: #1a1a1a;
    }
    
    .product-image video {
        background: #000;
    }
    
    .category-link {
        background: #2d2d2d;
        color: #e6e6e6;
        border-color: #444;
    }
    
    .category-link:hover {
        background: #333;
    }
    
    .category-link.active {
        background: linear-gradient(135deg, #d4af37, #f4e4a6);
        color: #1a1a1a;
        border-color: #d4af37;
    }
    
    .sorting-nav {
        background: #2d2d2d;
    }
    
    .sort-link {
        background: #333;
        color: #e6e6e6;
        border-color: #444;
    }
    
    .sort-link:hover {
        background: #3d3d3d;
    }
    
    .sort-link.active {
        background: linear-gradient(135deg, #d4af37, #f4e4a6);
        color: #1a1a1a;
        border-color: #d4af37;
    }
    
    .page-link {
        background: #333;
        color: #e6e6e6;
        border-color: #444;
    }
    
    .page-link:hover {
        background: #3d3d3d;
    }
    
    .page-link.active {
        background: #d4af37;
        color: #1a1a1a;
        border-color: #d4af37;
    }
    
    .total-count {
        color: #aaa;
    }
}