
/* =========================================================
   B2B WHOLESALE PAGE STYLES & TARGET LAYOUT
   ========================================================= */

/* =========================================================
   B2B HERO BANNER - EXACT DESIRED LAYOUT & RESPONSIVE SCALING
   ========================================================= */

.b2b-hero-section {
    position: relative;
    width: 100%;
    margin-top: 0;
    margin-bottom: 2.5rem;
    padding: 0;
}

.b2b-banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.b2b-banner-slider .b2b-hero-banner {
    display: none;
    width: 100%;
    aspect-ratio: 1280 / 511; /* Locks exact banner proportions from your design */
    min-height: 220px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    padding: 0 4%;
    align-items: center;
    justify-content: flex-start;
    animation: fadeIn 0.4s ease-in-out;
}

.b2b-banner-slider .b2b-hero-banner.active {
    display: flex;
}

/* Text and Button Block aligned to the left, internally centered */
.b2b-hero-text {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers button under text block */
    text-align: center;
    width: 35%;          /* Takes up left portion of the banner */
    max-width: 400px;
    margin-left: 4%;     /* Indent from left edge */
}

/* Stacks "Wholesale" and "B2B" cleanly */
.b2b-hero-text h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(1.2rem, 3.4vw, 3.4rem); /* Fluid scaling for all screen sizes */
    font-weight: 900;
    color: var(--white);
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.35);
    margin-bottom: 1rem;
    width: 100%;
}

.b2b-order-btn {
    background-color: var(--blue-900, #1e3a8a);
    color: var(--white);
    border: none;
    border-radius: 9999px;
    padding: clamp(0.35rem, 1.1vw, 0.75rem) clamp(1rem, 2.2vw, 2rem);
    font-size: clamp(0.6rem, 1.2vw, 1rem);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.2s;
    white-space: nowrap;
}

.b2b-order-btn:hover {
    background-color: var(--blue-700, #1d4ed8);
    transform: translateY(-2px);
}

/* Indicator Dots */
.b2b-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    width: 100%;
}

.b2b-dot {
    width: 10px;
    height: 10px;
    background-color: var(--gray-300);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease;
}

.b2b-dot.active {
    background-color: var(--blue-900);
    width: 26px;
    border-radius: 5px;
}

@keyframes fadeIn {
    from { opacity: 0.4; }
    to { opacity: 1; }
}




/* =========================================================
   FILTER BAR STYLES (Matching Reference Image)
   ========================================================= */
/* .b2b-filters-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.filter-group {
    position: relative; 
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue-900, #1e3a8a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-dropdown-wrapper {
    position: relative;
    width: 100%;
    background-color: var(--white);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 9999px; 
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.04);
    display: flex;
    align-items: center;
}

.filter-select {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-900, #1e3a8a);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2rem;
}

.filter-dropdown-wrapper i {
    position: absolute;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    pointer-events: none;
} */

/* =========================================================
   CUSTOM FILTER DROPDOWNS (Anchored Directly Below)
   ========================================================= */
/* .custom-filter-dropdown {
    position: relative;
}

.filter-dropdown-wrapper {
    position: relative;
    width: 100%;
    background-color: var(--white);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 9999px;
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-dropdown-wrapper span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-900, #1e3a8a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-dropdown-wrapper i {
    font-size: 0.75rem;
    color: var(--gray-500);
    transition: transform 0.2s ease;
} */

/* Custom Dropdown Menu Popup */
/* .custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px; 
    white-space: nowrap; 
    background-color: var(--white);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
    z-index: 1000;
    padding: 0.5rem 0;
    overflow: hidden;
}

.custom-dropdown-menu.show {
    display: block;
}

.filter-option {
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-800);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-option:hover {
    background-color: var(--blue-50, #eff6ff);
    color: var(--blue-600, #2563eb);
} */



/* =========================================================
   PRODUCTS GRID & CARDS
   ========================================================= */
/* .b2b-products-section {
    margin-bottom: 4rem;
}

.b2b-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue-900);
    margin-bottom: 1.5rem;
}

.b2b-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.b2b-card {
    background-color: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    border: 2px solid #bfdbfe;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.b2b-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
}

.b2b-card-img {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.b2b-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.b2b-product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--blue-900);
    line-height: 1.3;
    min-height: 2.6rem;
}

.b2b-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gray-800);
}

.b2b-rating {
    font-size: 0.8rem;
    color: var(--yellow-400);
    margin-bottom: 0.5rem;
}

.b2b-card .btn-add {
    background-color: var(--blue-900);
    color: var(--white);
    padding: 0.6rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    width: 100%;
    margin-top: 0.5rem;
}

.b2b-card-link-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.b2b-card .btn-add:hover {
    background-color: var(--blue-700);
} */




/* =========================================================
   B2B FILTER BAR & PRODUCT GRID
   ========================================================= */
.b2b-filters-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.filter-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue-950, #172554);
}

.filter-dropdown-wrapper {
    position: relative;
    width: 100%;
    background-color: var(--white);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 9999px;
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-dropdown-wrapper span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-900, #1e3a8a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-dropdown-wrapper i {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 220px;
    background-color: var(--white);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
    z-index: 1000;
    padding: 0.5rem 0;
}

.custom-dropdown-menu.show {
    display: block;
}

.filter-option {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-800);
    cursor: pointer;
}

.filter-option:hover {
    background-color: var(--blue-50, #eff6ff);
    color: var(--blue-600, #2563eb);
}


/* =========================================================
   UNIFIED PRODUCT CARD GRID ALIGNMENT
   ========================================================= */
/* .b2b-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.b2b-card {
    background-color: var(--white);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--blue-200);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.b2b-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.12);
}

.b2b-card-img {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.b2b-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.b2b-product-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue-900);
    line-height: 1.3;
    min-height: 2.6rem;
}

.b2b-price {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-top: 1rem;
}

.b2b-rating {
    font-size: 0.75rem;
    color: var(--yellow-400);
    margin-bottom: 0.5rem;
}

.b2b-card .btn-add {
    background-color: var(--blue-900);
    color: var(--white);
    padding: 0.6rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.b2b-card-link-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.b2b-card .btn-add:hover {
    background-color: var(--blue-700);
} */



/* =========================================================
   STRICT PRODUCT CARD FLEX & BASELINE ALIGNMENT
   ========================================================= */

/* Grid Container */
.b2b-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    margin-bottom: 3rem;
    width: 100% !important;
    box-sizing: border-box;
}

/* Outer Card Container */
.b2b-card {
    background-color: var(--white, #ffffff) !important;
    border-radius: 1rem !important;
    padding: 1.25rem !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border: 1px solid var(--blue-200, #bfdbfe) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100% !important;
    box-sizing: border-box !important;
}

.b2b-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.12) !important;
}

/* Ensure the full-height clickable link container stretches completely */
.b2b-card-link-wrapper,
.b2b-card > a {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Fixed Image Box */
.b2b-card-img {
    width: 100% !important;
    height: 160px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 1rem !important;
    flex-shrink: 0 !important;
}

.b2b-card-img img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* Card Body flex column */
.b2b-card-body {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    justify-content: space-between !important;
    height: 100% !important;
    margin: 0 !important;
}

/* 1. LOCK TITLE HEIGHT: Holds space for exactly 2 lines so 1-line titles don't collapse */
.b2b-product-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--blue-900, #1e3a8a) !important;
    line-height: 1.3 !important;
    height: 2.6rem !important;
    min-height: 2.6rem !important;
    max-height: 2.6rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 0.5rem !important;
}

/* 2. LOCK PRICE HEIGHT: Holds space for up to 2 lines for longer price texts (e.g. 48 bottles / 4 dozen) */
.b2b-price {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: var(--gray-800, #1f2937) !important;
    line-height: 1.25 !important;
    height: 2.2rem !important;
    min-height: 2.2rem !important;
    max-height: 2.2rem !important;
    display: flex !important;
    /* align-items: flex-end !important; */
    align-items: center !important;
    margin-top: auto !important;
    margin-bottom: 0.25rem !important;
    overflow: hidden !important;
}

/* 3. LOCK RATING HEIGHT */
.b2b-rating {
    font-size: 0.8rem !important;
    color: var(--yellow-400, #facc15) !important;
    height: 1.2rem !important;
    min-height: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
}

/* 4. PIN BUTTON AT EXACT BOTTOM BASELINE */
.b2b-card .btn-add {
    background-color: var(--blue-900, #1e3a8a) !important;
    color: var(--white, #ffffff) !important;
    padding: 0.65rem 0 !important;
    border-radius: 9999px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border: none !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

.b2b-card .btn-add:hover {
    background-color: var(--blue-700, #1d4ed8) !important;
}
/* =========================================================
   B2B SIDEBAR FILTER & CONTENT LAYOUT
   ========================================================= */
.b2b-layout-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}

/* Left Sidebar Box */
.b2b-sidebar-filter {
    width: 260px;
    flex-shrink: 0;
    background-color: var(--white);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.06);
    border: 1px solid var(--blue-200);
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-category-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue-950, #172554);
    margin-bottom: 0.75rem;
}

.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-700);
    cursor: pointer;
    font-weight: 500;
}

.filter-checkbox-label input[type="checkbox"] {
    accent-color: var(--blue-900);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Price Range Inputs */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.range-input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--blue-200);
    border-radius: 6px;
    outline: none;
    text-align: center;
    color: var(--gray-700);
}

.filter-agree-btn {
    width: 100%;
    margin-top: 0.5rem;
    background-color: var(--blue-900);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-agree-btn:hover {
    background-color: var(--blue-700);
}

/* Right Content Area */
.b2b-content-area {
    flex-grow: 1;
    min-width: 0;
}


/* =========================================================
   MOBILE FILTER
========================================================= */

/* Hidden by default on desktop */
.mobile-action-bar {
    display: none;
}


/* =========================================================
   OVERLAY
========================================================= */

.filter-overlay {
    position: fixed;
    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    z-index: 9998;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.filter-overlay.show {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   BOTTOM SHEET
========================================================= */

.filter-bottom-sheet {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;

    background: #ffffff;

    border-radius: 20px 20px 0 0;

    z-index: 9999;

    transform: translateY(100%);

    transition:
        transform 0.3s cubic-bezier(.4, 0, .2, 1);

    display: flex;
    flex-direction: column;

    max-height: 90vh;

    overflow: hidden;
}

.filter-bottom-sheet.show {
    transform: translateY(0);
}


/* =========================================================
   DRAG HANDLE
========================================================= */

.filter-drag-handle {
    width: 38px;
    height: 4px;

    background: #cbd5e1;

    border-radius: 20px;

    margin: 10px auto 4px;
}


/* =========================================================
   HEADER
========================================================= */

.filter-sheet-header {
    height: 58px;

    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #e5e7eb;

    flex-shrink: 0;
}

.filter-sheet-header h2 {
    margin: 0;

    font-size: 18px;
    font-weight: 700;

    color: #172b4d;
}

.filter-close-btn {
    width: 36px;
    height: 36px;

    border: none;
    background: transparent;

    color: #526581;

    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    border-radius: 50%;
}

.filter-close-btn:hover {
    background: #f1f5f9;
}


/* =========================================================
   SCROLL CONTENT
========================================================= */

.filter-sheet-content {
    flex: 1;

    overflow-y: auto;

    padding: 0 20px;

    overscroll-behavior: contain;
}

.filter-sheet-content::-webkit-scrollbar {
    width: 4px;
}

.filter-sheet-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}


/* =========================================================
   FILTER SECTIONS
========================================================= */

.mobile-filter-section {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-filter-section-header {
    width: 100%;

    min-height: 52px;

    border: none;
    background: transparent;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #172b4d;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.mobile-filter-section-header i {
    font-size: 12px;

    color: #64748b;
}

.mobile-filter-section-content {
    display: none;

    padding-bottom: 16px;
}

.mobile-filter-section.active
.mobile-filter-section-content {
    display: block;
}


/* =========================================================
   CHECKBOX OPTIONS
========================================================= */

.mobile-filter-option {
    min-height: 34px;

    display: flex;
    align-items: center;

    gap: 10px;

    font-size: 13px;

    color: #475569;

    cursor: pointer;
}

.mobile-filter-option input {
    width: 17px;
    height: 17px;

    margin: 0;

    flex-shrink: 0;

    accent-color: #287df5;

    cursor: pointer;
}


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

.mobile-price-inputs {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-top: 10px;
}

.mobile-price-inputs > span {
    color: #64748b;
    font-size: 13px;
}

.mobile-range-input {
    width: 100%;
    min-width: 0;

    height: 40px;

    border: 1px solid #d7dee8;

    border-radius: 7px;

    padding: 0 10px;

    font-size: 13px;

    outline: none;
}

.mobile-range-input:focus {
    border-color: #287df5;

    box-shadow:
        0 0 0 2px rgba(40, 125, 245, 0.1);
}


/* Agree */
.mobile-agree-btn {
    width: 100%;

    height: 40px;

    margin-top: 10px;

    border: none;

    border-radius: 7px;

    background: #287df5;

    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


/* =========================================================
   BOTTOM ACTIONS
========================================================= */

.filter-sheet-actions {
    display: flex;

    gap: 10px;

    padding: 12px 20px;

    border-top: 1px solid #e5e7eb;

    background: #ffffff;

    flex-shrink: 0;

    padding-bottom:
        calc(12px + env(safe-area-inset-bottom));
}

.filter-reset-btn,
.filter-apply-btn {
    flex: 1;

    height: 44px;

    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}


/* Reset */
.filter-reset-btn {
    background: #ffffff;

    border: 1px solid #287df5;

    color: #287df5;
}


/* Apply */
.filter-apply-btn {
    background: #287df5;

    border: 1px solid #287df5;

    color: #ffffff;
}

/* Bottom Sheet Structural Fixes */
.filter-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh; /* Prevents overflow off top screen edge */
    background-color: #ffffff;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    z-index: 100000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.filter-bottom-sheet.show {
    transform: translateY(0);
}

.filter-sheet-header {
    padding: 1rem 1.25rem 0.5rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    flex-shrink: 0;
}

/* Scrollable Inner Body Fix */
.filter-sheet-content {
    padding: 0.5rem 1.25rem 1.5rem 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
    flex-grow: 1;
    overscroll-behavior: contain; /* Keeps scrolling contained inside bottom sheet */
}

/* Ensure topmost title is visible and reachable */
.mobile-filter-section:first-child {
    margin-top: 0.5rem;
}

.filter-sheet-actions {
    padding: 1rem 1.25rem 1.5rem 1.25rem;
    background-color: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* =========================================================
   EXACT STACKED SORT DROPDOWN ALIGNMENT
   ========================================================= */
.b2b-sort-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.25rem;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue-900);
}

/* Parent wrapper that controls the fixed width of both boxes */
.sort-dropdown-container {
    position: relative;
    width: 200px; /* Fixed width for both boxes */
}

/* The Main Sort By Box Button */
.sort-dropdown-wrapper {
    background-color: var(--white);
    border: 1px solid var(--blue-200);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.04);
    width: 100%;
}

.sort-dropdown-wrapper i {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* The Dropdown Menu Box - Stacks straight under with identical width */
.sort-dropdown-container .custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px); /* Sits right under the button with a 6px gap */
    left: 0;
    width: 100%;           /* Matches the 200px width of the container */
    background-color: var(--white);
    border: 1px solid var(--blue-200);
    border-radius: 1rem;   /* Smooth rounded corners */
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
    z-index: 1000;
    padding: 0.5rem 0;
}

.sort-dropdown-container .custom-dropdown-menu.show {
    display: block;
}

.sort-dropdown-container .filter-option {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    color: var(--gray-800);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sort-dropdown-container .filter-option:hover {
    background-color: var(--blue-50);
    color: var(--blue-600);
}

/* 4-Column Product Grid */
.b2b-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Adjust to repeat(4, 1fr) if container allows full width */
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}


/* Ensure the sort dropdown container is relative so the menu anchors correctly */
.sort-group {
    position: relative;
}

/* Hidden by default */
.sort-group .custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background-color: var(--white);
    border: 1px solid var(--blue-200);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
    z-index: 1000;
    padding: 0.5rem 0;
}

/* Shown when JS toggles the class */
.sort-group .custom-dropdown-menu.show {
    display: block;
}

.sort-group .filter-option {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-800);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sort-group .filter-option:hover {
    background-color: var(--blue-50);
    color: var(--blue-600);
}


/* =========================================================
   FIXED SORT DROPDOWN STYLING & WIDTH
   ========================================================= */
.b2b-sort-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.25rem;
    position: relative;
}

.sort-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue-900);
}

.sort-dropdown-wrapper {
    background-color: var(--white);
    border: 1px solid var(--blue-200);
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--blue-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.04);
    width: 170px; /* Fixed width so it doesn't resize or stretch */
    flex-shrink: 0;
}

.sort-dropdown-wrapper i {
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Custom Dropdown Menu for Sorting */
.sort-group .custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 170px; /* Matches the fixed wrapper width */
    background-color: var(--white);
    border: 1px solid var(--blue-200);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
    z-index: 1000;
    padding: 0.5rem 0;
}

.sort-group .custom-dropdown-menu.show {
    display: block;
}

.sort-group .filter-option {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-800);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sort-group .filter-option:hover {
    background-color: var(--blue-50);
    color: var(--blue-600);
}



/* =========================================================
   PAGINATION STYLING (Matching Reference Image)
   ========================================================= */
/* =========================================================
   PAGINATION STYLING (Boxed Active, Clean Text Numbers)
   ========================================================= */


/* Fixed Bottom Pagination Bar */
.b2b-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: auto; 
    padding-top: 2rem;
    width: 100%;
}

/* Arrow buttons (Back / Next) */
.b2b-pagination .page-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 1rem;
    background-color: var(--white);
    color: var(--blue-900, #1e3a8a);
    border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.b2b-pagination .page-arrow:hover {
    border-color: var(--blue-500, #3b82f6);
    background-color: var(--blue-50, #eff6ff);
}

.b2b-pagination .page-arrow.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Page number links */
.b2b-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 42px;
    background-color: transparent;
    color: var(--gray-700, #374151);
    border: none;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.b2b-pagination .page-link:hover {
    color: var(--blue-600, #2563eb);
}

/* Active page number highlight box */
.b2b-pagination .page-link.active {
    background-color: var(--blue-900, #1e3a8a);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.b2b-pagination .page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 42px;
    font-weight: 700;
    color: var(--gray-500, #6b7280);
    font-size: 0.9rem;
}


/* Product Grid Section Container */
.b2b-products-section {
    display: flex;
    flex-direction: column;
    min-height: 800px; /* Reserves full space for header + 2 rows of cards + pagination */
    position: relative;
}

/* Force Product Grid to lock in 2 full rows (even with 1 to 4 items on page 2) */
#productGrid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(320px, auto)); /* Forces 2 fixed-height rows at all times */
    gap: 1.5rem;
    align-content: start;
}

/* Fixed Bottom Pagination Bar */
.b2b-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: auto; /* Permanently pins the pagination bar to the absolute bottom of .b2b-products-section */
    padding-top: 2rem;
    padding-bottom: 1rem;
    width: 100%;
}



/* =========================================================
   Alert Message Box
   ========================================================= */

/* Under Construction Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 1rem;
}

.custom-modal-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #bfdbfe;
}

.modal-icon {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 0.75rem;
}

.custom-modal-card h3 {
    font-size: 1.2rem;
    color: #1e3a8a;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.custom-modal-card p {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.4;
}

.contact-info-box {
    background-color: #f0f6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1.25rem 0;
    text-align: left;
    font-size: 0.85rem;
    color: #1e3a8a;
}

.contact-info-box div {
    margin-bottom: 0.4rem;
}

.contact-info-box div:last-child {
    margin-bottom: 0;
}

.btn-close-notice {
    background-color: #1e3a8a;
    color: #ffffff;
    border: none;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-close-notice:hover {
    background-color: #1d4ed8;
}


/* =========================================================
   Alert Message Box
   ========================================================= */





/* =========================================================
   RESPONSIVE MEDIA QUERIES FOR ALL DEVICES
   (1200px, 1024px, 768px, 640px, 480px, 360px)
   ========================================================= */

@media screen and (max-width: 1200px) {
   
    .b2b-hero-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .nav-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        gap: 1.25rem;
        justify-content: flex-start;
    }
    .b2b-banner-slider .b2b-hero-banner {
        height: 450px;
        padding: 3rem 5rem;
    }
    .b2b-hero-text {
        /* margin-left: 4rem;
        max-width: 380px; */
        width: 40%;
        height: 10%;
        /* margin-left: 10%; */
        margin-right: 50%;
    }
    .b2b-hero-text h1 {
        font-size: 4rem;
    }

    .related-brand-wrapper-card .b2b-grid,
    .b2b-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
    }
}

@media screen and (max-width: 1024px) {
  
    .b2b-hero-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .nav-container {
        justify-content: flex-start;
        gap: 1rem;
    }
    .b2b-filters-bar {
        grid-template-columns: repeat(4, 1fr);
    }
    .related-brand-wrapper-card .b2b-grid,
    .b2b-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.85rem !important;
    }
    .b2b-hero-banner {
        padding: 2.5rem 0;
    }
    .b2b-hero-text h1 {
        font-size: 3rem;
    }
    .b2b-banner-slider .b2b-hero-banner {
        height: 380px;
        padding: 2.5rem 3rem;
    }
    .b2b-hero-text {
        width: 40%;
        margin-left: 3%;
        
    }
    
}

@media screen and (max-width: 768px) {
   
    .b2b-hero-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .main-header {
        padding: 0.75rem 0;
    }
    .header-container {
        display: grid;
        grid-template-columns: 1fr auto;
        row-gap: 0.75rem;
        column-gap: 1.5rem;
        align-items: center;
    }
    .logo-section {
        grid-column: 1 / -1;
        justify-content: center;
        text-align: left;
        gap: 0.4rem;
    }
    .header-logo-img {
        width: 60px;
    }
    .logo-text {
        font-size: 0.9rem;
        font-weight: 800;
        line-height: 1.1;
        white-space: nowrap;
    }
    .logo-tagline {
        display: block !important;
        font-size: 0.65rem;
        margin-left: 0.5rem;
        padding-left: 0.5rem;
        border-left: 1px solid var(--gray-300);
        line-height: 1.2;
    }
    .search-container {
        grid-column: 1 / 2;
        margin: 0;
        min-width: 0;
    }
    .search-input {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
    .search-btn {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
    .header-icons {
        grid-column: 2 / 3;
        display: flex;
        flex-direction: row;
        gap: 0.6rem;
        flex-wrap: nowrap;
    }
    .icon-item {
        font-size: 0.65rem;
    }
    .icon-item i {
        font-size: 1rem;
        margin-bottom: 0.1rem;
    }
    .b2b-hero-banner {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
    .b2b-hero-text h1 {
        font-size: 2.25rem;
    }
    .b2b-order-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    .b2b-section-title {
        font-size: 1.25rem;
    }

    .b2b-banner-slider .b2b-hero-banner {
        height: 340px;
        padding: 2rem 2.5rem;
    }
    .b2b-hero-text {
        width: 45%;
        height: 10%;
        /* margin-left: 10%; */
        margin-right: 90%;
    }
    
    .related-brand-wrapper-card .b2b-grid,
    .b2b-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem !important;
    }
    .b2b-card {
        padding: 0.85rem;
    }
    .b2b-card-img {
        height: 140px;
    }
    .b2b-product-title {
        font-size: 0.8rem;
        min-height: auto;
    }
    .b2b-price {
        font-size: 0.75rem;
    }
    .b2b-pagination {
        gap: 0.5rem;
        margin-top: 2rem;
    }
    .b2b-pagination .page-arrow {
        height: 38px;
        padding: 0 0.75rem;
        font-size: 0.85rem;
    }
    .b2b-pagination .page-link {
        min-width: 32px;
        height: 38px;
        font-size: 0.85rem;
    }
     
    
}
@media screen and (max-width: 640px) {
    .b2b-card {
        max-width: 100%;
    }
    .b2b-banner-slider .b2b-hero-banner {
        height: 300px;
        padding: 1.5rem 2rem;
        justify-content: center;
    }
    .b2b-hero-text {
        width: 45%;
        margin-left: 2%;
    }
    .b2b-filters-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    .related-brand-wrapper-card .b2b-grid,
    .b2b-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
    }
    .b2b-card {
        padding: 0.85rem;
    }
    .b2b-card-img {
        height: 140px;
    }
    .b2b-product-title {
        font-size: 0.8rem;
        min-height: auto;
    }
    .b2b-price {
        font-size: 0.75rem;
    }
    .b2b-pagination {
        gap: 0.5rem;
        margin-top: 2rem;
    }
    .b2b-pagination .page-arrow {
        height: 38px;
        padding: 0 0.75rem;
        font-size: 0.85rem;
    }
    .b2b-pagination .page-link {
        min-width: 32px;
        height: 38px;
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 480px) {
   
    .b2b-hero-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .nav-container {
        font-size: 0.65rem;
        gap: 0.75rem;
        justify-content: flex-start;
    }

    .b2b-banner-slider .b2b-hero-banner {
        height: 250px;
        padding: 1rem 1.25rem;
    }
    .b2b-hero-text {
        width: 40%;
        height: 10%;
        /* margin-left: 10%; */
        margin-right: 50%;
    }
    .b2b-hero-text h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    .b2b-order-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
    .b2b-filters-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .b2b-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .b2b-card {
        padding: 0.75rem !important;
    }

    .b2b-card-img {
        height: 130px !important;
    }

    .b2b-product-title {
        font-size: 0.8rem !important;
        height: auto !important;
        min-height: auto !important;
    }

    .b2b-price {
        font-size: 0.75rem !important;
    }
    
    .b2b-section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    .b2b-pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .b2b-pagination {
        gap: 0.35rem;
    }
    .b2b-pagination .page-arrow {
        height: 34px;
        padding: 0 0.5rem;
        font-size: 0.78rem;
        border-radius: 0.5rem;
    }
    .b2b-pagination .page-link {
        min-width: 28px;
        height: 34px;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }
    .b2b-pagination .page-dots {
        height: 34px;
        min-width: 18px;
        font-size: 0.8rem;
    }
    .filter-bottom-sheet {
        max-height: 88vh;

        border-radius: 18px 18px 0 0;
    }

    .filter-sheet-header {
        padding: 0 18px;
    }

    .filter-sheet-content {
        padding: 0 18px;
    }

    .filter-sheet-actions {
        padding-left: 18px;
        padding-right: 18px;
    }
    /* Hide desktop sidebar and standalone sort bar */
    .b2b-sidebar-filter,
    .b2b-sort-bar,
    .mobile-filter-bar {
        display: none !important;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.4rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
        width: 110px;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        position: relative;
        flex: 1;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0;
        margin-left: 13rem;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
        /* padding-left: 2rem; */
        width: 100%;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.38rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        width: 130px;
        box-sizing: border-box;
    }

    .mobile-sort-wrapper .custom-dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 130px;
        min-width: 130px;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 1rem;
        box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
        z-index: 10000;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }

    /* Shown via JS toggle */
    .mobile-sort-wrapper .custom-dropdown-menu.show {
        display: block !important;
    }

    /* Dropdown Option Items */
    .mobile-sort-wrapper .filter-option {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        color: #1e293b;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .mobile-sort-wrapper .filter-option:hover {
        background-color: #eff6ff;
        color: #2563eb;
    }
    
}

@media screen and (max-width: 430px) {
    
    .b2b-hero-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .nav-container {
        font-size: 0.65rem;
        gap: 0.75rem;
        justify-content: flex-start;
    }

    .b2b-banner-slider .b2b-hero-banner {
        height: 250px;
        padding: 1rem 1.25rem;
    }
    .b2b-hero-text {
        width: 40%;
        height: 10%;
        /* margin-left: 10%; */
        margin-right: 50%;
    }
    .b2b-hero-text h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    .b2b-order-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
    .b2b-filters-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .b2b-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .b2b-section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    .b2b-pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .b2b-pagination {
        gap: 0.35rem;
    }
    .b2b-pagination .page-arrow {
        height: 34px;
        padding: 0 0.5rem;
        font-size: 0.78rem;
        border-radius: 0.5rem;
    }
    .b2b-pagination .page-link {
        min-width: 28px;
        height: 34px;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }
    .b2b-pagination .page-dots {
        height: 34px;
        min-width: 18px;
        font-size: 0.8rem;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.4rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
        width: 110px;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        position: relative;
        flex: 1;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0;
        margin-left: 10rem;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
        /* padding-left: 2rem; */
        width: 100%;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.38rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        width: 130px;
        box-sizing: border-box;
    }

    .mobile-sort-wrapper .custom-dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 130px;
        min-width: 130px;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 1rem;
        box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
        z-index: 10000;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }

    /* Shown via JS toggle */
    .mobile-sort-wrapper .custom-dropdown-menu.show {
        display: block !important;
    }

    /* Dropdown Option Items */
    .mobile-sort-wrapper .filter-option {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        color: #1e293b;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .mobile-sort-wrapper .filter-option:hover {
        background-color: #eff6ff;
        color: #2563eb;
    }
   
}

/* =========================================================
   425px
========================================================= */

@media (max-width: 425px) {

    .filter-bottom-sheet {
        max-height: 90vh;
    }

    .filter-sheet-header {
        height: 54px;
    }

    .filter-sheet-header h2 {
        font-size: 17px;
    }

    .mobile-filter-section-header {
        min-height: 48px;
        font-size: 13px;
    }

    .mobile-filter-option {
        min-height: 32px;
        font-size: 12.5px;
    }

    .mobile-filter-option input {
        width: 16px;
        height: 16px;
    }

    .mobile-range-input {
        height: 38px;
        font-size: 12px;
    }

    /* Hide desktop sidebar and standalone sort bar */
    .b2b-sidebar-filter,
    .b2b-sort-bar,
    .mobile-filter-bar {
        display: none !important;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem;
        margin: 0;
    }

    .mobile-sort-wrapper label {
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        white-space: nowrap;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        white-space: nowrap;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.4rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
        width: 110px;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        position: relative;
        flex: 1;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0;
        margin-left: 10rem;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
        /* padding-left: 2rem; */
        width: 100%;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.38rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        width: 130px;
        box-sizing: border-box;
    }

    .mobile-sort-wrapper .custom-dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 130px;
        min-width: 130px;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 1rem;
        box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
        z-index: 10000;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }

    /* Shown via JS toggle */
    .mobile-sort-wrapper .custom-dropdown-menu.show {
        display: block !important;
    }

    /* Dropdown Option Items */
    .mobile-sort-wrapper .filter-option {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        color: #1e293b;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .mobile-sort-wrapper .filter-option:hover {
        background-color: #eff6ff;
        color: #2563eb;
    }

    
    /* Force 2 Columns on Small Mobile Screens */
    .b2b-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .b2b-card {
        padding: 0.75rem !important;
    }

    .b2b-card-img {
        height: 130px !important;
    }

    .b2b-product-title {
        font-size: 0.8rem !important;
        height: auto !important;
        min-height: auto !important;
    }

    .b2b-price {
        font-size: 0.75rem !important;
    }
}

@media screen and (max-width: 375px) {

    .b2b-hero-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .b2b-banner-slider .b2b-hero-banner {
        height: 210px;
        padding: 0.75rem 1rem;
    }
    .b2b-hero-text {
        /* max-width: 200px; */
        width: 50%;
        height: 10%;
        /* margin-left: 10%; */
        margin-right: 45%;
    }
    .b2b-hero-text h1 {
        font-size: 1.25rem;
        margin-bottom: 0.4rem;
    }
    .b2b-order-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.65rem;
    }
    .b2b-filters-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .b2b-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .b2b-card {
        padding: 0.75rem;
    }
    .b2b-card-img {
        height: 130px;
    }
    .b2b-product-title {
        font-size: 0.8rem;
        min-height: auto;
    }
    .b2b-price {
        font-size: 0.75rem;
    }
    .b2b-pagination {
        gap: 0.25rem;
    }
    .b2b-pagination .page-link {
        min-width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .b2b-pagination {
        gap: 0.25rem;
    }
    .b2b-pagination .page-arrow {
        height: 30px;
        padding: 0 0.4rem;
        font-size: 0.7rem;
    }
    .b2b-pagination .page-link {
        min-width: 24px;
        height: 30px;
        font-size: 0.75rem;
    }
    .b2b-pagination .page-dots {
        height: 30px;
        min-width: 15px;
        font-size: 0.75rem;
    }

    .filter-bottom-sheet {
        max-height: 92vh;

        border-radius: 16px 16px 0 0;
    }

    .filter-sheet-header {
        height: 50px;

        padding: 0 15px;
    }

    .filter-sheet-header h2 {
        font-size: 16px;
    }

    .filter-sheet-content {
        padding: 0 15px;
    }

    .mobile-filter-section-header {
        min-height: 46px;

        font-size: 12.5px;
    }

    .mobile-filter-option {
        min-height: 30px;

        gap: 8px;

        font-size: 12px;
    }

    .mobile-filter-option input {
        width: 15px;
        height: 15px;
    }

    .mobile-price-inputs {
        gap: 5px;
    }

    .mobile-range-input {
        height: 36px;

        padding: 0 8px;

        font-size: 11px;
    }

    .mobile-agree-btn {
        height: 38px;

        font-size: 12px;
    }

    .filter-sheet-actions {
        padding: 10px 15px;

        gap: 8px;
    }

    .filter-reset-btn,
    .filter-apply-btn {
        height: 40px;

        font-size: 12px;
    }

    .btn-mobile-pill {
        padding: 0.45rem 0.75rem;
        font-size: 0.775rem;
    }

    .mobile-sort-wrapper label {
        font-size: 0.775rem;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        padding: 0.45rem 0.65rem;
        font-size: 0.775rem;
    }
    /* Force 2 Columns on Small Mobile Screens */
    .b2b-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .b2b-card {
        padding: 0.75rem !important;
    }

    .b2b-card-img {
        height: 130px !important;
    }

    .b2b-product-title {
        font-size: 0.8rem !important;
        height: auto !important;
        min-height: auto !important;
    }

    .b2b-price {
        font-size: 0.75rem !important;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem;
        margin: 0;
    }

    .mobile-sort-wrapper label {
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        white-space: nowrap;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        white-space: nowrap;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.4rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
        width: 110px;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        position: relative;
        flex: 1;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0;
        margin-left: 7rem;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
        /* padding-left: 2rem; */
        width: 100%;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.38rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        width: 130px;
        box-sizing: border-box;
    }

    .mobile-sort-wrapper .custom-dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 130px;
        min-width: 130px;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 1rem;
        box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
        z-index: 10000;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }

    /* Shown via JS toggle */
    .mobile-sort-wrapper .custom-dropdown-menu.show {
        display: block !important;
    }

    /* Dropdown Option Items */
    .mobile-sort-wrapper .filter-option {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        color: #1e293b;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .mobile-sort-wrapper .filter-option:hover {
        background-color: #eff6ff;
        color: #2563eb;
    }

    
}

@media screen and (max-width: 320px) {
    
    .b2b-hero-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .b2b-banner-slider .b2b-hero-banner {
        height: 210px;
        padding: 0.75rem 1rem;
    }
    .b2b-hero-text {
        /* max-width: 200px; */
        width: 50%;
        height: 10%;
        /* margin-left: 10%; */
        margin-right: 40%;
    }
    .b2b-hero-text h1 {
        font-size: 1.25rem;
        margin-bottom: 0.4rem;
    }
    .b2b-order-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.65rem;
    }
    .b2b-filters-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .b2b-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .b2b-card {
        padding: 0.75rem;
    }
    .b2b-card-img {
        height: 130px;
    }
    .b2b-product-title {
        font-size: 0.8rem !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .b2b-price {
        font-size: 0.75rem;
    }
    .b2b-pagination {
        gap: 0.25rem;
    }
    .b2b-pagination .page-link {
        min-width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .b2b-pagination {
        gap: 0.25rem;
    }
    .b2b-pagination .page-arrow {
        height: 30px;
        padding: 0 0.4rem;
        font-size: 0.7rem;
    }
    .b2b-pagination .page-link {
        min-width: 24px;
        height: 30px;
        font-size: 0.75rem;
    }
    .b2b-pagination .page-dots {
        height: 30px;
        min-width: 15px;
        font-size: 0.75rem;
    }

    .filter-bottom-sheet {
        max-height: 94vh;
    }

    .filter-sheet-header {
        height: 48px;

        padding: 0 13px;
    }

    .filter-sheet-header h2 {
        font-size: 15px;
    }

    .filter-close-btn {
        width: 30px;
        height: 30px;

        font-size: 17px;
    }

    .filter-sheet-content {
        padding: 0 13px;
    }

    .mobile-filter-section-header {
        min-height: 43px;
        font-size: 12px;
    }

    .mobile-filter-option {
        min-height: 29px;
        gap: 7px;
        font-size: 11px;
    }

    .mobile-filter-option input {
        width: 14px;
        height: 14px;
    }

    .mobile-price-inputs {
        gap: 4px;
    }

    .mobile-range-input {
        height: 34px;
        padding: 0 7px;
        font-size: 10px;
    }

    .mobile-price-inputs > span {
        font-size: 10px;
    }

    .mobile-agree-btn {
        height: 36px;
        margin-top: 8px;
        font-size: 11px;
    }

    .filter-sheet-actions {
        padding: 9px 13px;
        gap: 7px;
    }

    .filter-reset-btn,
    .filter-apply-btn {
        height: 38px;

        font-size: 11px;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem;
        margin: 0;
    }

    .mobile-sort-wrapper label {
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        white-space: nowrap;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        white-space: nowrap;
    }

    /* Container holding Filter on left and Sort By on right */
    .mobile-action-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    /* Left Button: Filter */
    .btn-mobile-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.4rem;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        margin: 0;
        white-space: nowrap;
        width: 110px;
    }

    /* Right Group: Sort By Label & Dropdown */
    .mobile-sort-wrapper {
        position: relative;
        flex: 1;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0;
        margin-left: 4rem;
    }

    .mobile-sort-wrapper .sort-dropdown-container {
        position: relative;
        /* padding-left: 2rem; */
        width: 100%;
    }

    .mobile-sort-wrapper .sort-dropdown-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 9999px;
        padding: 0.38rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #1e3a8a;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        width: 130px;
        box-sizing: border-box;
    }

    .mobile-sort-wrapper .custom-dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 130px;
        min-width: 130px;
        background-color: #ffffff;
        border: 1px solid #bfdbfe;
        border-radius: 1rem;
        box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
        z-index: 10000;
        padding: 0.5rem 0;
        box-sizing: border-box;
    }

    /* Shown via JS toggle */
    .mobile-sort-wrapper .custom-dropdown-menu.show {
        display: block !important;
    }

    /* Dropdown Option Items */
    .mobile-sort-wrapper .filter-option {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        color: #1e293b;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .mobile-sort-wrapper .filter-option:hover {
        background-color: #eff6ff;
        color: #2563eb;
    }

}