* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Nunito", sans-serif;
}


body {
    padding-top: var(--header-height) !important;
    background: #f8f9fa;
    color: #333;
}

.navbar-placeholder {
    height: 70px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-placeholder h1 {
    color: #333;
    font-size: 24px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

/* Filter Row - Top Dropdowns */
/* .filter-row {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
        flex-direction: row;
} */

.filter-row {
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    background-color: white;
    -webkit-overflow-scrolling: touch;
}

.filter-row::-webkit-scrollbar {
    display: none;
}


.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: space-between;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #000000;
}

.filter-btn.active {
    background: #575757;
    color: #fff;
    border-color: #000000;
}

.filter-dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 5px;
    border: 1px solid #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown-content.show {
    display: block;
}

.filter-section-dropdown {
    padding: 15px;
}

.filter-section-dropdown h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.filter-options-dropdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.filter-option-dropdown input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #000000;
}

.filter-option-dropdown label {
    font-size: 13px;
    color: #555;
    cursor: pointer;
    flex-grow: 1;
}

.filter-count {
    font-size: 11px;
    color: #999;
}

.price-range-dropdown {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.price-input-dropdown {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.rating-stars {
    color: #ffc107;
    font-size: 14px;
}

/* Clear Filters */
/* .clear-filters-btn {
    background: #000000;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
} */

.clear-filters-btn {
    background: #000000;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    /* width: fit-content; */
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 105px;
}

.clear-filters-btn:hover {
    background: #343434;
}

/* Sort and Results Row */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-info {
    color: #666;
    font-size: 14px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

.view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    background: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: #000000;
    color: #fff;
}

/* Product Grid Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 20vw, 280px), 1fr));
    gap: clamp(10px, 3vw, 30px);
    margin: auto;
    max-width: 100%;
}

.top-card {
    background: #fff;
    border-radius: 10px;
    padding: clamp(8px, 1.5vw, 15px);
    /* box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1); */
    box-shadow: 0px 6px 10px rgb(0 0 0 / 8%);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.top-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.top-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: clamp(5px, 1vw, 10px);
}

.title {
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    margin: clamp(5px, 1vw, 10px) 0;
    line-height: 1.3;
    flex-grow: 1;
}

.save-label {
    background: #d9ffc6;
    color: rgb(59 56 56);
    /* padding: clamp(3px, 0.5vw, 5px); */
    padding: 3px 5px;
    font-size: clamp(0.5rem, 0.8vw, 0.625rem);
    border-radius: 5px;
    width: fit-content;
    margin-bottom: clamp(5px, 1vw, 10px);
}

.price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 2vw, 20px);
    margin-top: auto;
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.price {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: bold;
}

.old-price {
    text-decoration: line-through;
    color: gray;
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
}


.buy-btn {
    background: unset;
    color: #000000;
    padding: clamp(4px, 1vw, 6px) clamp(12px, 2vw, 10px);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid;
    border-top-width: 1px;
    border-bottom-width: 3px;
    font-size: clamp(0.625rem, 1vw, 0.75rem);
    white-space: nowrap;
    transition: all 0.2s ease;
}


/* .buy-btn:hover {
    background: #000000;
    color: #ffffff;
} */

.buy-btn:hover {
    background: #000000;
    color: #ffffff;
    border: 2px solid black;
    border-top-width: 1px;
    border-bottom-width: 3px;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    font-size: 18px;
}

.product-specs {
    font-size: 11px;
    color: #666;
    margin: 5px 0;
}

@media (max-width: 400px){
    .top-card img{
        margin-bottom: 0;
    }
    .title{
        margin-top: 0;
        line-height: 0;
    }

}

/* Fine-tuning for very small screens */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-info {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}

/* Fine-tuning for medium screens */
@media (min-width: 481px) and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Fine-tuning for large screens */
@media (min-width: 769px) and (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Fine-tuning for extra large screens */
@media (min-width: 1201px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
}

@media (min-width: 1400px){
    .container {
        max-width: 100%;
        padding-right: 80px;
        padding-left: 80px;
    }
}



.products-scroll {
    max-height: 80vh;
    /* Adjust height for web */
    overflow-y: auto;
    /* Vertical scroll */
    overflow-x: hidden;
    /* No horizontal scroll */
    padding-right: 5px;
    /* Avoid scrollbar overlay */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.products-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* On mobile, full height scrolling */
/* @media (max-width: 768px) {
    .products-scroll {
        max-height: calc(100vh - 250px);
    }
} */


.image-container {
    position: relative;
    /* makes heart position absolute inside */
}

/* .wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 2;
}

.wishlist-btn i {
    color: #ff4d6d;
    font-size: 18px;
} */

.wishlist-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    background: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 0px 20px rgb(0 0 0 / 18%);
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-self: center;
    text-decoration: none;
}


.wishlist-btn i {
    color: #000000;
    font-size: 14px;
}

.wishlist-btn:hover {
    background: #000000;
    ;
}

.wishlist-btn:hover i {
    color: white;
}



/* @media (max-width: 1070px) {
    .filter-row {
        overflow-x: scroll;
        width: 100%;
        
    }
    .filter-dropdown-content {
    position: absolute;
    z-index: 9999;
}

} */

#filterForm {
    position: sticky;
    top: 80px;
    /* height of navbar */
    z-index: 1005 !important;
}

.offcanvas {
    margin-top: 60px;
    z-index: 1008;
}

.mob-filter-bar {
    position: sticky;
    top: 80px;
    /* height of navbar */
    z-index: 1005;
    background-color: white;
}

.offcanvas-clear-btn {
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #a3aac3;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
}

.mob-filter-bar {
    display: none;
    width: 100%;
}

.mob-filter-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn.btn-dark {
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #a3aac3;
    background-color: white;
}

.btn.btn-dark i {
    color: #303137;
}


@media (max-width: 991px) {
    #filterForm {
        display: none;
    }

    .mob-filter-bar {
        display: block;
    }

    .filter-row {
        position: relative;
        overflow-x: scroll;
        width: 100%;
        overflow-y: visible !important;

    }

    .filter-dropdown-content {
        position: absolute;
        z-index: 9999;
        overflow-y: visible !important;
    }

}


.offcanvas-body {
    padding: 20px;
    background-color: #ffffff;
    overflow-y: auto;
    height: calc(100vh - 120px);
    /* Account for header and margin */
}

/* Filter sections */
.offcanvas-body .mb-3 {
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
}

.offcanvas-body .mb-3:last-of-type {
    border-bottom: none;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkbox styling */
.form-check {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 2px solid #000000;
    border-radius: 3px;
    background-color: #ffffff;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: #000000;
    border-color: #000000;
}

.form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    border-color: #000000;
}

.form-check-label {
    font-size: 13px;
    color: #333333;
    cursor: pointer;
    line-height: 1.3;
    margin: 0;
    padding-left: 0;
}

.form-check-label:hover {
    color: #000000;
}

/* Clear button */
.offcanvas-clear-btn {
    padding: 12px 20px;
    border-radius: 6px;
    border: 2px solid #000000;
    background-color: #000000;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.offcanvas-clear-btn:hover {
    background-color: #ffffff;
    color: #000000;
    transform: translateY(-1px);
}

.offcanvas-clear-btn:active {
    transform: translateY(0);
}

.offcanvas-clear-btn i {
    font-size: 12px;
}

.offcanvas-header .btn-close {
    background-color: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    opacity: 0.8;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offcanvas-header .btn-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}



/* Empty State Styling */
.empty {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    height: auto;
    max-height: 500px;
    /* default smaller height */
    opacity: 0.9;
}

/* Tablet View */
@media (max-width: 992px) {
    .empty {
        max-width: 80%;
        max-height: 300px;
    }
}

/* Mobile View */
@media (max-width: 576px) {
    .empty {
        max-width: 85%;
        max-height: 250px;
    }
}

/* Ultra-wide screens (web >1400px) */
@media (min-width: 1400px) {
    .empty {
        max-width: 90%;
        max-height: 550px;
    }
}