/* Products Page Styles */

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.filters-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.5rem;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f8f9fa;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #555;
}

.category-filters .form-check {
    margin-bottom: 0.75rem;
}

.category-filters .form-check-label {
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
}

.category-filters .form-check-input:checked + .form-check-label {
    color: var(--primary-color, #007bff);
    font-weight: 500;
}

/* Products Header */
.products-header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.products-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

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

.product-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}

.product-placeholder-large {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.badge-featured {
    background: var(--warning-color, #ffc107);
    color: #000;
}

.badge-discount {
    background: var(--danger-color, #dc3545);
    color: white;
}

.badge-out-of-stock {
    background: var(--secondary-color, #6c757d);
    color: white;
}

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--primary-color, #007bff);
    text-decoration: none;
}

.product-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.9rem;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color, #007bff);
}

.old-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.discount-badge {
    background: var(--danger-color, #dc3545);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.product-actions {
    margin-top: auto;
}

/* Product Detail Page */
.product-images {
    position: sticky;
    top: 2rem;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-images .thumbnail-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail-images .thumbnail-image:hover,
.thumbnail-images .thumbnail-image.active {
    border-color: var(--primary-color, #007bff);
    transform: scale(1.05);
}

.product-details {
    padding-left: 2rem;
}

.product-details .product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.product-details .product-price {
    margin-bottom: 2rem;
}

.product-details .current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-details .old-price {
    font-size: 1.5rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 1rem;
}

.product-details .discount-badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin-left: 1rem;
}

.product-sku {
    color: #666;
    font-size: 0.95rem;
}

.description-content {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.product-meta {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

/* Related Products */
.related-products {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-products h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .product-details {
        padding-left: 0;
        margin-top: 2rem;
    }

    .product-details .product-title {
        font-size: 2rem;
    }

    .product-details .current-price {
        font-size: 1.5rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-details .product-title {
        font-size: 1.75rem;
    }

    .main-image img {
        height: 300px;
    }

    .thumbnail-images .thumbnail-image {
        height: 60px;
    }
}

/* Subcategories Styles */
.subcategories {
    margin-bottom: 1rem;
}

.subcategories h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

.subcategories-list {
    font-size: 0.85rem;
}

.subcategory-link {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    transition: color 0.3s ease;
}

.subcategory-link:hover {
    color: var(--secondary-color, #6c757d);
    text-decoration: underline;
}
