/* Category Page - Compact & Clean Design */

/* Breadcrumb */
.breadcrumb-section {
    background: var(--surface);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* Category Header - Compact */
.category-header {
    background: linear-gradient(135deg, #2874F0, #1e5bb8);
    padding: 2rem 0;
    color: white;
    margin-bottom: 1.5rem;
}

.category-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.category-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.category-info p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.product-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.category-icon {
    font-size: 4rem;
    opacity: 0.2;
}

/* Filters Section */
.filters-section {
    padding: 1.5rem 0;
    min-height: 60vh;
}

.filters-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

/* Filter Toggle (Mobile) */
.filter-toggle-btn {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    width: 100%;
}

.filter-toggle-btn:hover {
    background: var(--primary-hover);
}

.filter-toggle-btn i {
    margin-right: 0.5rem;
}

/* Filters Sidebar - Compact */
.filters-sidebar {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.filter-header h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-filters {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Filter Groups - Compact */
.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-group h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.filter-option:hover {
    color: var(--text-primary);
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Price Range */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.price-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    outline: none;
}

.price-input:focus {
    border-color: var(--primary-color);
}

.apply-price-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.625rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.apply-price-btn:hover {
    background: var(--primary-hover);
}

/* Clear Filters */
.clear-filters-btn {
    width: 100%;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.625rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Products Area */
.products-area {
    flex: 1;
}

/* Products Toolbar - Compact */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.toolbar-left {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.showing-count {
    font-weight: 700;
    color: var(--primary-color);
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: var(--primary-color);
}

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

/* Product Card - COMPACT & CLEAN */
.product-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.wishlist-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.wishlist-icon:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

.wishlist-icon i {
    font-size: 1rem;
    color: #dc2626;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.625rem;
}

.product-rating i {
    color: #fbbf24;
    font-size: 0.75rem;
}

.rating-count {
    color: #94a3b8;
    font-size: 0.75rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.original-price {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 0.625rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.buy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Loading & No Products */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

@media (max-width: 768px) {
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 1001;
        overflow-y: auto;
        transition: left 0.3s ease;
        border-radius: 0;
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .close-filters {
        display: block;
    }
    
    .category-header {
        padding: 1.5rem 0;
    }
    
    .category-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .category-info h1 {
        font-size: 1.5rem;
    }
    
    .category-icon {
        font-size: 3rem;
    }
    
    .products-toolbar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        text-align: center;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.8125rem;
    }
    
    .current-price {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 0.625rem;
    }
    
    .buy-btn {
        font-size: 0.8125rem;
        padding: 0.5rem;
    }
    
    .discount-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Filter Overlay */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.filter-overlay.active {
    display: block;
}
