/**
 * Copyright © Bonline. All rights reserved.
 * Layered Navigation Accordion Styles
 */

/* Main filter block styling */
.block.filter {
    margin-bottom: 2rem;
}

.block.filter .block-title {
    margin-bottom: 1rem;
}

/* Filter options container */
.filter-options {
    border-bottom: 1px solid #e4e4e4;
    margin-bottom: 0;
}

.filter-options:last-child {
    border-bottom: none;
}

/* Filter title styling - clickable headers */
.filter-options-title {
    cursor: pointer;
    position: relative;
    padding: 15px 30px 15px 15px;
    margin: 0;
    background: #f8f8f8;
    border: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-options-title:hover {
    background: #f0f0f0;
}

.filter-options-title:focus {
    outline: 2px solid #007bdb;
    outline-offset: -2px;
}

/* Arrow indicator for collapse/expand */
.filter-options-title::after {
    content: '\e81c';
    display: inline-block;
    font-family: 'porto-icons';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
}

/* Expanded state arrow */
.filter-options-title[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(0deg);
}

/* Filter content styling */
.filter-options-content {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e4e4e4;
    display: none; /* Start collapsed */
}

/* Default Filter items styling - Vertical List (for categories) */
.filter-options-content .items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-options-content .item {
    margin-bottom: 8px;
    padding: 0;
    border: none !important;
    display: block !important;
}

.filter-options-content .item:last-child {
    margin-bottom: 0;
}

.filter-options-content .item a {
    display: block;
    padding: 5px 0;
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
}

.filter-options-content .item a:hover {
    color: #007bdb;
}

/* Filter count styling */
.filter-options-content .count {
    display: none !important;
}

/* ========================================
   CATEGORY FILTERS - WITH THUMBNAILS
   ======================================== */

/* Category filter link styling */
.filter-type-category .filter-options-content .category-filter-link {
    display: flex;
    align-items: center;
    padding: 8px 0;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.filter-type-category .filter-options-content .category-filter-link:hover {
    color: #007bdb;
    background: #f8f9fa;
    padding-left: 5px;
    padding-right: 5px;
}

/* Category thumbnail styling */
.filter-type-category .filter-options-content .category-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

/* Category thumbnail placeholder for categories without images */
.filter-type-category .filter-options-content .category-thumbnail-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #f0f0f0;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    position: relative;
}

.filter-type-category .filter-options-content .category-thumbnail-placeholder::before {
    content: '\1F4C1'; /* Folder emoji */
    font-size: 16px;
    color: #999;
}

/* Category info container */
.filter-type-category .filter-options-content .category-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.filter-type-category .filter-options-content .category-info .label {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.filter-type-category .filter-options-content .category-info .count {
    font-size: 11px;
    color: #666;
    margin-left: 0;
}

/* ========================================
   ATTRIBUTE FILTERS - HORIZONTAL GRID LAYOUT
   ======================================== */

/* Horizontal Grid Layout for Product Attributes */
.filter-type-attribute .filter-options-content .items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* EXCEPTION: Brand Filter - Display Vertically Like Categories */
.filter-type-attribute .filter-options-content .am-ranges-brand .items,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    max-height: 400px !important;
    overflow-y: auto;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .item,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item {
    margin-bottom: 8px !important;
    display: block !important;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .item a,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item a {
    display: block !important;
    padding: 5px 0 !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: color 0.2s ease !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: left !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    min-height: auto !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .item a:hover,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item a:hover {
    color: #007bdb !important;
    border-color: transparent !important;
    background: transparent !important;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .item .label,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item .label {
    display: inline !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    font-size: 14px !important;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .count,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .count {
    color: #666 !important;
    font-size: 12px !important;
    margin-left: 5px !important;
    display: inline !important;
    font-weight: normal !important;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .filter-count-label,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .filter-count-label {
    display: inline !important;
}

/* Selected/Active brand filter item styling */
.filter-type-attribute .filter-options-content .am-ranges-brand .item.selected a,
.filter-type-attribute .filter-options-content .am-ranges-brand .item.active a,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item.selected a,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item.active a {
    background: transparent !important;
    color: #007bdb !important;
    border-color: transparent !important;
    font-weight: 600 !important;
}

.filter-type-attribute .filter-options-content .am-ranges-brand .item.selected a:hover,
.filter-type-attribute .filter-options-content .am-ranges-brand .item.active a:hover,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item.selected a:hover,
.filter-type-attribute .filter-options-content .items.am-filter-items-brand .item.active a:hover {
    background: transparent !important;
    border-color: transparent !important;
    color: #005a9e !important;
}

/* Attribute filter items styling */
.filter-type-attribute .filter-options-content .item {
    margin-bottom: 0;
}

/* General attribute filter styling (excluding brand) */
.filter-type-attribute .filter-options-content .item a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    min-height: 40px;
}

.filter-type-attribute .filter-options-content .item a:hover {
    color: #007bdb;
    border-color: #007bdb;
    background: #f0f8ff;
}

/* Filter labels and counts for attributes */
.filter-type-attribute .filter-options-content .item .label {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.filter-type-attribute .filter-options-content .count {
    color: #666;
    font-size: 10px;
    margin-left: 0;
    display: block;
    font-weight: normal;
}

.filter-type-attribute .filter-options-content .filter-count-label {
    display: none; /* Hide "items" text to save space */
}

/* Special styling for size/age filters with many options */
.filter-attribute-age2 .filter-options-content .item a,
.filter-attribute-size .filter-options-content .item a {
    min-height: 35px;
    padding: 6px 8px;
    font-size: 11px;
}

/* Custom scrollbar styling for attributes */
.filter-type-attribute .filter-options-content .items::-webkit-scrollbar {
    width: 6px;
}

.filter-type-attribute .filter-options-content .items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-type-attribute .filter-options-content .items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filter-type-attribute .filter-options-content .items::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Selected/Active filter item styling for attributes */
.filter-type-attribute .filter-options-content .item.selected a,
.filter-type-attribute .filter-options-content .item.active a {
    background: #007bdb;
    color: #fff;
    border-color: #007bdb;
}

.filter-type-attribute .filter-options-content .item.selected a:hover,
.filter-type-attribute .filter-options-content .item.active a:hover {
    background: #005a9e;
    border-color: #005a9e;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* Category thumbnails on mobile */
    .filter-type-category .filter-options-content .category-thumbnail,
    .filter-type-category .filter-options-content .category-thumbnail-placeholder {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }
    
    .filter-type-category .filter-options-content .category-thumbnail-placeholder::before {
        font-size: 14px;
    }
    
    .filter-type-category .filter-options-content .category-info .label {
        font-size: 13px;
    }
    
    .filter-type-category .filter-options-content .category-info .count {
        font-size: 10px;
    }
    
    /* Attribute filters on mobile - 3 columns like desktop */
    .filter-type-attribute .filter-options-content .items {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px;
        max-height: 180px;
    }
    
    .filter-type-attribute .filter-options-content .item a {
        padding: 6px 8px;
        font-size: 11px;
        min-height: 32px;
    }
    
    .filter-attribute-age2 .filter-options-content .item a,
    .filter-attribute-size .filter-options-content .item a {
        min-height: 30px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    /* Category thumbnails on small mobile */
    .filter-type-category .filter-options-content .category-thumbnail,
    .filter-type-category .filter-options-content .category-thumbnail-placeholder {
        width: 28px;
        height: 28px;
        margin-right: 8px;
    }
    
    .filter-type-category .filter-options-content .category-thumbnail-placeholder::before {
        font-size: 12px;
    }
    
    .filter-type-category .filter-options-content .category-info .label {
        font-size: 12px;
    }
    
    /* Attribute filters on small mobile - still 3 columns */
    .filter-type-attribute .filter-options-content .items {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px;
        max-height: 150px;
    }
    
    .filter-type-attribute .filter-options-content .item a {
        padding: 4px 6px;
        font-size: 10px;
        min-height: 28px;
    }
}

/* ========================================
   GENERAL STYLING
   ======================================== */

/* Clear all button styling */
.filter-actions {
    padding: 15px;
    border-top: 1px solid #e4e4e4;
    background: #f9f9f9;
}

.filter-clear {
    color: #007bdb;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.filter-clear:hover {
    color: #005a9e;
    text-decoration: underline;
}

/* Active filter state styling */
.filter-current {
    margin-bottom: 15px;
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
}

.filter-current .items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-current .item {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
}

.filter-current .action.remove {
    color: #d32f2f;
    text-decoration: none;
    margin-left: 5px;
    font-weight: bold;
}

.filter-current .action.remove:hover {
    color: #b71c1c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-options-title {
        padding: 12px 25px 12px 12px;
        font-size: 13px;
    }
    
    .filter-options-title::after {
        right: 12px;
        font-size: 11px;
    }
    
    .filter-options-content {
        padding: 12px;
    }
}

/* Accessibility improvements */
.filter-options-title[role="tab"] {
    border: none;
    width: 100%;
    text-align: left;
}

.filter-options-title[role="tab"]:focus {
    z-index: 1;
}

/* Animation for smooth expand/collapse */
.filter-options-content {
    overflow: hidden;
}

/* Ensure proper spacing in filter content */
.filter-options-content .filter-options-item {
    margin-bottom: 0;
}

/* Style for swatch filters */
.filter-options-content .swatch-attribute {
    margin-bottom: 10px;
}

.filter-options-content .swatch-option {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Price filter styling */
.filter-options-content .price-range {
    margin-bottom: 10px;
}

.filter-options-content .price-range input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Loading state */
.filter-options.loading .filter-options-content {
    opacity: 0.6;
    pointer-events: none;
}

/* EXCEPTION: Price Filter - Full Width Single Column */
.filter-type-attribute .filter-options-content .items.am-filter-items-price {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
    width: 100% !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-price .item {
    margin-bottom: 0 !important;
    display: block !important;
    width: 100% !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-price .item form {
    width: 100% !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-price .amshopby-slider-container {
    width: 100% !important;
    padding: 10px 15px !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-price .am-slider {
    width: 100% !important;
    margin: 10px 0 !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-price .amshopby-slider-display {
    width: 100% !important;
    text-align: center !important;
    margin-top: 10px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* EXCEPTION: Stock Filter - 2 Columns Layout */
.filter-type-attribute .filter-options-content .items.am-filter-items-stock {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item {
    margin-bottom: 0 !important;
    display: block !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item a {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 12px 8px !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: all 0.2s ease !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    background: #f9f9f9 !important;
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    min-height: 45px !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item a:hover {
    color: #007bdb !important;
    border-color: #007bdb !important;
    background: #f0f8ff !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item .label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    font-size: 13px !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .count {
    color: #666 !important;
    font-size: 11px !important;
    margin-left: 0 !important;
    font-weight: normal !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .filter-count-label {
    display: inline !important;
    font-size: 10px !important;
}

/* Selected/Active stock filter item styling */
.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item.selected a,
.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item.active a {
    background: #007bdb !important;
    color: #fff !important;
    border-color: #007bdb !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item.selected a:hover,
.filter-type-attribute .filter-options-content .items.am-filter-items-stock .item.active a:hover {
    background: #005a9e !important;
    border-color: #005a9e !important;
}

/* Mobile responsive for stock filter */
@media (max-width: 768px) {
    .filter-type-attribute .filter-options-content .items.am-filter-items-stock {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    .filter-type-attribute .filter-options-content .items.am-filter-items-stock .item a {
        padding: 10px 6px !important;
        font-size: 12px !important;
        min-height: 40px !important;
    }
}

@media (max-width: 480px) {
    .filter-type-attribute .filter-options-content .items.am-filter-items-stock {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
    }
    
    .filter-type-attribute .filter-options-content .items.am-filter-items-stock .item a {
        padding: 8px 4px !important;
        font-size: 11px !important;
        min-height: 35px !important;
    }
}

/* ========================================
   ON SALE TOGGLE BUTTON FILTER - AMASTY SPECIFIC
   ======================================== */

/* Target the specific Amasty on sale filter */
.filter-attribute-am_on_sale .filter-options-content {
    padding: 20px 15px !important;
    text-align: left;
}

/* Hide the default Amasty form structure for sale filter */
.filter-attribute-am_on_sale .filter-options-content .am-ranges {
    display: none !important;
}

/* Show Amasty form when toggle is active */
.filter-attribute-am_on_sale.sale-toggle-active .am-ranges {
    display: block !important;
}

/* Toggle button container */
.sale-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 8px 0;
}

/* Toggle switch styling */
.sale-toggle-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}

.sale-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.sale-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.sale-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Active state */
input:checked + .sale-toggle-slider {
    background-color: #28a745;
}

input:focus + .sale-toggle-slider {
    box-shadow: 0 0 1px #28a745;
}

input:checked + .sale-toggle-slider:before {
    transform: translateX(21px);
}

/* Toggle labels */
.sale-toggle-label {
    font-weight: 500;
    font-size: 12px;
    color: #333;
    user-select: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sale-toggle-label.active {
    color: #28a745;
}

.sale-toggle-label:hover {
    color: #007bdb;
}

/* Sale badge styling */
.sale-filter-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 4px rgba(238, 90, 36, 0.3);
    transition: all 0.3s ease;
    margin: 3px 0;
}

.sale-filter-badge::before {
    content: '🔥';
    margin-right: 4px;
    font-size: 11px;
}

.sale-filter-badge.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 1px 4px rgba(40, 167, 69, 0.3);
    transform: scale(1.05);
}

.sale-filter-badge.active::before {
    content: '✅';
}

/* Filter description with dynamic count */
.sale-filter-description {
    font-size: 11px;
    color: #666;
    text-align: left;
    margin-top: 6px;
    line-height: 1.3;
}

.sale-filter-count {
    font-weight: 600;
    color: #28a745;
}

/* Loading state styling */
.sale-filter-toggle.loading {
    opacity: 0.7;
    pointer-events: none;
}

.sale-filter-toggle.loading .sale-toggle-slider {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Integration with existing filter states */
.filter-attribute-am_on_sale.sale-toggle-active .filter-options-title:after {
    color: #28a745 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sale-filter-toggle {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
    }
    
    .sale-toggle-switch {
        width: 40px;
        height: 22px;
    }
    
    .sale-toggle-slider {
        border-radius: 22px;
    }
    
    .sale-toggle-slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .sale-toggle-slider:before {
        transform: translateX(18px);
    }
    
    .sale-filter-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .sale-toggle-label {
        font-size: 11px;
    }
}

/* EXCEPTION: Gender Filter - 2 Columns Layout */
.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item {
    margin-bottom: 0 !important;
    display: block !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item a {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 12px 8px !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: all 0.2s ease !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    background: #f9f9f9 !important;
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    min-height: 45px !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item a:hover {
    color: #007bdb !important;
    border-color: #007bdb !important;
    background: #f0f8ff !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item .label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    font-size: 13px !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .count {
    color: #666 !important;
    font-size: 11px !important;
    margin-left: 0 !important;
    display: block !important;
    font-weight: normal !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .filter-count-label {
    display: inline !important;
    font-size: 10px !important;
}

/* Selected/Active gender filter item styling */
.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item.selected a,
.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item.active a {
    background: #007bdb !important;
    color: #fff !important;
    border-color: #007bdb !important;
}

.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item.selected a:hover,
.filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item.active a:hover {
    background: #005a9e !important;
    border-color: #005a9e !important;
}

/* Mobile responsive for gender filter */
@media (max-width: 768px) {
    .filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    .filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item a {
        padding: 10px 6px !important;
        font-size: 12px !important;
        min-height: 40px !important;
    }
}

@media (max-width: 480px) {
    .filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
    }
    
    .filter-type-attribute .filter-options-content .items.am-filter-items-gender_2nd .item a {
        padding: 8px 4px !important;
        font-size: 11px !important;
        min-height: 35px !important;
    }
}

.filter-attribute-age2 .filter-options-content .item a,
.filter-type-attribute .filter-options-content .am-ranges-brand .item a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
    flex: 0 0 calc(33.333% - 5.33px);
    margin-right: 8px;
}

/* Shoe Size 3-Column Layout */
.filter-attribute-shoe_size .filter-options-content .am-filter-items-shoe_size {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.filter-attribute-shoe_size .filter-options-content .am-swatch-wrapper {
    flex: 0 0 calc(33.333% - 5.33px);
    margin: 0;
}

.filter-attribute-shoe_size .filter-options-content .am-swatch-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.filter-attribute-shoe_size .filter-options-content .swatch-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #333;
    font-size: 11px;
    min-height: 40px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-weight: 600;
}

.filter-options .swatch-option.text:hover {
    border: unset !important;
}

.filter-attribute-shoe_size .filter-options-content .am-swatch-wrapper.selected .swatch-option,
.filter-attribute-shoe_size .filter-options-content .swatch-option.selected {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* Alternative selector for dd.filter-options-content structure */
dd.filter-options-content .am-filter-items-shoe_size {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

dd.filter-options-content .am-swatch-wrapper {
    flex: 0 0 calc(33.333% - 5.33px);
    margin: 0;
}

dd.filter-options-content .am-swatch-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

dd.filter-options-content .swatch-option.text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border: 1px solid #dadada;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s ease;
    color: #777;
    font-size: 11px;
    font-weight: 400;
    line-height: 20px;
    min-height: 40px;
    min-width: 27.7px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    float: unset;
}

dd.filter-options-content .swatch-option.text:hover {
    border-color: #08c;
    color: #333;
}

dd.filter-options-content .am-swatch-wrapper.selected .swatch-option.text,
dd.filter-options-content .swatch-option.text.selected {
    border-color: #08c;
    color: #333;
}

@media (max-width: 768px) {
    .filter-attribute-shoe_size .filter-options-content .am-filter-items-shoe_size {
        gap: 6px;
    }
    
    .filter-attribute-shoe_size .filter-options-content .swatch-option {
        padding: 6px 8px;
        font-size: 12px;
        min-height: 32px;
    }
    
    /* Mobile styles for dd structure */
    dd.filter-options-content .am-filter-items-shoe_size {
        gap: 6px;
    }
    
    dd.filter-options-content .swatch-option.text {
        padding: 6px 4px;
        font-size: 10px;
        min-height: 32px;
    }
}

@media (max-width: 480px) {
    .filter-attribute-shoe_size .filter-options-content .am-filter-items-shoe_size {
        gap: 4px;
    }
    
    .filter-attribute-shoe_size .filter-options-content .swatch-option {
        padding: 4px 6px;
        font-size: 11px;
        min-height: 28px;
    }
    
    /* Small mobile styles for dd structure */
    dd.filter-options-content .am-filter-items-shoe_size {
        gap: 4px;
    }
    
    dd.filter-options-content .swatch-option.text {
        padding: 4px 4px;
        font-size: 9px;
        min-height: 28px;
    }
}

.sale-filter-badge {
    display: none !important;
}


