* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

:root {
    --primary: #1a3b5d;
    --accent: #e44d2e;
    --border: #e2e8f0;
}

/* Main container - exact header width */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 0px;
    width: 100%;
}

/* Category Header with Breadcrumb inside */
.category-header {
    background: white;
    border-radius: 16px;
    padding: 25px 30px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb i {
    font-size: 10px;
    color: #94a3b8;
}

.breadcrumb span {
    color: #1e293b;
    font-weight: 500;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.header-left p {
    color: #64748b;
    max-width: 600px;
    font-size: 14px;
}

.stats-right {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f1f5f9;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.stat-item i {
    color: var(--accent);
    font-size: 14px;
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

/* Layout */
.page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin: 30px 0;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.filter-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent);
}

.filter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.filter-header h3 i {
    color: var(--accent);
    margin-right: 8px;
}

.clear-all {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 15px;
}

.filter-title i {
    color: var(--accent);
    margin-right: 8px;
    font-size: 14px;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    flex: 1;
}

.price-input label {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 5px;
}

.price-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}

.price-input input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(228, 77, 46, 0.1);
}

.apply-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-btn:hover {
    background: #0f2a42;
}

/* Radio & Checkbox styles */
.filter-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: var(--accent);
    cursor: pointer;
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    color: #475569;
    font-size: 14px;
}

.filter-option:hover {
    background: #f8fafc;
}

/* Sort Options in Filter (Mobile) */
.sort-options {
    display: none;
}

.sort-links-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sort-link-mobile {
    display: block;
    padding: 12px 15px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.sort-link-mobile:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.sort-link-mobile.active {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #1e293b;
    font-weight: 600;
}

.sort-link-mobile i {
    margin-right: 8px;
    width: 16px;
    color: #64748b;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Top Bar - Desktop Only */
.top-bar {
    background: white;
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.results-count {
    color: #64748b;
    font-size: 14px;
}

.results-count strong {
    color: var(--primary);
    font-size: 16px;
}

.sort-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-links span {
    color: #64748b;
    font-size: 14px;
}

.sort-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.sort-link:hover {
    color: var(--accent);
    background: #fff1ed;
}

.sort-link.active {
    color: var(--accent);
    background: #fff1ed;
    font-weight: 500;
}

/* Products Grid - 24 products per page */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    transition: opacity 0.2s ease;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge {
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge.sale {
    background: var(--accent);
}

.badge.bestseller {
    background: var(--primary);
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    color: #64748b;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wishlist-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: white;
    border-color: var(--accent);
}

.wishlist-btn.active i {
    color: var(--accent);
    font-weight: 900;
}

/* Square image container - 1:1 aspect ratio */
.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f8fafc;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
}

.product-brand {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: var(--primary);
    text-decoration: none;
}

.product-title a:hover {
    color: var(--accent);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.old-price {
    font-size: 14px;
    color: #94a3b8;
    text-decoration: line-through;
}

.cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-btn:hover {
    background: #0f2a42;
}

.cart-btn i {
    margin-right: 8px;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--primary);
}

.loading-spinner i {
    font-size: 20px;
    color: var(--accent);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: white;
    cursor: pointer;
}

.page-item:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Empty State */
.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    margin: 0 0 20px 0;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.mobile-filter-btn i {
    margin-right: 8px;
}

.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.filter-overlay.show {
    display: block;
}

/* Mobile Filter Header */
.mobile-filter-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary);
    color: white;
    margin: -20px -20px 20px -20px;
    border-radius: 16px 16px 0 0;
}

.mobile-filter-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.mobile-filter-header h3 i {
    margin-right: 8px;
}

.mobile-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 340px;
        height: 100vh;
        z-index: 1000;
        background: white;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 0;
        box-shadow: 2px 0 15px rgba(0,0,0,0.15);
        border-radius: 0 16px 16px 0;
    }
    
    .sidebar.show {
        display: block;
        left: 0;
    }
    
    .filter-card {
        border-radius: 0;
        border: none;
        padding: 20px;
        min-height: 100vh;
    }
    
    .mobile-filter-header {
        display: flex;
    }
    
    .mobile-filter-btn {
        display: block;
    }
    
    .filter-overlay.show {
        display: block;
    }
    
    /* Hide desktop top-bar on mobile */
    .top-bar {
        display: none;
    }
    
    /* Show sort options in filter */
    .sort-options {
        display: block;
        margin-top: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Mobile header row - count right side */
    .header-row {
        flex-direction: row;
        align-items: center;
    }
    
    .header-left {
        flex: 1;
    }
    
    .stats-right {
        width: auto;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }
    
    .category-header {
        padding: 15px;
    }
    
    .header-left h1 {
        font-size: 20px;
    }
    
    .header-left p {
        font-size: 12px;
    }
    
    .stats-right {
        padding: 6px 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        font-size: 12px;
    }
    
    .products-grid {
        gap: 10px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 13px;
        height: 36px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .cart-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    /* 24 products on mobile - 2 columns, 12 rows */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-right {
        width: 100%;
        justify-content: space-between;
    }
}