/* 产品系列页面样式 */

/* 产品筛选区域 */
.product-filter {
    padding: 2rem 0;
    background: var(--white);
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

/* 产品展示区域 */
.products-showcase {
    padding: 4rem 0 6rem;
    background: var(--bg-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    transform-origin: center;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c1810, #4a2c17);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-badges span {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-hot {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
}

.badge-new {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
}

.badge-classic {
    background: linear-gradient(45deg, var(--secondary-color), #B8860B);
}

.badge-custom {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.badge-gift {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn,
.add-to-cart-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--white);
    background: transparent;
    color: var(--white);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.quick-view-btn:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.add-to-cart-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.product-info {
    padding: 2rem;
}

.product-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.product-category {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-desc {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.product-specs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-specs span {
    padding: 0.4rem 0.8rem;
    background: var(--bg-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 600;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.price-current {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-original {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-note {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 产品模态框 */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.product-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(139, 0, 0, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    background: linear-gradient(135deg, #2c1810, #4a2c17);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.modal-info {
    padding: 3rem;
}

.modal-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal-category {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-price {
    margin-bottom: 2rem;
}

.modal-price span {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.modal-specs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.modal-specs span {
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    border-radius: 25px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-details {
    margin-bottom: 2rem;
}

.modal-details h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.modal-details ul {
    list-style: none;
}

.modal-details li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

.modal-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions .btn-primary {
    flex: 1;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.modal-actions .btn-primary:hover {
    background: #A00000;
    transform: translateY(-2px);
}

.modal-actions .btn-secondary {
    flex: 1;
    padding: 1rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.modal-actions .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* 产品卡片动画 */
.product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 筛选动画 */
.product-card.filtered {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

.product-card.visible {
    display: block;
    animation: filterIn 0.5s ease forwards;
}

@keyframes filterIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 移动端优化 */
@media screen and (max-width: 768px) {
    .product-filter {
        padding: 1.5rem 0;
        position: static;
    }
    
    .filter-tabs {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 1.5rem;
    }
    
    .product-info h3 {
        font-size: 1.2rem;
    }
    
    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .price-current {
        font-size: 1.5rem;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        padding: 1.5rem;
    }
    
    .modal-info {
        padding: 2rem 1.5rem;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
    
    .modal-price span {
        font-size: 1.8rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .filter-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        min-width: 200px;
        text-align: center;
    }
    
    .product-card {
        margin: 0 0.5rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-info {
        padding: 1.5rem 1rem;
    }
}

/* 加载状态 */
.products-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.products-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
} 