[dir="rtl"] .top>form {
    margin-right: 8px !important;
    margin-left: 0 !important;
}

* {
    box-sizing: border-box;
}

/* ============================================
   MAIN CONTAINER & ROW LAYOUT
   ============================================ */
/* Apply flex layout only to product list row, not footer rows */
#productList.row {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 1400px;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 20px;
}

/* Ensure footer rows use Bootstrap grid layout - override any global row styles */
.site-footer .row,
footer .row,
.site-footer__top .row,
.site-footer__bottom .row,
.site-footer .container .row {
    display: block !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    padding: 0 !important;
    max-width: none !important;
    gap: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: normal !important;
    align-items: normal !important;
    flex-wrap: normal !important;
}

/* Mobile footer: Allow flex layout for proper stacking */
@media (max-width: 767.98px) {

    .site-footer .row,
    .site-footer__top .row,
    .site-footer__links-grid .row,
    .site-footer__bottom .row {
        display: flex !important;
        flex-direction: column !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        gap: 0 !important;
    }

    .site-footer .col-lg-4,
    .site-footer .col-lg-8,
    .site-footer .col-sm-4,
    .site-footer .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Ensure footer rows have proper Bootstrap 3 clearfix */
.site-footer .row::before,
.site-footer .row::after,
footer .row::before,
footer .row::after {
    content: " " !important;
    display: table !important;
}

.site-footer .row::after,
footer .row::after {
    clear: both !important;
}

#productList {
    display: flex !important;
    flex-wrap: wrap;
    visibility: visible !important;
    opacity: 1 !important;
}

ul {
    margin-bottom: 0;
}

/* ============================================
   PRODUCT CARD - DESKTOP (3 COLUMNS)
   ============================================ */
.card {
    flex: 0 0 calc(48% - 24px);
    max-width: calc(48% - 24px);
    min-width: 0;
    padding: 0;
    box-shadow: none;
    margin: 0;
    text-align: start;
    font-family: "Montserrat", sans-serif;
    transition: none;
    background: transparent;
    border: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 40px;
}

.card:hover {
    transform: none;
}

.card:hover .card-img-top img {
    opacity: 0.9;
}

/* ============================================
   CARD IMAGE
   ============================================ */
.card-img-top {
    width: 100%;
    padding-top: 130%;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 15px;
}

.card-img-top img,
.card a img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* ============================================
   CARD BODY
   ============================================ */
.card-body {
    color: #000000;
    font-size: 14px;
    font-weight: 300;
    padding: 10px 0 0 0;
}

.card-title {
    font-size: 14px;
    font-weight: 300;
    color: #000000;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.brand {
    font-size: 11px;
    color: #000000;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 400;
    display: block;
    margin-bottom: 5px;
}

.brand span {
    font-size: 11px;
    color: #000000;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
}

.price {
    color: #000000;
    font-size: 16px;
    font-weight: 400;
    margin: 5px 0 0 0;
    text-transform: uppercase;
}

.price strike {
    color: #999999;
    font-weight: 300;
    margin-right: 8px;
}

.discount {
    color: #000000;
    font-size: 16px;
    font-weight: 400;
}

.discount-percentage {
    font-size: 12px;
    color: #000000;
    font-weight: 400;
    margin-left: 8px;
}

.card a {
    text-decoration: none;
}

/* ============================================
   BUTTONS & CONTROLS
   ============================================ */
.btn-primary {
    outline: 0;
    padding: 12px 0;
    color: #000000;
    background-color: #ffffff;
    text-align: center;
    cursor: pointer;
    width: 100%;
    font-size: 12px;
    border-radius: 0;
    border: 1px solid #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #000000;
    color: #ffffff;
    text-decoration-line: none;
}

.card button:hover {
    opacity: 0.7;
}

/* ============================================
   HEADINGS
   ============================================ */
h1 {
    text-align: center;
    color: #000000;
    margin: 60px 0 40px 0;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: "Montserrat", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-align: center;
}

/* ============================================
   FILTER & SEARCH CONTROLS
   ============================================ */
#filterButton {
    float: none !important;
    padding: 10px 20px !important;
    background-color: #ffffff !important;
    margin: 0 !important;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 0.55em !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: #000000 !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    flex: 0 0 auto;
    display: inline-block;
}

#filterButton:hover {
    background-color: #000000;
    color: #ffffff;
}

#searchBar {
    padding: 10px !important;
    padding-right: 35px !important;
    border: 1px solid #cccccc !important;
    border-radius: 0px !important;
    font-size: 0.55em !important;
    width: 170px !important;
    font-family: "Montserrat", sans-serif !important;
    font-weight: 400 !important;
    color: #000000 !important;
    background-color: #ffffff !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    margin-right: 5px !important;
}

[dir="rtl"] #searchBar {
    margin-right: 0 !important;
    margin-left: 5px !important;
    padding-right: 10px !important;
    padding-left: 35px !important;
    text-align: right;
}


#searchBar:focus {
    border-color: #000000;
    box-shadow: none;
}

#searchBar::placeholder {
    color: #999999;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 400;
}

.search-button {
    padding: 10px 10px;
    border: none;
    border-radius: 0px;
    background-color: #000000;
    color: #ffffff;
    cursor: pointer;
    font-family: "Montserrat", sans-serif;
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    outline: none;
}

.search-button:hover {
    background-color: #393939;
    color: #ffffff;
}

.search-button i {
    font-size: 9px;
}

/* Search Input Wrapper - for positioning clear button */
.search-input-wrapper {
    position: relative;
    display: inline-block;
}

/* Search Clear Button */
.search-clear-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999999;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 12px;
    line-height: 1;
    transition: all 0.3s ease;
    outline: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.search-clear-button:hover {
    background-color: #f5f5f5;
    color: #000000;
}

.search-clear-button:active {
    background-color: #e5e5e5;
    color: #000000;
}

.search-clear-button i {
    font-size: 12px;
    line-height: 1;
}

/* RTL support for clear button */
[dir="rtl"] .search-clear-button {
    right: auto;
    left: 8px;
}

.sort-dropdown {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    overflow: visible;
}

.sort-button {
    padding: 10px 15px;
    border: 1px solid #000000;
    border-radius: 0;
    font-size: 0.55em;
    cursor: pointer;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000000;
    background-color: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.sort-button:hover {
    background-color: #000000;
    color: #ffffff;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    white-space: nowrap;
}

/* RTL support for dropdown content */
[dir="rtl"] .dropdown-content {
    left: auto !important;
    right: 0 !important;
    text-align: right;
    direction: rtl;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
}

/* RTL text alignment for dropdown links */
[dir="rtl"] .dropdown-content a {
    text-align: right;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.show {
    display: block;
}

/* ============================================
   TOP BAR (FIXED)
   ============================================ */
.top {
    position: fixed;
    top: 110px;
    /* Position below header */
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 24px;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 0px solid #e5e5e5;
    overflow: visible;
}

.top.hovered {
    z-index: 998;
}

.top>form {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

[dir="rtl"] .top {
    flex-direction: row;
    justify-content: flex-end;
}

[dir="rtl"] .top>#filterButton {
    margin: 0 !important;
}

[dir="rtl"] .sort-dropdown {
    margin: 0 !important;
}

[dir="rtl"] .sort-dropdown .sort-button {
    text-align: center;
}

[dir="rtl"] .top>form {
    flex-direction: row-reverse;
    gap: 8px;
}

.content {
    padding-top: 164px;
    /* Positioned below top bar */
}

.gender {
    text-align: center;
    margin-top: 220px;
    /* Proper spacing from top bar */
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
}

h2.gender {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 1.95rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed !important;
    top: 13% !important;
    left: 0 !important;
    right: auto !important;
    bottom: 1% !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    background-color: #ffffff !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1) !important;
    overflow-y: auto !important;
    display: none;
    float: none !important;
    padding: 40px 40px !important;
    z-index: 999 !important;
    font-family: "Montserrat", sans-serif !important;
    transform: none !important;
    /* Reset transform for desktop */
    transition: none !important;
    /* Reset transition for desktop */
}

[dir="rtl"] .sidebar {
    left: auto !important;
    right: 0 !important;
}

/* Desktop sidebar when visible */
@media (min-width: 576px) {
    .sidebar {
        transform: none !important;
        transition: none !important;
    }

    .sidebar.mobile-open {
        transform: none !important;
    }

    /* Hide backdrop on desktop - not needed */
    .sidebar-backdrop {
        display: none !important;
    }

    .sidebar-backdrop.active {
        display: none !important;
    }

    /* Desktop doesn't need body scroll lock */
    body.sidebar-open {
        overflow: auto !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
    }
}

.sidebar h3 {
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #000000 !important;
    margin: 0 0 30px 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #e5e5e5 !important;
    text-align: start !important;
}

.sidebar-close-cta {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #000000;
    background-color: transparent;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.sidebar-close-cta i {
    font-size: 12px;
}

.sidebar-close-cta:hover {
    background-color: #000000;
    color: #ffffff;
}

#closeButton {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: #000000 !important;
    padding: 5px !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

[dir="rtl"] #closeButton {
    left: auto !important;
    right: 20px !important;
}

#closeButton:hover {
    color: #666666;
    transform: rotate(90deg);
}

#closeButton i {
    font-size: 18px;
}

/* Filter Form Styling */
.sidebar {
    display: none;
    flex-direction: column;
}

.sidebar form {
    margin-top: 0;
}

.sidebar .filter-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.sidebar .filter-scroll {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar .filter-group {
    display: contents;
    flex-direction: column;
    gap: 12px;
    padding: 20px 50px;
}

.sidebar .filter-group__title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #000000;
    margin: 0;
    font-family: "Montserrat", sans-serif;
}

.sidebar .filter-group__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar .filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #000000;
    font-family: "Montserrat", sans-serif;
    text-transform: none;
    margin: 0;
}

.sidebar .filter-option__label {
    flex: 1;
    line-height: 1.5;
}

.sidebar .filter-option__label-text {
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar .filter-option__count {
    color: #666666;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.sidebar .filter-option__swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #d9d9d9;
    flex-shrink: 0;
}

/* Size Filter Box Styles */
.sidebar .filter-group__options--size {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar .filter-option--box {
    width: auto;
    min-width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    position: relative;
    background: #fff;
    padding: 0 5px;
}

.sidebar .filter-option--box input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.sidebar .filter-option--box .filter-option__box-label {
    font-size: 12px;
    color: #000;
    font-weight: 500;
    z-index: 1;
    text-transform: uppercase;
}

/* Checked state for size boxes */
.sidebar .filter-option--box:has(input:checked),
.sidebar .filter-option--box.checked {
    border-color: #000;
    background-color: #000;
}

.sidebar .filter-option--box:has(input:checked) .filter-option__box-label,
.sidebar .filter-option--box.checked .filter-option__box-label {
    color: #fff;
}

.sidebar .filter-option--box:hover {
    border-color: #000;
}

/* Price Range Styles */
.price-slider-wrapper {
    position: relative;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
    height: 35px;
    /* Enough height for thumbs */
}

.slider-track {
    width: 100%;
    height: 4px;
    background-color: #dadae5;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px;
}

.price-slider-wrapper input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    outline: none;
    position: absolute;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    pointer-events: none;
    z-index: 2;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 20px;
    height: 20px;
    -webkit-appearance: none;
    background-color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    border: 1.5px solid #000000;
    margin-top: 0;
    /* Centered by parent transform */
    position: relative;
    z-index: 3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.price-slider-wrapper input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 20px;
    height: 20px;
    -webkit-appearance: none;
    background-color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    border: 1.5px solid #000000;
    position: relative;
    z-index: 3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-slider-wrapper input[type="range"]::-ms-thumb {
    appearance: none;
    height: 18px;
    width: 18px;
    cursor: pointer;
    border-radius: 50%;
    background-color: #ffffff;
    pointer-events: auto;
    border: 1px solid #000000;
}

.price-slider-wrapper input[type="range"]:active::-webkit-slider-thumb {
    background-color: #000000;
}

.filter-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    width: 45%;
}

.price-input-group span {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-family: "Montserrat", sans-serif;
}

.filter-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
    /* Remove arrows in Firefox */
}

.filter-input::-webkit-outer-spin-button,
.filter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-input:focus {
    border-color: #000;
}

.filter-range__divider {
    color: #999;
}

.sidebar input[type="checkbox"] {
    margin: 0;
}

.sidebar input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    border: 1px solid #000000 !important;
    border-radius: 50% !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #ffffff !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.sidebar input[type="checkbox"]:checked {
    background-color: #000000 !important;
    border-color: #000000 !important;
}

.sidebar input[type="checkbox"]:checked::after {
    content: "✓" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.sidebar input[type="number"] {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #000000 !important;
    border-radius: 2px !important;
    font-size: 12px !important;
    font-family: "Montserrat", sans-serif !important;
    color: #000000 !important;
    background-color: #ffffff !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.sidebar input[type="number"]+.filter-range__divider {
    align-self: center;
}

.sidebar input[type="number"]:focus {
    border-color: #000000;
    box-shadow: none;
}

.sidebar input[type="number"]::placeholder {
    color: #999999;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.filter-range {
    display: flex;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}

.filter-range__divider {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
}

.sidebar input[type="submit"] {
    width: 100% !important;
    padding: 12px 0 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    font-family: "Montserrat", sans-serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 0 !important;
    outline: none !important;
}

.sidebar input[type="submit"]:hover {
    background-color: #ffffff;
    color: #000000;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.filter-actions .clear_filter {
    width: 100% !important;
    font-size: 11px !important;
    padding: 10px 0 !important;
    background-color: transparent !important;
    color: #000000 !important;
    text-decoration: none !important;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    font-family: "Montserrat", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    display: block !important;
    text-align: center !important;
    outline: none !important;
}

.filter-actions .clear_filter:hover {
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
}

/* Color swatches styling */
.sidebar span[style*="background-color"] {
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Count styling in parentheses */
.sidebar br+span,
.sidebar input[type="checkbox"]+span {
    font-size: 11px;
    color: #666666;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #000;
    border: 1px solid #ddd;
    transition: background-color 0.3s ease;
}

.pagination a.active {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* ============================================
   RESPONSIVE DESIGN - LAPTOP/DESKTOP
   ============================================ */
@media (min-width: 1200px) {
    .top {
        top: 98px;
        /* Reverted to tighter desktop position */
        padding: 12px 40px;
        gap: 16px;
    }

    #productList.row {
        max-width: 1400px;
        padding: 2rem 2rem;
        gap: 30px;
    }

    .card {
        flex: 0 0 calc(32.333% - 20px);
        max-width: calc(32.333% - 20px);
    }

    .gender {
        margin-top: 50px;
        /* Reverted to tighter spacing */
    }

    .content {
        padding-top: 164px;
        /* Reverted to tighter spacing */
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .top {
        top: 98px;
        /* Reverted to tighter position */
        padding: 12px 32px;
        gap: 14px;
    }

    #productList.row {
        max-width: 1200px;
        padding: 2rem 1.5rem;
        gap: 25px;
    }

    .card {
        flex: 0 0 calc(30.333% - 20px);
        max-width: calc(30.333% - 20px);
    }

    .gender {
        margin-top: 50px;
        /* Reverted to tighter spacing */
    }

    .content {
        padding-top: 164px;
        /* Reverted to tighter spacing */
    }
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .content {
        padding-top: 140px;
    }

    #productList.row {
        padding: 2.25rem clamp(1.25rem, 4vw, 2.5rem);
        gap: 24px;
        max-width: 100%;
        justify-content: center;
    }

    .card {
        flex: 0 0 calc(50% - 16px);
        max-width: min(340px, calc(50% - 16px));
        margin-inline: auto;
    }

    .card-img-top {
        padding-top: 125%;
        margin-bottom: 14px;
    }

    .card-title {
        font-size: 14px;
        line-height: 1.35;
        min-height: 44px;
    }

    .price,
    .discount {
        font-size: 16px;
    }

    .brand {
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .top {
        top: 98px;
        /* Targeted Tablet fix (Clears Row 1 + Row 2) */
        padding: 12px 32px;
        gap: 14px;
    }

    .gender {
        margin-top: 50px;
        /* Optimized for Tablet fix */
        font-size: 24px;
        letter-spacing: 6px;
    }

    .content {
        padding-top: 204px;
        /* Optimized for Tablet fix */
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        width: min(380px, 82vw) !important;
        height: 100vh !important;
        margin-left: 0 !important;
        padding: 150px 32px 32px !important;
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.12) !important;
        transform: translateX(-110%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background: #ffffff !important;
        z-index: 10010 !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        display: flex !important;
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%) !important;
    }

    [dir="rtl"] .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    [dir="rtl"] .sidebar {
        left: auto !important;
        right: 0 !important;
        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.12) !important;
        transform: translateX(110%) !important;
    }

    [dir="rtl"] .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    .sidebar-close-cta {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 20px;
    }

    .sidebar h3 {
        font-size: 13px !important;
        margin-bottom: 22px !important;
    }

    .sidebar label {
        font-size: 10px !important;
        margin-top: 18px !important;
        margin-bottom: 12px !important;
    }

    .sidebar input[type="submit"],
    .clear_filter {
        margin-top: 22px !important;
    }

    #closeButton {
        position: fixed !important;
        top: 32px !important;
        left: 32px !important;
        width: 44px !important;
        height: 44px !important;
        background: #000000 !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
        transform: none !important;
    }

    [dir="rtl"] #closeButton {
        left: auto !important;
        right: 32px !important;
    }

    #closeButton i {
        font-size: 18px !important;
    }

    #closeButton:hover {
        opacity: 0.85 !important;
    }

    .sidebar-backdrop {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.45) !important;
        z-index: 10005 !important;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-backdrop.active {
        display: block !important;
        opacity: 1;
    }

    body.sidebar-open {
        overflow: hidden !important;
    }

    .pagination {
        margin-top: 48px;
        margin-bottom: 48px;
        gap: 6px;
    }

    .pagination a {
        padding: 10px 20px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE LARGE
   ============================================ */
@media (min-width: 576px) and (max-width: 767px) {
    #productList.row {
        padding: 1.5rem 4rem;
        gap: 5px;
        max-width: 100%;
    }

    .card {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    .card-img-top {
        padding-top: 130%;
    }

    .card-title {
        font-size: 12px;
    }

    .price,
    .discount {
        font-size: 14px;
    }

    .brand {
        font-size: 10px;
    }

    /* Mobile Large: Filter and Sort in same row - Compact */
    .top {
        top: 98px;
        /* Reverted to tighter mobile position */
        gap: 4px !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        padding: 12px 32px;
        box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
        display: flex !important;
    }

    .top>.sort-dropdown {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        margin-right: 5px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .top>#filterButton {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }

    .sort-dropdown {
        width: auto !important;
    }

    .sort-button {
        font-size: 9px !important;
        padding: 6px 12px !important;
        width: auto !important;
        min-width: auto !important;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    #filterButton {
        font-size: 9px !important;
        padding: 6px 12px !important;
        width: auto !important;
        min-width: auto !important;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    .top>.sort-dropdown {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .top>form {
        flex: 1 1 auto !important;
        order: 1 !important;
        margin: 0 !important;
        margin-left: 5px !important;
        width: auto !important;
        flex-wrap: nowrap;
        display: flex !important;
        gap: 5px;
        min-width: 0;
        justify-content: flex-end;
    }

    .gender {
        margin-top: 50px;
        /* Reverted to tighter spacing */
        font-size: 18px;
    }

    .content {
        padding-top: 164px;
        /* Reverted to tighter spacing */
    }

    .sort-dropdown {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: auto !important;
    }

    .sort-button {
        font-size: 9px !important;
        padding: 6px 12px !important;
        width: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    #filterButton {
        font-size: 9px !important;
        padding: 6px 12px !important;
        margin-right: 0;
        width: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    .top>.sort-dropdown {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    #searchBar {
        font-size: 9px !important;
        width: 120px !important;
        max-width: 120px !important;
        padding: 7px 10px !important;
        padding-right: 30px !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    [dir="rtl"] #searchBar {
        padding-right: 10px !important;
        padding-left: 30px !important;
    }

    .search-input-wrapper {
        position: relative;
        display: inline-block;
    }

    .search-clear-button {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: #999999;
        cursor: pointer;
        padding: 3px 5px;
        font-size: 10px;
        line-height: 1;
        transition: all 0.3s ease;
        outline: none;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
    }

    [dir="rtl"] .search-clear-button {
        right: auto;
        left: 6px;
    }

    .search-clear-button:hover {
        background-color: #f5f5f5;
        color: #000000;
    }

    .search-clear-button i {
        font-size: 10px;
    }

    .search-button {
        font-size: 9px !important;
        padding: 6px 10px !important;
        min-width: 32px;
        border: 1px solid #000000;
        border-radius: 0;
        background-color: #ffffff;
        color: #000000;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .search-button:hover {
        background-color: #000000;
        color: #ffffff;
    }

    /* Mobile Sidebar - Full Width Overlay */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        /* Dynamic viewport height for mobile */
        z-index: 10001 !important;
        /* Above navbar sidebar but below navbar menu button */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 60px 20px 20px 20px !important;
        background-color: #ffffff !important;
        box-shadow: none !important;
        -webkit-overflow-scrolling: touch !important;
        /* Smooth scrolling on iOS */
        transform: translateX(-100%) !important;
        /* Start off-screen */
        transition: transform 0.3s ease-in-out !important;
        will-change: transform !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Sidebar when open on mobile */
    .sidebar.mobile-open {
        transform: translateX(0) !important;
        display: flex !important;
    }

    [dir="rtl"] .sidebar {
        left: auto !important;
        right: 0 !important;
        transform: translateX(100%) !important;
    }

    [dir="rtl"] .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    [dir="rtl"] .sidebar {
        left: auto !important;
        right: 0 !important;
        transform: translateX(100%) !important;
    }

    [dir="rtl"] .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    /* Ensure sidebar and all its content are fully interactive */
    .sidebar,
    .sidebar * {
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    }

    .sidebar form,
    .sidebar form *,
    .sidebar input[type="checkbox"],
    .sidebar input[type="number"],
    .sidebar input[type="submit"],
    .sidebar button,
    .sidebar label,
    .sidebar a,
    .sidebar span,
    .sidebar .clear_filter {
        pointer-events: auto !important;
        user-select: auto !important;
        -webkit-user-select: auto !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
    }

    /* Backdrop overlay - created via JavaScript */
    .sidebar-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        /* Dynamic viewport height for mobile */
        background-color: rgba(0, 0, 0, 0.6) !important;
        z-index: 10000 !important;
        /* Below sidebar but above other content */
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease-in-out !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: none !important;
        /* Prevent scrolling when backdrop is active */
        pointer-events: auto !important;
        /* Allow clicks to pass through to document handler */
    }

    .sidebar-backdrop.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        /* Allow clicks - document handler will check target */
    }

    /* CRITICAL: Sidebar must be above backdrop and block pointer events to backdrop */
    .sidebar.mobile-open {
        z-index: 10001 !important;
        /* Above backdrop */
        pointer-events: auto !important;
        position: fixed !important;
        /* Ensure fixed positioning */
    }

    /* Ensure sidebar content is fully interactive */
    .sidebar.mobile-open * {
        pointer-events: auto !important;
    }

    /* Prevent body scroll when sidebar is open on mobile */
    body.sidebar-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Prevent scrolling on iOS when sidebar is open */
    @supports (-webkit-overflow-scrolling: touch) {
        body.sidebar-open {
            position: fixed !important;
            width: 100vw !important;
            height: 100vh !important;
            overflow: hidden !important;
        }
    }

    .sidebar h3 {
        font-size: 14px !important;
        margin-bottom: 25px !important;
        padding-bottom: 15px !important;
        border-bottom: 2px solid #000000 !important;
    }

    .sidebar label {
        font-size: 11px !important;
        margin-top: 20px !important;
        margin-bottom: 15px !important;
    }

    .sidebar input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        margin-right: 12px !important;
    }

    .sidebar input[type="number"] {
        padding: 12px 15px !important;
        font-size: 13px !important;
        margin-bottom: 15px !important;
    }

    .sidebar .filter-actions {
        position: sticky !important;
        bottom: 0 !important;
        background-color: #ffffff !important;
        padding: 15px 0 !important;
        margin-top: auto !important;
        border-top: 1px solid #e5e5e5 !important;
        z-index: 10 !important;
        width: 100% !important;
    }

    .sidebar .filter-scroll {
        padding-bottom: 20px !important;
    }

    .sidebar input[type="submit"],
    .clear_filter {
        font-size: 11px !important;
        padding: 14px 0 !important;
        margin-top: 5px !important;
        /* Reduced margin since container has padding */
    }


    .sidebar-close-cta {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 18px;
    }

    #closeButton {
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        width: 40px !important;
        height: 40px !important;
        z-index: 10002 !important;
        /* Above sidebar */
        background-color: #000000 !important;
        color: #ffffff !important;
        border-radius: 0 !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
        /* Better touch response */
    }

    [dir="rtl"] #closeButton {
        left: auto !important;
        right: 20px !important;
    }

    #closeButton:hover,
    #closeButton:active {
        background-color: #333333 !important;
        color: #ffffff !important;
        transform: scale(1.1) !important;
    }

    #closeButton:active {
        transform: scale(0.95) !important;
    }

    #closeButton i {
        font-size: 18px !important;
        pointer-events: none !important;
    }

    .pagination {
        margin-top: 30px;
        margin-bottom: 30px;
        gap: 3px;
    }

    .pagination a {
        padding: 6px 12px;
        font-size: 12px;
    }
}


/* ============================================
   RESPONSIVE DESIGN - MOBILE MEDIUM (≤ 575px)
   ============================================ */
@media (max-width: 575px) {
    .top {
        top: 96px;
        /* Position below 96px mobile header */
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        padding: 12px 32px;
        box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
    }

    .gender {
        margin-top: 50px;
        /* Adjusted for mobile top bar */
    }

    .content {
        padding-top: 132px;
        /* Adjusted for mobile top bar */
    }

    .top>.sort-dropdown,
    .top>#filterButton {
        flex: 0 0 auto !important;
        min-width: 0;
    }

    .top>form {
        flex: 1 1 auto !important;
        min-width: 0;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
    }

    #searchBar {
        flex: 1 1 auto;
        min-width: 0;
        width: 140px !important;
        max-width: 140px !important;
        padding: 7px !important;
    }

    .sort-button,
    #filterButton {
        font-size: 9px !important;
        padding: 6px 10px !important;
        white-space: nowrap;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    .top>.sort-dropdown {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .search-button {
        font-size: 9px !important;
        padding: 6px 10px !important;
    }

    /* RTL support for dropdown on mobile medium */
    [dir="rtl"] .dropdown-content {
        left: auto !important;
        right: 0 !important;
        direction: rtl !important;
        text-align: right !important;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE SMALL
   ============================================ */
@media (max-width: 400px) {
    #productList.row {
        padding: 1rem 3.5rem;
        gap: 5px;
    }

    .card {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }

    .card-title {
        font-size: 10px;
    }

    .price,
    .discount {
        font-size: 12px;
    }

    .brand {
        font-size: 8px;
    }

    .brand span {
        font-size: 8px;
    }

    /* Mobile Small: Filter and Sort in same row - Compact */
    .top {
        top: 96px;
        /* Position below 96px mobile header */
        gap: 0px !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        padding: 12px 12px;
        box-shadow: 0 0px 0px rgba(0, 0, 0, 0.05);
        display: flex !important;
    }

    .gender {
        margin-top: 50px;
        /* Adjusted for small mobile top bar */
    }

    .content {
        padding-top: 100px;
        /* Adjusted for small mobile top bar */
    }

    .top>.sort-dropdown {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        margin-right: 4px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .top>#filterButton {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        margin: 5px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }

    .sort-dropdown {
        width: auto !important;
    }

    .sort-button {
        font-size: 8px !important;
        padding: 5px 10px !important;
        width: auto !important;
        min-width: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    #filterButton {
        font-size: 8px !important;
        padding: 5px 10px !important;
        width: auto !important;
        min-width: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    .top>.sort-dropdown {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .top>form {
        flex: 1 1 auto !important;
        order: 1 !important;
        margin: 0 !important;
        margin-left: 4px !important;
        width: auto !important;
        gap: 4px;
        flex-wrap: nowrap;
        display: flex !important;
        min-width: 0;
        justify-content: flex-end;
    }

    #searchBar {
        width: 110px !important;
        max-width: 110px !important;
        font-size: 8px !important;
        padding: 7px 8px !important;
        padding-right: 28px !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    [dir="rtl"] #searchBar {
        padding-right: 8px !important;
        padding-left: 28px !important;
    }

    .search-clear-button {
        right: 5px;
        width: 16px;
        height: 16px;
        padding: 2px 4px;
    }

    [dir="rtl"] .search-clear-button {
        left: 5px;
    }

    .search-clear-button i {
        font-size: 9px;
    }

    .search-button {
        font-size: 8px !important;
        padding: 7px 7px !important;
        min-width: 28px;
        border: 1px solid #000000;
        border-radius: 2px;
        background-color: #ffffff;
        color: #000000;
        cursor: pointer;
        transition: all 0.3s ease;
        flex: 0 0 auto;
    }

    .search-button:hover {
        background-color: #000000;
        color: #ffffff;
    }

    h2.gender {
        margin-top: 30px;
        font-size: 1.25rem;
    }

    /* RTL support for dropdown on mobile small */
    [dir="rtl"] .dropdown-content {
        left: auto !important;
        right: 0 !important;
        direction: rtl !important;
        text-align: right !important;
    }

    /* Mobile Small Sidebar - Same as mobile */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        padding: 55px 25px 15px 25px !important;
        background-color: #ffffff !important;
        box-shadow: none !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .sidebar.mobile-open {
        display: flex !important;
    }

    .sidebar h3 {
        font-size: 13px !important;
        margin-bottom: 20px !important;
        padding-bottom: 12px !important;
    }

    .sidebar label {
        font-size: 10px !important;
        margin-top: 18px !important;
        margin-bottom: 12px !important;
    }

    .sidebar input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        margin-right: 10px !important;
    }

    .sidebar input[type="number"] {
        padding: 10px 12px !important;
        font-size: 12px !important;
    }

    .sidebar input[type="submit"],
    .clear_filter {
        font-size: 10px !important;
        padding: 12px 0 !important;
    }

    .sidebar-close-cta {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 16px;
    }

    #closeButton {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        width: 32px !important;
        height: 32px !important;
        z-index: 1001 !important;
        background-color: #000000 !important;
        color: #ffffff !important;
    }

    #closeButton i {
        font-size: 16px !important;
    }

    .pagination a {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE EXTRA SMALL (< 320px)
   ============================================ */
@media (max-width: 319px) {
    #productList.row {
        padding: 0.75rem 3.4rem;
        gap: 4px;
    }

    .card {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
    }

    .card-img-top {
        padding-top: 130%;
        margin-bottom: 8px;
    }

    .card-body {
        padding: 4px 0 0 0;
    }

    .card-title {
        font-size: 9px;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .price,
    .discount {
        font-size: 11px;
    }

    .discount-percentage {
        font-size: 9px;
    }

    .brand {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .brand span {
        font-size: 8px;
    }

    /* Top Bar - Ultra Compact */
    .top {
        top: 94px;
        /* Position below mobile header (extra small screens) */
        padding: 10px 12px;
        gap: 0 !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: flex-end;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        display: flex !important;
    }

    .gender {
        margin-top: 30px;
        /* Adjusted for extra small mobile top bar */
        font-size: 16px;
    }

    .content {
        padding-top: 95px;
        /* Adjusted for extra small mobile top bar */
    }

    .top>.sort-dropdown {
        margin-right: 3px !important;
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .top>#filterButton {
        display: inline-block !important;
        vertical-align: middle !important;
    }

    .sort-button {
        font-size: 7px !important;
        padding: 4px 8px !important;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    #filterButton {
        font-size: 7px !important;
        padding: 4px 8px !important;
        height: auto !important;
        line-height: 1.5 !important;
        vertical-align: middle !important;
        display: inline-block !important;
        box-sizing: border-box !important;
        border-width: 1px !important;
    }

    .top>.sort-dropdown {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
    }

    .top>form {
        margin-left: 3px !important;
        gap: 3px;
        flex: 1 1 auto !important;
        min-width: 0;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    #searchBar {
        width: 90px !important;
        max-width: 90px !important;
        font-size: 7px !important;
        padding: 4px 8px !important;
        padding-right: 26px !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    [dir="rtl"] #searchBar {
        padding-right: 8px !important;
        padding-left: 26px !important;
    }

    .search-clear-button {
        right: 4px;
        width: 14px;
        height: 14px;
        padding: 2px 3px;
    }

    [dir="rtl"] .search-clear-button {
        left: 4px;
    }

    .search-clear-button i {
        font-size: 8px;
    }

    .search-button {
        font-size: 7px !important;
        padding: 4px 8px !important;
        min-width: 26px;
        flex: 0 0 auto;
    }

    /* RTL support for dropdown on mobile extra small */
    [dir="rtl"] .dropdown-content {
        left: auto !important;
        right: 0 !important;
        direction: rtl !important;
        text-align: right !important;
    }

    /* Sidebar - Full Width */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        height: 100vh !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        padding: 50px 12px 12px 12px !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .sidebar.mobile-open {
        display: flex !important;
    }

    .sidebar h3 {
        font-size: 12px !important;
        margin-bottom: 18px !important;
        padding-bottom: 10px !important;
    }

    .sidebar label {
        font-size: 9px !important;
        margin-top: 15px !important;
        margin-bottom: 10px !important;
    }

    .sidebar input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        margin-right: 8px !important;
    }

    .sidebar input[type="number"] {
        padding: 10px 10px !important;
        font-size: 11px !important;
        margin-bottom: 12px !important;
    }

    .sidebar input[type="submit"],
    .clear_filter {
        font-size: 9px !important;
        padding: 10px 0 !important;
        margin-top: 20px !important;
    }

    .sidebar-close-cta {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 12px;
    }

    #closeButton {
        position: fixed !important;
        top: 12px !important;
        right: 12px !important;
        width: 30px !important;
        height: 30px !important;
        z-index: 1001 !important;
    }

    #closeButton i {
        font-size: 14px !important;
    }

    .pagination {
        margin-top: 25px;
        margin-bottom: 25px;
        gap: 2px;
    }

    .pagination a {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* Sticky Filter Actions for all mobile/tablet views */
@media (max-width: 991px) {
    .sidebar .filter-actions {
        position: relative !important;
        background-color: #ffffff !important;
        padding: 20px 20px calc(25px + env(safe-area-inset-bottom)) !important;
        margin-top: auto !important;
        border-top: 1px solid #000000 !important;
        box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05) !important;
        z-index: 1000 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        left: 0 !important;
        flex-shrink: 0 !important;
    }

    .sidebar .filter-scroll {
        flex: 1 !important;
        overflow-y: auto !important;
        padding-bottom: 20px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .sidebar .filter-form {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        flex: 1 !important;
    }
}