/* ================= SECTION ================= */
.product-listing {
    padding: 50px 70px;
}

/* ================= LAYOUT ================= */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

/* ================= FILTERS ================= */
.filters h4 {
    color: #f4b400;
    font-size: 14px;
    margin: 25px 0 10px;
}

.filters ul {
    list-style: none;
    padding: 0;
}

.filters li {
    font-size: 13px;
    color: #cfcfcf;
    margin-bottom: 8px;
}

/* ================= PRODUCTS HEADER ================= */
.products-header h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.products-header h3 span {
    color: #f4b400;
}

.products-header p {
    font-size: 12px;
    color: #aaa;
}

/* ================= GRID ================= */
.product-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

/* ================= CARD ================= */
.product-card {
    position: relative;
    background: #0f0f0f;
    padding: 18px;
    border-radius: 14px;
    color: #fff;
    text-align: left;
}

/* ================= DISCOUNT BADGE ================= */
.product-card .badge {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 44px;
    height: 44px;
    background: #ff8a1e;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

/* ================= PRODUCT IMAGE ================= */
.product-card img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 26px 0px 18px;
}

/* ================= TITLE ================= */
.product-card h5 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    font-weight: 500;
}

/* ================= SKU ================= */
.product-card .sku {
    font-size: 12px;
    color: #b0b0b0;
    margin-bottom: 8px;
}

/* ================= PRICE ================= */
.product-card .price {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.product-card .price span {
    font-size: 12px;
    text-decoration: line-through;
    color: #8a8a8a;
    margin-left: 6px;
}

/* ================= ADD TO CART ================= */
.product-card button {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 0;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.25s ease;
}

.product-card button:hover {
    background: #e10600;
    /* red on hover */
}


/* hide checkbox */
.filter-checkbox {
    display: none;
}

/* filter button */
.filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #fff;
    border: 1px solid #222;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 12px;
}

/* sidebar desktop */
.filters {
    width: 100%;
    background: #0a0a0a;
    padding: 16px;
    border: 1px solid #222;
    color: #fff;
}

/* header inside filters */
.filter-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.close-filters {
    font-size: 22px;
    cursor: pointer;
}

/* Mobile behavior logic moved to bottom responsive section */

/* layout helpers */
.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid #222;
    padding-bottom: 6px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    cursor: pointer;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
}


/* ================= Price ================= */
/* =========================
   DUAL RANGE SLIDER (FIXED)
========================= */

.price-range.dual {
    position: relative;
    height: 40px;
    margin-top: 14px;
}

/* BASE TRACK */
.price-range.dual::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #ccc;
    transform: translateY(-50%);
    border-radius: 2px;
}

/* ACTIVE RANGE (RED BAR) */
.price-range.dual::after {
    content: "";
    position: absolute;
    top: 50%;
    height: 4px;
    background: #d10000;
    transform: translateY(-50%);
    border-radius: 2px;

    /* These will be updated by JS */
    left: var(--min);
    right: calc(100% - var(--max));
}

/* RANGE INPUTS */
.price-range.dual input[type="range"] {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    appearance: none;
    background: none;
}

/* THUMB */
.price-range.dual input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #d10000;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.price-range.dual input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 16px;
    height: 16px;
    background: #d10000;
    border-radius: 50%;
    cursor: pointer;
}

/* REMOVE DEFAULT TRACK */
.price-range.dual input[type="range"]::-webkit-slider-runnable-track {
    background: none;
}

.price-range.dual input[type="range"]::-moz-range-track {
    background: none;
}

/* PRICE TEXT */
.price-values {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 600;
    color: #fef6f6;
}




/___________/
/* Product Card */
.product-card {
    position: relative;
}

/* Hide checkbox */
.wishlist-toggle {
    display: none;
}

/* Heart Icon */
.wishlist-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    /* VERY SMALL */
    color: #bbb;
    cursor: pointer;
    z-index: 2;
}

/* Checked = filled heart */
.wishlist-toggle:checked+.wishlist-heart i {
    color: #D70004;
    font-weight: 900;
}




/___________/
/* ================= FILTERS & PAGINATION BASE STYLES ================= */
.filters {
    background: #121212;
    padding: 20px;
    border-radius: 14px;
    font-size: 12px;
}

.filter-group {
    margin-bottom: 22px;
}

.filter-group h4 {
    color: #f4b400;
    font-size: 13px;
    margin-bottom: 10px;
}

.filter-group label {
    display: block;
    color: #cfcfcf;
    margin-bottom: 6px;
    cursor: pointer;
}

.filter-group input {
    margin-right: 6px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
}

.price-flex {
    display: flex;
    gap: 0.2rem;
}

.pinput {
    width: 50%;
    height: 30px;
    border: none;
    outline: none;
    padding-left: 10px;
    border-radius: 5px;
    background-color: #d9d7d7;
}

.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 20px;
}

/* ================= RESPONSIVE LAYOUT ================= */

/* Extra Large Screens */
@media (max-width: 1400px) {
    .product-listing {
        padding: 40px 50px;
    }
}

/* Large Screens (Laptops & Desktops) */
@media (max-width: 1200px) {
    .product-listing {
        padding: 40px;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Medium Screens (Tablets & Smaller Laptops) */
@media (max-width: 992px) {
    .layout {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Small Screens (Tablets & Mobile Landscape) */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-listing {
        padding: 30px 24px;
    }

    .products-header h3 {
        font-size: 16px;
    }

    /* Filters drawer logic */
    .filter-toggle {
        display: flex;
    }

    .filters {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        overflow-y: auto;
        padding: 24px;
        border-radius: 0;
        z-index: 9999;
        transition: left 0.3s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .filter-header {
        display: flex;
    }

    .filter-checkbox:checked~.filters {
        left: 0;
    }
}

/* Extra Small Screens (Mobile Portrait) */
@media (max-width: 576px) {
    .product-listing {
        padding: 20px 16px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        padding: 12px;
    }

    .product-card .price {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .product-card h5 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .product-card button {
        padding: 10px 0;
        font-size: 12px;
    }
}

/* Tiny Screens */
@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
        /* Display 1 per row if screen gets very narrow */
    }

    .product-card {
        padding: 16px;
    }
}