.categories-container {
    padding: 2rem 0;
    min-height: 70vh;
}

/* Category Header */
.category-header {
    margin-bottom: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f1f5f9, #fff);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.category-header h1 {
    color: #2c3e50;
    font-weight: 700;
}

.category-header p {
    color: #7f8c8d;
    font-size: 1.05rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    position: sticky;
    top: 80px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.filters-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-section {
    margin-bottom: 1.2rem;
}

.filter-section h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #34495e;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-checkbox input[type="checkbox"] {
    accent-color: #3498db;
    cursor: pointer;
}

/* Products Header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-btn {
    background: #f1f5f9;
    border: 1px solid #ddd;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.view-btn.active {
    background: #3498db;
    color: white;
}

/* Product Grid */
.products-grid {
    display: grid;
    gap: 1.5rem;
}

.product-card-grid {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-grid:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Product Image */
.product-swiper {
    width: 100%;
    height: 220px;
    background: #f8f9fa;
    position: relative;
}

.product-swiper img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.4s ease;
}

.product-card-grid:hover .product-swiper img {
    transform: scale(1.05);
}

/* Product Details */
.product-category-grid {
    padding: 0.4rem 1rem;
    background: #3498db;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-name-grid {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex-grow: 1;
}

.product-price-grid {
    padding: 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e74c3c;
}

.product-stock-grid {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-stock-grid.in-stock {
    color: #27ae60;
}

.product-stock-grid.out-of-stock {
    color: #7f8c8d;
}

.view-details-btn-grid {
    display: block;
    padding: 0.7rem;
    background: #2c3e50;
    color: white;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.product-card-grid:hover .view-details-btn-grid {
    background: #3498db;
}

/* Swiper Arrows */
.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev {
    width: 34px;
    height: 34px;
    background: rgba(52, 152, 219, 0.9);
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.product-swiper .swiper-button-next::after,
.product-swiper .swiper-button-prev::after {
    font-size: 14px;
    font-weight: bold;
}

.product-swiper .swiper-button-next:hover,
.product-swiper .swiper-button-prev:hover {
    background: #2980b9;
    transform: translateY(-50%) scale(1.1);
}

/* Pagination Dots */
.product-swiper .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.product-swiper .swiper-pagination-bullet-active {
    background: #3498db;
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
    .product-swiper {
        height: 200px;
    }
    .product-swiper img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .products-meta {
        width: 100%;
        justify-content: space-between;
    }
    .product-swiper {
        height: 180px;
    }
    .product-swiper img {
        height: 180px;
    }
}

/* List View Styles */
.products-list .product-card-list {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.products-list .product-card-list:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* List view image */
.product-image-list {
    flex-shrink: 0;
    width: 180px;
    height: 150px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

/* List view info */
.product-info-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-category-list {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #3498db;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.product-name-list {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.4rem;
}

.product-description-list {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.product-price-list {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.product-meta-list {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.product-stock-list.in-stock {
    color: #27ae60;
    font-weight: 600;
}

.product-stock-list.out-of-stock {
    color: #7f8c8d;
    font-weight: 600;
}

.product-actions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.view-details-btn-list {
    padding: 0.5rem 1rem;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.view-details-btn-list:hover {
    background: #3498db;
}

.add-to-cart-btn-list {
    padding: 0.5rem 1rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart-btn-list:hover {
    background: #2ecc71;
}

/* Responsive for list view */
@media (max-width: 768px) {
    .products-list .product-card-list {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .product-image-list {
        width: 100%;
        height: 200px;
    }

    .product-info-list {
        align-items: center;
    }

    .product-actions-list {
        justify-content: center;
    }
}


.categories-container .row {
    margin: 0; 
}


.col-lg-3, .col-lg-9, .col-md-4, .col-md-8 {
    padding-left: 10px;
    padding-right: 10px;
}


.products-grid,
.products-list {
    margin-left: 0;
    margin-right: 0;
}


.products-list .product-card-list {
    width: 100%;
}


@media (min-width: 1200px) {
    .col-lg-3 {
        flex: 0 0 22%;   
        max-width: 22%;
    }
    .col-lg-9 {
        flex: 0 0 78%;   
        max-width: 78%;
    }
}


@media (max-width: 991px) {
    .col-lg-3, .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 📱 Mobile Sidebar Filters */
@media (max-width: 992px) {
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        padding: 1rem;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
    }

    .filters-sidebar.active {
        left: 0;
    }

    .mobile-filters-btn {
        display: inline-block;
        background: #3498db;
        color: #fff;
        padding: 6px 12px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
    }

    .close-filters {
        display: block;
        background: none;
        border: none;
        font-size: 18px;
        margin-left: auto;
        cursor: pointer;
        color: #e74c3c;
    }
}

/* Mobile Filters Sidebar */
@media (max-width: 992px) {
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    padding: 1rem;
    box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
  }

  .filters-sidebar.active {
    left: 0;
  }

  .close-filters {
    display: block;
    background: none;
    border: none;
    font-size: 20px;
    margin-left: auto;
    cursor: pointer;
    color: #e74c3c;
  }

  .mobile-filters-btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }
}
