/**
 * Wholesale Catalog Filter Styles
 *
 * Mobile-optimized, minimalist filter interface
 * Matches design from filtering.png example
 * Uses Zeawin Design Tokens for consistency
 */

/* Filter Panel Container */
.wholesale-filter-panel.side-panel {
    background: var(--zeawin-color-gray-100);
}

/* Breadcrumb Navigation */
.wholesale-filter-breadcrumb {
    padding: var(--zeawin-spacing-4) var(--zeawin-spacing-5);
    font-size: var(--zeawin-font-size-xs);
    color: var(--zeawin-color-text-muted);
    border-bottom: 1px solid var(--zeawin-color-gray-300);
    background: var(--zeawin-color-white);
    font-family: var(--zeawin-font-family-base);
}

.wholesale-filter-breadcrumb a {
    color: var(--zeawin-color-text-muted);
    text-decoration: none;
    transition: color var(--zeawin-transition-base);
}

.wholesale-filter-breadcrumb a:hover {
    color: var(--zeawin-color-text-primary);
}

.breadcrumb-arrow {
    margin: 0 var(--zeawin-spacing-2);
    font-size: var(--zeawin-font-size-xs);
}

.breadcrumb-current {
    color: var(--zeawin-color-text-heading);
    font-weight: var(--zeawin-font-weight-semibold);
}

/* Search Bar */
.wholesale-filter-search {
    position: relative;
    padding: var(--zeawin-spacing-4) var(--zeawin-spacing-5);
    background: var(--zeawin-color-white);
    border-bottom: 1px solid var(--zeawin-color-gray-300);
}

.wholesale-search-input {
    width: 100%;
    padding: var(--zeawin-spacing-3) 40px var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    border: 1px solid var(--zeawin-color-gray-300);
    border-radius: var(--zeawin-radius-base);
    font-size: var(--zeawin-font-size-base);
    background: var(--zeawin-color-white);
    font-family: var(--zeawin-font-family-base);
    color: var(--zeawin-color-text-primary);
    transition: border-color var(--zeawin-transition-base), box-shadow var(--zeawin-transition-base);
}

.wholesale-search-input:focus {
    outline: none;
    border-color: var(--zeawin-color-primary);
    box-shadow: var(--zeawin-focus-ring);
}

.wholesale-search-input::placeholder {
    color: var(--zeawin-color-text-muted);
}

.wholesale-search-icon {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--zeawin-font-size-lg);
    color: var(--zeawin-color-text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* Sort Control */
.wholesale-filter-sort {
    padding: var(--zeawin-spacing-4) var(--zeawin-spacing-5);
    background: var(--zeawin-color-white);
    border-bottom: 1px solid var(--zeawin-color-gray-300);
    display: flex;
    align-items: center;
    gap: var(--zeawin-spacing-2);
}

.wholesale-filter-sort label {
    font-size: var(--zeawin-font-size-sm);
    color: var(--zeawin-color-text-heading);
    font-weight: var(--zeawin-font-weight-medium);
    white-space: nowrap;
    font-family: var(--zeawin-font-family-base);
}

.wholesale-sort-select {
    flex: 1;
    padding: var(--zeawin-spacing-2) var(--zeawin-spacing-4);
    border: 1px solid var(--zeawin-color-gray-300);
    border-radius: var(--zeawin-radius-base);
    font-size: var(--zeawin-font-size-sm);
    background-color: var(--zeawin-color-white) !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23282828" d="M6 8L1 3h10z"/></svg>');
    color: var(--zeawin-color-text-primary);
    font-family: var(--zeawin-font-family-base);
    cursor: pointer;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right var(--zeawin-spacing-4) center;
    transition: border-color var(--zeawin-transition-base), box-shadow var(--zeawin-transition-base);
}

.wholesale-sort-select:focus {
    outline: none;
    border-color: var(--zeawin-color-primary);
    box-shadow: var(--zeawin-focus-ring);
}

/* Ensure dropdown options have white background and proper hover color */
.wholesale-sort-select option {
    background-color: #ffffff !important;
    color: #282828 !important;
}

/* Try to override browser defaults for hover state */
.wholesale-sort-select option:hover,
.wholesale-sort-select option:focus,
.wholesale-sort-select option:checked,
.wholesale-sort-select option:active {
    background-color: #f8f9fa !important;
    background-image: none !important;
    color: #282828 !important;
}

/* Categories Section */
.wholesale-filter-categories {
    background: var(--zeawin-color-white);
    border-bottom: 1px solid var(--zeawin-color-gray-300);
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--zeawin-spacing-4) var(--zeawin-spacing-5);
    border-bottom: 1px solid var(--zeawin-color-gray-300);
}

.categories-header h3 {
    margin: 0;
    font-size: var(--zeawin-font-size-xl);
    font-weight: var(--zeawin-font-weight-semibold);
    color: var(--zeawin-color-black);
    font-family: var(--zeawin-font-family-heading);
}

.clear-filters-link {
    font-size: var(--zeawin-font-size-sm);
    color: var(--zeawin-color-primary);
    text-decoration: none;
    cursor: pointer;
    font-family: var(--zeawin-font-family-base);
    transition: color var(--zeawin-transition-base);
}

.clear-filters-link:hover {
    color: var(--zeawin-color-primary-dark);
    text-decoration: underline;
}

/* Categories List */
.categories-list {
    max-height: 400px;
    overflow-y: auto;
}

.category-item {
    border-bottom: 1px solid var(--zeawin-color-gray-100);
}

.category-item:last-child {
    border-bottom: none;
}

.category-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--zeawin-spacing-4) var(--zeawin-spacing-5);
    margin: 0;
    cursor: pointer;
    transition: background-color var(--zeawin-transition-base);
    font-family: var(--zeawin-font-family-base);
}

.category-label:hover {
    background-color: var(--zeawin-color-gray-100);
}

.category-item.active .category-label {
    background-color: var(--zeawin-color-gray-200);
}

.wholesale-category-radio {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--zeawin-color-gray-300);
    border-radius: 50%;
    margin-right: var(--zeawin-spacing-3);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all var(--zeawin-transition-base);
}

.wholesale-category-radio:focus {
    outline: none;
    box-shadow: var(--zeawin-focus-ring);
}

.wholesale-category-radio:checked {
    border-color: var(--zeawin-color-primary);
    background-color: var(--zeawin-color-primary);
}

.wholesale-category-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: var(--zeawin-color-white);
    border-radius: 50%;
}

.category-name {
    flex: 1;
    font-size: var(--zeawin-font-size-base);
    color: var(--zeawin-color-text-primary);
    font-family: var(--zeawin-font-family-base);
}

.category-item.active .category-name {
    font-weight: var(--zeawin-font-weight-semibold);
    color: var(--zeawin-color-black);
}

.category-count {
    font-size: var(--zeawin-font-size-sm);
    font-weight: var(--zeawin-font-weight-semibold);
    color: var(--zeawin-color-black);
}

/* Expand/Collapse Icon */
.category-expand {
    font-size: 16px;
    color: var(--zeawin-color-text-muted);
    margin-right: var(--zeawin-spacing-2);
    transition: transform var(--zeawin-transition-base);
    cursor: pointer;
}

.category-item.expanded .category-expand {
    transform: rotate(90deg);
}

/* Parent Category Label */
.parent-category-label {
    cursor: pointer;
}

.parent-category-label:hover {
    background-color: var(--zeawin-color-gray-100);
}

.parent-category-label:hover .category-expand {
    color: var(--zeawin-color-primary);
}

.parent-category .category-name {
    font-weight: var(--zeawin-font-weight-semibold);
    color: var(--zeawin-color-text-heading);
}

/* Child Categories */
.category-children {
    /* Removed background and border for tighter spacing */
}

.child-category {
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.child-category:last-child {
    /* No special styling needed */
}

.child-category .category-label {
    padding-left: calc(var(--zeawin-spacing-5) + var(--zeawin-spacing-3) + 20px);
    padding-top: var(--zeawin-spacing-1);
    padding-bottom: var(--zeawin-spacing-1);
    padding-right: var(--zeawin-spacing-5);
}

.child-category .category-name {
    font-size: var(--zeawin-font-size-sm);
    color: var(--zeawin-color-text-secondary);
}

/* Active Filters Display */
.wholesale-active-filters {
    padding: var(--zeawin-spacing-4) var(--zeawin-spacing-5);
    background: var(--zeawin-color-gray-100);
    border-bottom: 1px solid var(--zeawin-color-gray-300);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zeawin-spacing-2);
}

.active-filters-label {
    font-size: var(--zeawin-font-size-sm);
    font-weight: var(--zeawin-font-weight-medium);
    color: var(--zeawin-color-text-heading);
    font-family: var(--zeawin-font-family-base);
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--zeawin-spacing-2);
    padding: var(--zeawin-spacing-2) var(--zeawin-spacing-3);
    background: var(--zeawin-color-white);
    border: 1px solid var(--zeawin-color-gray-300);
    border-radius: var(--zeawin-radius-full);
    font-size: var(--zeawin-font-size-xs);
    color: var(--zeawin-color-text-primary);
    font-family: var(--zeawin-font-family-base);
    transition: all var(--zeawin-transition-base);
}

.active-filter-tag:hover {
    border-color: var(--zeawin-color-primary);
    box-shadow: var(--zeawin-shadow-sm);
}

.remove-filter {
    background: none;
    border: none;
    font-size: var(--zeawin-font-size-lg);
    color: var(--zeawin-color-text-muted);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--zeawin-transition-base);
}

.remove-filter:hover {
    background-color: var(--zeawin-color-gray-200);
    color: var(--zeawin-color-black);
}

/* No Filters Message */
.no-filters-message {
    padding: var(--zeawin-spacing-10) var(--zeawin-spacing-5);
    text-align: center;
    color: var(--zeawin-color-text-muted);
    font-family: var(--zeawin-font-family-base);
    font-size: var(--zeawin-font-size-base);
}

/* Loading State */
ul.products.loading {
    position: relative;
    min-height: 200px;
}

ul.products.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--zeawin-color-gray-100);
    border-top: 3px solid var(--zeawin-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* No Products Found */
.wholesale-no-products {
    text-align: center;
    padding: var(--zeawin-spacing-10) var(--zeawin-spacing-5);
}

.wholesale-no-products h3 {
    font-size: var(--zeawin-font-size-2xl);
    color: var(--zeawin-color-text-primary);
    margin-bottom: var(--zeawin-spacing-2);
    font-family: var(--zeawin-font-family-heading);
    font-weight: var(--zeawin-font-weight-semibold);
}

.wholesale-no-products p {
    color: var(--zeawin-color-text-muted);
    margin-bottom: var(--zeawin-spacing-5);
    font-family: var(--zeawin-font-family-base);
    font-size: var(--zeawin-font-size-base);
}

.clear-all-filters {
    padding: var(--zeawin-spacing-3) var(--zeawin-spacing-6);
    background: var(--zeawin-color-primary);
    color: var(--zeawin-color-text-white);
    border: none;
    border-radius: var(--zeawin-radius-base);
    cursor: pointer;
    font-size: var(--zeawin-font-size-sm);
    font-weight: var(--zeawin-font-weight-semibold);
    font-family: var(--zeawin-font-family-base);
    transition: all var(--zeawin-transition-base);
}

.clear-all-filters:hover {
    background: var(--zeawin-color-primary-dark);
    box-shadow: var(--zeawin-shadow-md);
}

/* Scrollbar Styling */
.categories-list::-webkit-scrollbar {
    width: 6px;
}

.categories-list::-webkit-scrollbar-track {
    background: var(--zeawin-color-gray-100);
}

.categories-list::-webkit-scrollbar-thumb {
    background: var(--zeawin-color-gray-400);
    border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb:hover {
    background: var(--zeawin-color-gray-500);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wholesale-filter-breadcrumb {
        font-size: var(--zeawin-font-size-xs);
        padding: var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    }

    .wholesale-filter-search {
        padding: var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    }

    .wholesale-search-input {
        font-size: var(--zeawin-font-size-sm);
        padding: var(--zeawin-spacing-2) 35px var(--zeawin-spacing-2) var(--zeawin-spacing-3);
    }

    .wholesale-filter-sort {
        padding: var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    }

    .categories-header {
        padding: var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    }

    .category-label {
        padding: var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    }

    .category-name {
        font-size: var(--zeawin-font-size-sm);
    }

    .category-count {
        font-size: var(--zeawin-font-size-xs);
    }

    .wholesale-active-filters {
        padding: var(--zeawin-spacing-3) var(--zeawin-spacing-4);
    }
}

/* Panel Animation — scoped to wholesale filter panels only, NOT Goya's #mobile-menu */
.wholesale-filter-panel.side-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 400px !important;
    max-width: 90vw !important;
    background: white !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    -webkit-transform: translateX(-100%) !important;
    -moz-transform: translateX(-100%) !important;
    -ms-transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    -webkit-transition: transform 0.3s ease !important;
    -moz-transition: transform 0.3s ease !important;
    -ms-transition: transform 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important; /* prevent intercepting clicks while panel is off-screen */
}

.wholesale-filter-panel.side-panel.panel-open {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    -moz-transform: translateX(0) !important;
    -ms-transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important; /* restore interactivity when panel is open */
}

@media (max-width: 768px) {
    .wholesale-filter-panel.side-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Shop Filter Button - Ensure it's visible */
.shop-sidebar-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    background: #000000 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    pointer-events: auto !important;
}

.shop-sidebar-btn:hover {
    background: #333333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) !important;
}

.shop-sidebar-btn .icon_alt {
    display: inline-block !important;
    visibility: visible !important;
}

.shop-sidebar-btn .icon-filter {
    display: inline-block !important;
    visibility: visible !important;
}

/* Ensure products grid doesn't break during filtering */
.shop-products ul.products {
    min-height: 400px;
}

/* Fade transition for product updates */
.shop-products ul.products {
    transition: opacity var(--zeawin-transition-base);
}

/* Shop Page Filters Link (next to sorting dropdown) */
.shop-filters-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 15px !important;
    font-size: 14px !important;
    color: #282828 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    cursor: pointer !important;
}

.shop-filters-trigger:hover {
    color: #000000 !important;
    text-decoration: none !important;
}

.shop-filters-trigger svg {
    flex-shrink: 0 !important;
}

/* Mobile Menu z-index Fix for Wholesale Catalog Page
 * Ensure mobile menu appears above wholesale filter panels (z-index: 99999)
 * Page ID: 1932 (wholesale-catalog)
 * Target Goya's mobile menu (#mobile-menu with class .side-menu)
 */
body.page-id-1932 #mobile-menu,
body.page-id-1932 .side-menu,
body.page-id-1932 .side-panel.side-menu {
    z-index: 100000 !important;
}

/* FORCE mobile menu to show when panel-open-menu class is added to body */
body.page-id-1932.panel-open-menu #mobile-menu,
body.page-id-1932.panel-open-menu .side-menu,
body.page-id-1932.panel-open-menu .side-panel.side-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    -moz-transform: translateX(0) !important;
    -ms-transform: translateX(0) !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 460px !important;
    overflow: visible !important;
}

/* Ensure mobile menu overlay/backdrop is also above filter panels */
body.page-id-1932 .click-capture,
body.page-id-1932 .panel-overlay,
body.page-id-1932 .backdrop {
    z-index: 99998 !important;
}

/* Make sure overlay covers everything when menu is open */
body.page-id-1932.panel-open-menu .click-capture {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99998 !important;
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

/* When mobile menu is open, lower header z-index so overlay covers it */
body.page-id-1932.panel-open-menu .site-header,
body.page-id-1932.panel-open-menu header,
body.page-id-1932.panel-open-menu .header-wrapper {
    z-index: 1 !important;
}

/* Also lower page title/header elements to cover the heading */
body.page-id-1932.panel-open-menu .page-padding,
body.page-id-1932.panel-open-menu .regular-title,
body.page-id-1932.panel-open-menu .page-header {
    position: relative !important;
    z-index: 1 !important;
}

/* Keep burger menu clickable even when header is lowered */
body.page-id-1932.panel-open-menu .menu-toggle,
body.page-id-1932.panel-open-menu .hamburger-menu,
body.page-id-1932.panel-open-menu .hamburger-menu button {
    position: relative !important;
    z-index: 100002 !important;
}

/* Ensure header and burger menu are always clickable on catalog page (when menu is closed) */
body.page-id-1932 .site-header,
body.page-id-1932 header,
body.page-id-1932 .header-wrapper,
body.page-id-1932 .mobile-header,
body.page-id-1932 .header-sidebar {
    position: relative !important;
    z-index: 100001 !important;
    pointer-events: auto !important;
}

/* Ensure burger menu button is clickable */
body.page-id-1932 .menu-toggle,
body.page-id-1932 .hamburger-menu,
body.page-id-1932 .hamburger-menu button {
    position: relative !important;
    z-index: 100002 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure shop-container doesn't block header clicks */
body.page-id-1932 .shop-container {
    position: relative !important;
    z-index: 1 !important;
}

/* Mobile: Match /shop page filter layout on wholesale catalog page */
@media (max-width: 768px) {
    /*
     * The inline <style> in wholesale-catalog.php sets padding-left: 70px on
     * .shop-products .row (for desktop full-width layout). On mobile this pushes
     * the breadcrumb and filter bar far to the right. Override it here so the
     * row uses standard Bootstrap gutter (15px), aligning "H" in "Home / Shop"
     * with the header burger menu above it.
     */
    body.page-id-1932 .shop-products .row {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Breadcrumb element itself needs no extra margin/padding beyond Bootstrap col's 15px */
    body.page-id-1932 .woocommerce-breadcrumb {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* Strip the border-right/padding/margin from filter-trigger-box that create
     * the misplaced vertical separator between "Filters" and "Default sorting".
     * We must NOT hide the whole box because #et-shop-filters (the Filters
     * button) lives inside it — hiding the box hides the trigger too.
     * Also hide the header-only duplicate trigger (#et-shop-filters-header). */
    body.page-id-1932 .shop_bar .shop-filters .filter-trigger-box {
        border-right: none !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .filter-trigger-box #et-shop-filters-header {
        display: none !important;
    }

    /* Make shop-filters a flex container - NO WRAP to keep items on one line.
     * Use negative margins + calc width so the top/bottom border lines extend
     * to the full col box width (= viewport width), matching the shop page.
     * The compensating padding-left/right push flex items back to their
     * original position inside the extended border. */
    body.page-id-1932 .shop_bar .shop-filters {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        width: calc(100% + 30px) !important;
        overflow: visible !important;
        margin-top: 20px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        margin-bottom: 0 !important;
        padding: 9px 15px !important;
        position: relative !important;
        border: 1px solid rgba(0,0,0,0.1) !important;
        border-width: 1px 0 !important;
        text-align: left !important;
    }

    /* All direct children of shop-filters should be inline and left-aligned */
    body.page-id-1932 .shop_bar .shop-filters > * {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        text-align: left !important;
    }

    /* Filter trigger — covers the parent theme's #et-shop-filters button
     * (.filter-trigger inside .filter-trigger-box) as well as any injected
     * .shop-filters-trigger or .shop-sidebar-btn variants */
    body.page-id-1932 .shop_bar .shop-filters .filter-trigger,
    body.page-id-1932 .shop_bar .shop-filters-trigger,
    body.page-id-1932 .shop_bar .shop-filters a[href*="filter"],
    body.page-id-1932 .shop_bar .shop-filters .shop-sidebar-btn {
        display: inline-flex !important;
        align-items: center !important;
        gap: 2px !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0 !important;
        font-size: 16px !important;
        line-height: normal !important;
        color: #282828 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        text-align: left !important;
    }

    /* Filter icon */
    body.page-id-1932 .shop_bar .shop-filters .filter-trigger svg,
    body.page-id-1932 .shop_bar .shop-filters-trigger svg,
    body.page-id-1932 .shop_bar .shop-filters a[href*="filter"] svg,
    body.page-id-1932 .shop_bar .shop-filters .shop-sidebar-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Sort dropdown container - allow natural width so the ::after arrow
     * has room to sit to the right of "Default sorting" text.
     * The parent theme's .woocommerce-ordering:not(.select2-styled)::after
     * uses margin-left: -20px which pulls the arrow back on top of the text.
     * We override that below with margin-left: 4px to push it right.
     * font-size here ensures cascade to child select even if browser ignores
     * font-size set directly on the <select> element. */
    body.page-id-1932 .woocommerce-ordering,
    body.page-id-1932 .shop_bar .shop-filters .woocommerce-ordering,
    body.page-id-1932 .shop_bar .shop-filters .woocommerce-ordering .select2-container,
    body.page-id-1932 .shop_bar .shop-filters .select2-container {
        display: inline-flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        position: relative !important;
        width: auto !important;
        max-width: 155px !important;
        min-width: 0 !important;
        overflow: visible !important;
        margin: 0 !important;
        margin-left: 20px !important;
        padding: 0 !important;
        padding-left: 0 !important;
        text-align: left !important;
        font-size: 16px !important;
    }

    /* Override parent theme's ::after arrow that has margin-left: -20px
     * (which jams the arrow against the text). Push it right instead. */
    body.page-id-1932 .shop_bar .woocommerce-ordering:not(.select2-styled)::after {
        margin-left: 15px !important;
    }

    /* Force Select2 selection element to fixed width */
    body.page-id-1932 .shop_bar .shop-filters .select2-container--default .select2-selection,
    body.page-id-1932 .shop_bar .shop-filters .select2-selection {
        width: 100px !important;
        max-width: 100px !important;
        min-width: 100px !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .woocommerce-ordering select,
    body.page-id-1932 .shop-filters .woocommerce-ordering select {
        font-size: 16px !important;
        width: 100px !important;
        max-width: 100px !important;
        min-width: 0 !important;
        border: none !important;
        background: transparent !important;
        padding: 2px 0 2px 0 !important;
        color: #282828 !important;
        cursor: pointer !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        flex: 0 0 100px !important;
    }

    /* Dropdown option items */
    body.page-id-1932 .shop_bar .shop-filters .woocommerce-ordering select option,
    body.page-id-1932 .shop-filters .woocommerce-ordering select option {
        font-size: 16px !important;
        color: #282828 !important;
    }

    /* Select2 rendered select - match font size */
    body.page-id-1932 .shop_bar .shop-filters .select2-container .select2-selection__rendered {
        font-size: 16px !important;
        max-width: 100px !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        padding: 0 !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .select2-container .select2-selection {
        border: none !important;
        background: transparent !important;
    }

    /* Shop view toggle buttons — border-left creates the vertical separator
     * between the dropdown arrow and the icons (matching the shop page).
     * margin-left: auto pushes the block to the far right of the full-width
     * bar so the List icon aligns with the Cart icon in the header above. */
    /* Separator line between ∨ and ⊞ — absolutely positioned relative to
     * shop-filters so it sits just to the left of the icons block regardless
     * of where the ∨ arrow overflows to. right value = right offset of
     * shop-views (15px) + width of shop-views buttons + padding (~57px). */
    body.page-id-1932 .shop_bar .shop-filters::after {
        content: '' !important;
        display: block !important;
        position: absolute !important;
        right: 80px !important;
        top: 20% !important;
        bottom: 20% !important;
        width: 1px !important;
        background-color: #eee !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .shop-views {
        display: inline-flex !important;
        align-items: center !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin-left: 0 !important;
        padding-left: 8px !important;
        flex-shrink: 0 !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .shop-views button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 24px !important;
        height: 24px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        opacity: 0.5 !important;
        flex-shrink: 0 !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .shop-views button svg {
        width: 16px !important;
        height: 16px !important;
    }

    body.page-id-1932 .shop_bar .shop-filters .shop-views button.active,
    body.page-id-1932 .shop_bar .shop-filters .shop-views button:hover {
        opacity: 1 !important;
    }

    /* Hide small grid icon on mobile to match shop page */
    body.page-id-1932 .shop_bar .shop-filters .shop-views #shop-display-small,
    body.page-id-1932 .shop_bar .shop-filters .shop-views .small-icon {
        display: none !important;
    }
}

/* Shop page mobile: align filter bar and breadcrumb with each other
 *
 * Three issues fixed here:
 *
 * 1. Parent theme sets justify-content: center on .shop_bar .shop-filters at
 *    max-width: 767px. Override to flex-start.
 *
 * 2. .filter-trigger-box div contains the original #et-shop-filters button
 *    (hidden via display:none) but the box itself still renders as a ~21px wide
 *    flex item (padding-right: 10px + margin-right: 10px + border). This dead
 *    space pushes the visible "≡ Filters" link rightward. Hiding the box
 *    removes it from the flex layout entirely.
 *
 * 3. The shop_bar .row has margin-left: -15px but no compensating padding-left,
 *    so the .col-md-6.category_bar breadcrumb ends up 15px less indented than
 *    the wholesale catalog's breadcrumb (which gets padding-left: 15px on its
 *    .shop-products .row via the wholesale CSS). Adding the same 15px here
 *    aligns the shop page breadcrumb with the wholesale catalog breadcrumb.
 */
@media (max-width: 768px) {
    body.woocommerce-shop .shop_bar .shop-filters {
        justify-content: flex-start !important;
    }

    body.woocommerce-shop .shop_bar .filter-trigger-box {
        display: none !important;
    }

    /* Move only the breadcrumb column right (not the filters column).
     * Bootstrap's default is 15px; we override with 30px so the breadcrumb
     * matches the wholesale catalog indent while the filters col stays at its
     * natural Bootstrap 15px position. */
    body.woocommerce-shop .shop_bar .category_bar {
        padding-left: 30px !important;
    }

    /* Increase the "≡ Filters" link to match the Grid/List icon visual size.
     * The link is injected by JS with inline style (font-size: 14px, SVG 16×16),
     * so !important is required to override. Parent theme view-toggle SVGs are 18px. */
    body.woocommerce-shop .shop_bar .shop-filters-trigger {
        font-size: 16px !important;
        gap: 6px !important;
    }

    body.woocommerce-shop .shop_bar .shop-filters-trigger svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Pull | closer to ∨: remove ::before left margin (was 5px).
     * Pull ⊞ closer to |: reduce ::before right margin (was 10px) and
     * remove per-button margin-left (was 10px each). */
    body.woocommerce-shop .shop_bar .shop-views::before {
        margin: 0 2px 0 0 !important;
    }

    body.woocommerce-shop .shop_bar .shop-views button {
        margin-left: 8px !important;
    }
}
