/* 20% - 80% RESPONSIVE CONTAINER */
.main-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    gap: 50px;
    padding: 0 20px;
}

/* LEFT SIDEBAR (20%) */
.sidebar {width: 22%;flex-shrink: 0;}

/* RIGHT CONTENT (78%) */
.main-content {min-width: 0;flex-grow: 1;}

/* CATEGORY SECTION */
.category-tab-container {border: none;margin-bottom: 30px;background:transparent;
}

.category-main-header {background: transparent;color: #111;padding: 10px 0;  font-size: 13px;font-weight: 700;text-transform: uppercase;letter-spacing: 0.5px;display: flex;justify-content: space-between;align-items: center;
    cursor: pointer;user-select: none;border-bottom: 1.5px solid #eaeaea;
}

.category-main-header::after {content: '▲';font-size: 7px;color: #666;  transition: transform 0.3s ease;
}

/* Smooth Arrow Rotation */
.category-tab-container.collapsed .category-main-header::after {transform: rotate(180deg);
}

.nav-menu-wrapper {max-height: 2000px;overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-tab-container.collapsed .nav-menu-wrapper {
    max-height: 0px !important;
}

.nav-menu {list-style: none;padding: 0;margin-top: 15px;}

.nav-item-container {padding: 8px 0;}

.nav-item-header {font-size: 14px;font-weight: 400;color: #333;cursor: pointer;
    display: flex;justify-content: space-between;align-items: center;
    user-select: none;transition: color 0.2s;
}

.nav-item-header:hover {color: #ff6a00;}

.toggle-icon {font-size: 14px;font-weight: 300;color: #888;float: right;}

.submenu-level-1,
.submenu-level-2 {list-style: none;padding-left: 12px;max-height: 0;
    overflow: hidden;transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    
}

.submenu-level-1 li,
.submenu-level-2 li {font-size: 13.5px;padding: 6px 0;color: #555;
    cursor: pointer;
}

.simple-nav-item {font-size: 14px;font-weight: 400;color: #333;
    padding: 8px 0;cursor: pointer;transition: color 0.2s;
}

.simple-nav-item:hover {color: #ff6a00;}

/* FILTERS SECTION */
.filter-section {border: none;padding: 0;margin-bottom: 30px;
    background: transparent;
}

.filter-header {font-size: 13px;font-weight: 700;
    text-transform: uppercase;letter-spacing: 0.5px;
    cursor: pointer;display: flex;justify-content: space-between;
    align-items: center;padding: 10px 0;user-select: none;
    border-bottom: 1.5px solid #eaeaea;color: #111;
}

.filter-header::after {content: '▲';font-size: 7px;color: #666;
    transition: transform 0.3s ease;
}

.filter-section.collapsed .filter-header::after {
    transform: rotate(180deg);
}

.filter-content {margin-top: 15px;max-height: 300px;overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-section.collapsed .filter-content {max-height: 0px !important;}

.checkbox-group {display: flex;align-items: center;margin-bottom: 10px;
    font-size: 14px;color: #444;cursor: pointer;}

.checkbox-group input {margin-right: 8px;accent-color: #111;}

/* PRICE FILTER FIELD UI */
.price-input-container {display: flex;align-items: center;
    justify-content: flex-start;margin-top: 15px;gap: 8px;}

.price-field {display: flex;align-items: center;border: 1px solid #ccc;
    border-radius: 2px;padding: 6px 10px;width: 80px;background: #fff;
}

.price-field span {color: #999;font-size: 13px;margin-right: 4px;}

.price-field input {width: 100%;border: none;outline: none;
    background: transparent;font-size: 13px;color: #222;
    text-align: center;
}

.price-to {font-size: 13px;color: #777;}

/* DUAL RANGE PRICE SLIDER */
.price-slider-wrapper {position: relative;width: 100%;height: 24px;
    margin: 15px 0 10px 0;}

.price-slider-wrapper .slider-track {width: 100%;height: 4px;
    position: absolute;margin: auto;top: 0;bottom: 0;
    border-radius: 2px;background: #e0e0e0;}

.price-slider-wrapper input[type="range"] {-webkit-appearance: none;
    -moz-appearance: none;appearance: none;width: 100%;outline: none;
    position: absolute;margin: auto;top: 0;bottom: 0;
    background-color: transparent;pointer-events: none;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;height: 4px;
}

.price-slider-wrapper input[type="range"]::-moz-range-track {
    -moz-appearance: none;height: 4px;
}

.price-slider-wrapper input[type="range"]::-ms-track {
    appearance: none;height: 4px;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;height: 12px;width: 12px;
    background-color: #000;cursor: pointer;
    border-radius: 50%;pointer-events: auto;
    margin-top: -4px;
}

.price-slider-wrapper input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;height: 12px;width: 12px;
    background-color: #000;border: none;cursor: pointer;
    border-radius: 50%;pointer-events: auto;
}

.price-slider-wrapper input[type="range"]::-ms-thumb {
    appearance: none;height: 12px;width: 12px;
    background-color: #000;cursor: pointer;
    border-radius: 50%;pointer-events: auto;
}

.btn-apply-price {
    width: 100%;background: #fff;color: #000;
    border: 1px solid #000;padding: 10px;
    font-size: 12px;font-weight: 600;cursor: pointer;
    border-radius: 2px;transition: all 0.2s;
    text-align: center;text-transform: uppercase;
    letter-spacing: 0.5px;margin-top: 15px;
}

.btn-apply-price:hover {
    background: #000;color: #fff;
}

/* PRODUCT GRID VIEW SETUP & TOOLBAR */
.grid-toolbar {
    display: flex;justify-content: space-between;
    align-items: center;border-bottom: 1.5px solid #eaeaea;
    padding-bottom: 15px;margin-bottom: 25px;font-size: 9.5pt;
    color: #555;flex-wrap: wrap;gap: 15px;
}

.toolbar-left,
.toolbar-right {
    display: flex;align-items: center;gap: 10px;
}

.toolbar-label {
    font-size: 8.5pt;font-weight: 700;letter-spacing: 0.5px;
    color: #111;margin-right: 5px;
}

.view-btn {
    background: none;border: 1px solid #ccc;padding: 6px 8px;
    cursor: pointer;color: #888;border-radius: 2px;display: flex;
    align-items: center;justify-content: center;transition: all 0.2s;
}

.view-btn:hover,
.view-btn.active {
    color: #000;border-color: #000;background: #f9f9f9;
}

.toolbar-select-group {
    display: flex;align-items: center;gap: 8px;margin-left: 15px;
}

.toolbar-select-group select {
    border: 1px solid #ccc;padding: 6px 10px;font-size: 9pt;
    border-radius: 2px;background: #fff;cursor: pointer;outline: none;
}

.toolbar-select-group select:focus {
    border-color: #000;
}

.grid-container {
    display: grid;grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;transition: all 0.3s ease;
}

.product-card-link {
    text-decoration: none;color: inherit;display: block;
}

.product-card {
    background: #fff;transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.image-container {
    width: 100% !important;height: 220px !important;
    position: relative;background: var(--bg-light);
    overflow: hidden;border-radius: 4px;
}

.image-container img {
    width: 100%;height: 100%;object-fit: cover;object-position: top;
    display: block;transition: transform 0.5s ease;
}

.product-card:hover .image-container img {
    transform: scale(1.05);
}

.badge-discount {
    position: absolute;top: 0;left: 0;background: #000;
    color: #fff;font-size: 7.5pt;font-weight: 600;
    padding: 4px 8px;letter-spacing: 0.5px;border-radius: 2px;z-index: 2;
}

.product-info {
    padding: 12px 0 5px 0;
}

.product-title {
    font-size: 10pt;font-weight: 500;color: #111;margin-bottom: 6px;
    white-space: nowrap;overflow: hidden;text-overflow: ellipsis;
}

.product-card:hover .product-title {
    color: var(--accent-color);
}

.product-price {
    font-size: 10pt;font-weight: 600;color: #111;
}

.original-price {
    text-decoration: line-through;color: var(--text-muted);
    margin-right: 8px;font-weight: 400;font-size: 9.5pt;
}

/* Grid & List View Modifiers */
.grid-container.grid-3-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-container.grid-4-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-container.list-view {
    display: flex;flex-direction: column;gap: 20px;
}

.grid-container.list-view .product-card-link {
    width: 100%;
}

.grid-container.list-view .product-card {
    display: flex;gap: 20px;align-items: center;
    border-bottom: 1px solid #eaeaea;padding-bottom: 20px;
}

.grid-container.list-view .image-container {
    width: 220px;flex-shrink: 0;
}

.grid-container.list-view .product-info {
    padding: 0;flex-grow: 1;
}

.grid-container.list-view .product-title {
    font-size: 13pt;font-weight: 600;white-space: normal;overflow: visible;
    text-overflow: clip;margin-bottom: 10px;
}

.grid-container.list-view .product-price {
    font-size: 11pt;
}

/* Category active style */
.submenu-level-2 li.active-cat,
.submenu-level-1 li.active-cat,
.simple-nav-item.active-cat {
    color: #ff6a00 !important;font-weight: 700 !important;
}

/* Mobile Filter styles & Drawer setup */
.mobile-filter-btn {
    display: none;align-items: center;gap: 8px;background: #fff;color: #111;
    border: 1px solid #111;padding: 6px 12px;font-size: 12px;font-weight: 600;
    cursor: pointer;border-radius: 2px;transition: all 0.2s ease;
    text-transform: uppercase;letter-spacing: 0.5px;
}

.mobile-filter-btn:hover {
    background: #111;color: #fff;
}

.mobile-filter-btn svg {
    display: block;
}

.sidebar-overlay {
    position: fixed;top: 0;left: 0;width: 100vw;height: 100vh;
    background: rgba(0, 0, 0, 0.4);z-index: 999;opacity: 0;visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;visibility: visible;
}

.sidebar-mobile-header {
    display: none;justify-content: space-between;align-items: center;
    padding: 15px 20px;border-bottom: 1.5px solid #eaeaea;background: #f9f9f9;
}

.sidebar-mobile-header span {
    font-size: 13px;font-weight: 700;text-transform: uppercase;
    color: #111;letter-spacing: 0.5px;
}

.sidebar-close-btn {
    background: none;border: none;font-size: 26px;cursor: pointer;color: #333;
    line-height: 1;padding: 0;
}

body.sidebar-open {
    overflow: hidden;
}

/* RESPONSIVE DESIGN BREAKPOINTS */
@media (max-width: 1440px) {
    .main-wrapper {
        padding-left: 20px;padding-right: 20px;
    }
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .main-wrapper {
        flex-direction: column;gap: 20px;margin: 20px auto 0 auto;
        padding-left: 15px;padding-right: 15px;
    }

    /* Transform Sidebar into an Offscreen Sliding Drawer on mobile */
    .sidebar {
        position: fixed;top: 0;left: -320px;width: 300px;height: 100vh;
        background: #fff;z-index: 1000;overflow-y: auto;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);padding: 0;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-mobile-header {
        display: flex;
    }

    /* Add internal padding to drawer elements */
    .sidebar .category-tab-container,
    .sidebar .filter-section {
        padding: 15px 20px;margin-bottom: 0;border-bottom: 1px solid #eaeaea;
    }

    .main-content {
        width: 100%;
    }

    /* Grid layout adjustments on mobile */
    .grid-container:not(.list-view) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 15px;
    }

    .grid-container:not(.list-view) .image-container {
        height: 180px !important;
    }

    /* Toolbar adjustments on mobile */
    .grid-toolbar {
        flex-direction: column;align-items: flex-start;gap: 12px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;justify-content: space-between;flex-wrap: wrap;
    }

    .mobile-filter-btn {
        display: flex;
    }

    #view-grid-4 {
        display: none;
    }

    /* List View adjustments on mobile */
    .grid-container.list-view .product-card {
        flex-direction: column;align-items: stretch;gap: 12px;
        padding-bottom: 15px;
    }

    .grid-container.list-view .image-container {
        width: 100%;aspect-ratio: 1 / 1;
    }
}

@media (max-width: 480px) {
    .grid-container:not(.list-view) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
    }

    .grid-container:not(.list-view) .image-container {
        height: 150px !important;
    }

    .main-wrapper {
        padding-left: 10px;padding-right: 10px;margin-top: 15px;
    }

    .product-title {
        font-size: 9.5pt;
    }

    .product-price {
        font-size: 9.5pt;
    }

    .original-price {
        font-size: 8.5pt;
    }

    .toolbar-left,
    .toolbar-right {
        gap: 8px;
    }

    .toolbar-select-group {
        margin-left: 0;flex-grow: 1;justify-content: space-between;
    }

    .toolbar-select-group select {
        width: 100%;max-width: 140px;}
}