/* Products Page Styles */
.products-page {
    padding-top: 64px;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 40px;
    font-weight: 600;
}

/* Filter Buttons */
.series-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    position: sticky;
    top: 64px;
    z-index: 999;
    background-color: #f5f5f5;
    padding: 20px 0;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #0066cc;
    background-color: white;
    color: #0066cc;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #0066cc;
    color: white;
}

/* Series Section */
.series-section {
    margin-bottom: 60px;
}

.series-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #0066cc;
    display: inline-block;
}

/* Products Grid */
.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Product Card */
.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Product Images */
.product-images {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-img.active {
    opacity: 1;
}

.image-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.img-prev,
.img-next {
    width: 30px;
    height: 30px;
    border: none;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.img-prev:hover,
.img-next:hover {
    background-color: #0066cc;
    color: white;
}

/* Product Info */
.product-info {
    padding: 20px;
}

.product-name {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-detail-btn {
    width: 100%;
    padding: 12px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.product-detail-btn:hover {
    background-color: #0052a3;
}

/* Modal Styles */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.product-modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-images {
    position: relative;
}

.modal-main-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 12px 12px 0 0;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
}

.modal-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.modal-thumbnail:hover,
.modal-thumbnail.active {
    opacity: 1;
}

.modal-info {
    padding: 30px;
}

.modal-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.modal-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 25px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 28px;
    }
    
    .series-filter {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .products-list {
        grid-template-columns: 1fr;
    }
    
    .series-title {
        font-size: 24px;
    }
    
    .modal-info {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .products-container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .product-desc {
        font-size: 13px;
    }
}