/* Products Page Styles */

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
}

.product-image {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 10px 10px 0 0;
}

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

.price-original {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: 0.85em;
}

.badge-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    font-weight: bold;
    font-size: 0.8em;
}

/* Filter Sidebar */
.filter-sidebar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
}

.filter-sidebar h5 {
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dc3545;
}

.btn-filter {
    border-radius: 25px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Product Grid */
.product-grid {
    min-height: 400px;
}

/* Sort Dropdown */
.dropdown-toggle {
    border-radius: 25px;
    font-weight: 600;
}

.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item {
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 2px 5px;
}

.dropdown-item:hover {
    background-color: #dc3545;
    color: white;
    transform: translateX(5px);
}

.dropdown-item.active {
    background-color: #dc3545;
    color: white;
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
    font-size: 0.9em;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.form-check-input:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* No Products Found */
.no-products-found {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-sidebar {
        margin-bottom: 30px;
    }
    
    .product-card .position-absolute {
        position: static !important;
        background: transparent !important;
    }
    
    .product-image {
        height: 200px;
    }
}

/* Loading Animation */
.product-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc3545;
    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); }
}

/* Header Styling */
.products-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 20px 0;
    border-radius: 15px;
    margin-bottom: 30px;
}

.products-header h2 {
    margin: 0;
    font-weight: 700;
}

/* Badge Styling */
.badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6;
}

/* Product Info Tags */
.product-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.product-info-tags .badge {
    font-size: 0.75em;
    padding: 4px 8px;
}

/* Price Display */
.price-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.25em;
    font-weight: 700;
    color: #dc3545;
}

.price-original {
    font-size: 1em;
    color: #6c757d;
    text-decoration: line-through;
}

.discount-badge {
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Custom Scrollbar */
.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}