/* ===== 商品页面专用样式 ===== */

/* 页面头部 */
.page-header {
    padding: 100px 0 60px;
    background: linear-gradient(135deg, var(--orange) 0%, #FFA500 100%);
    text-align: center;
    color: white;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'YGYXSZITI2', sans-serif;
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* 商品筛选 */
.products-filter {
    background: var(--white);
    padding: 2rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--white);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.filter-btn.active {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    padding: 5px;
}

.search-box input {
    border: none;
    padding: 8px 15px;
    width: 200px;
    outline: none;
}

.search-btn {
    background: var(--orange);
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 50px;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--orange-dark);
}

.sort-box select {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--white);
    color: var(--text-color);
    cursor: pointer;
    outline: none;
    min-width: 150px;
}

/* 商品展示 */
.products-showcase {
    padding: 60px 0;
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--orange);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-badge.new {
    background: var(--success-color);
}

.product-badge.sale {
    background: var(--error-color);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    height: 3rem;
    overflow: hidden;
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-info h3:hover {
    color: var(--orange);
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    height: 4rem;
    overflow: hidden;
    line-height: 1.5;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--orange);
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.page-btn.active {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn:disabled:hover {
    border-color: var(--border-color);
    color: var(--text-color);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

/* 商品分类介绍 */
.categories-intro {
    padding: 80px 0;
    background: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.category-icon i {
    font-size: 2rem;
    color: var(--white);
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.category-link {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.category-link:hover {
    gap: 1rem;
}

/* 特色推荐 */
.featured-products {
    padding: 80px 0;
    background: var(--bg-light);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.featured-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-10px);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--orange);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1;
}

.featured-image {
    height: 250px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.1);
}

.featured-content {
    padding: 2rem;
}

.featured-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.featured-desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.featured-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.featured-price .current-price {
    font-size: 1.8rem;
}

.featured-price .original-price {
    font-size: 1.2rem;
}

.featured-content .btn {
    width: 100%;
    padding: 12px;
}

/* 购物指南 */
.shopping-guide {
    padding: 80px 0;
    background: var(--white);
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
    line-height: 1.6;
}

.guide-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--orange);
    margin-bottom: 1rem;
}

.info-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--text-light);
}

/* 商品详情模态框 */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    padding: 20px;
}

.product-modal.show {
    display: flex;
}

.product-modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--orange);
}

.modal-body {
    padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .filter-controls {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .guide-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .filter-categories {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}