/* ==============================
   CATEGORY PAGE COMMON
============================== */

.category-products {
    margin-top: 10px;
}

.light-background {
    background: #f8f9fa;
}

/* ==============================
   SIDEBAR
============================== */

.sidebar .widget-item {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* ==============================
   CATEGORY TREE
============================== */

.category-tree .category-item {
    margin-bottom: 10px;
}

.category-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.category-header:hover {
    color: #0d6efd;
}

.category-link {
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
}

.category-link:hover,
.category-link.active {
    color: #0d6efd;
}

.category-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.category-header.collapsed .bi-chevron-up {
    display: none;
}

.category-header:not(.collapsed) .bi-chevron-down {
    display: none;
}

.subcategory-list li a {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: 0.3s;
}

.subcategory-list li a:hover,
.subcategory-list li a.active {
    color: #0d6efd;
}

/* ==============================
   PRICE RANGE SLIDER
============================== */

.price-range-container {
    position: relative;
}

.range-slider {
    position: relative;
    height: 6px;
    background: #ddd;
    border-radius: 10px;
}

.slider-progress {
    position: absolute;
    height: 100%;
    background: #0d6efd;
    border-radius: 10px;
    transition: 0.3s;
}

.range-slider input[type=range] {
    position: absolute;
    width: 100%;
    top: -6px;
    pointer-events: none;
    appearance: none;
    background: none;
}

.range-slider input::-webkit-slider-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    background: #0d6efd;
    border-radius: 50%;
    cursor: pointer;
    appearance: none;
    transition: 0.3s;
}

/* ==============================
   FILTER BAR (TOP)
============================== */

.category-filters {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
}

.filter-item label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.search-btn {
    background: #0d6efd;
    color: #fff;
    transition: 0.3s;
}

.search-btn:hover {
    background: #084298;
}

/* View buttons */
.view-options .view-btn {
    border: 1px solid #dee2e6;
    padding: 6px 10px;
    background: #fff;
    margin-right: 6px;
    transition: 0.3s;
}

.view-options .view-btn.active,
.view-options .view-btn:hover {
    background: #0d6efd;
    color: #fff;
}

/* ==============================
   PRODUCT CARDS
============================== */

.product-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s ease;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.product-card img {
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

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

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

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

.product-title a:hover {
    color: #0d6efd;
}

.product-card .price {
    font-size: 15px;
    color: #0d6efd;
    font-weight: 600;
}

/* Sale Price */
.product-card .price .original {
    text-decoration: line-through;
    color: #6c757d;
    margin-right: 5px;
}

.product-card .price .sale {
    color: #dc3545;
}

/* ==============================
   LIST VIEW
============================== */

.list-view > div {
    width: 100% !important;
}

.list-view .product-card {
    display: flex;
    align-items: center;
    text-align: left;
}

.list-view .product-card img {
    width: 140px;
    margin-right: 20px;
}

/* ==============================
   AJAX LOADING STATE
============================== */

.ajax-loading {
    opacity: 0.5;
    pointer-events: none;
}

.ajax-spinner {
    text-align: center;
    padding: 40px;
    font-weight: 600;
    color: #0d6efd;
}

/* ==============================
   RESPONSIVE FIXES
============================== */

@media (max-width: 991px) {
    .sidebar {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .list-view .product-card {
        flex-direction: column;
        text-align: center;
    }

    .list-view .product-card img {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 575px) {
    .filter-item {
        text-align: left;
    }

    .view-options {
        margin-bottom: 10px;
    }
}

/* ==============================
   CATEGORY SLIDER CARDS
============================== */

.category-cards {
    padding: 60px 0;
}

.category-card {
    background: #e1e1e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: 0.3s ease;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    height: 100%;
    position: relative;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

.category-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.category-image img {
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

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

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.category-count {
    font-size: 14px;
    color: #6c757d;
}

/* ==============================
   SWIPER BUTTONS
============================= */

.category-cards .swiper-button-next,
.category-cards .swiper-button-prev {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 50%;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.category-cards .swiper-button-next::after,
.category-cards .swiper-button-prev::after {
    font-size: 16px;
}
