/* VIBRATO ARCHIVE - HOMEPAGE CONSISTENT */

.vibrato-archive-wrapper {
    background-color: var(--background-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    padding-bottom: 100px;
}

#vibrato-filters-top {
    scroll-margin-top: 120px;
    /* Offset for sticky header */
}

.vibrato-archive-wrapper .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1024px) {
    .vibrato-archive-wrapper .container {
        padding: 0 64px;
    }
}

/* --- HERO --- */
.archive-hero {
    padding: 80px 0 60px;
    background: var(--surface-alt);
    border-bottom: 1px solid rgba(16, 41, 31, 0.09);
    margin-bottom: 40px;
}

.archive-breadcrumb {
    margin-bottom: 15px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.archive-title {
    font-family: var(--font-display);
    font-size: 64px;
    font-style: normal;
    color: var(--text-main);
    line-height: 1;
    margin: 0;
}

.archive-desc {
    color: var(--text-muted);
    margin-top: 12px;
    max-width: 720px;
    font-size: 14px;
}

/* --- SUBCATEGORIES --- */
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.subcat-card {
    display: block;
    height: 180px;
    text-decoration: none;
}

.subcat-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    transition: 0.3s ease;
}

.subcat-card:hover .subcat-box-inner {
    border-color: var(--primary);
    background: var(--surface-strong);
    transform: translateY(-5px);
}

.subcat-img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.subcat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.subcat-name {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

/* --- MAIN LAYOUT --- */
@media (min-width: 1024px) {
    .archive-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 60px;
        align-items: flex-start;
    }

    .archive-sidebar {
        position: sticky;
        top: 160px;
        align-self: start;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        padding-right: 5px;
        scrollbar-width: auto;
        /* Ensure it's not too thin on Firefox */
        scrollbar-color: var(--text-soft) rgba(16, 41, 31, 0.09);
    }

    /* Chrome/Safari/Edge Scrollbar Styling */
    .archive-sidebar::-webkit-scrollbar {
        width: 8px;
        /* Wider for better visibility */
    }

    .archive-sidebar::-webkit-scrollbar-track {
        background: rgba(16, 41, 31, 0.04);
        border-radius: 4px;
    }

    .archive-sidebar::-webkit-scrollbar-thumb {
        background: var(--border-strong);
        /* Subtle default state */
        border-radius: 4px;
        border: 2px solid var(--surface-alt);
        /* Padding effect */
    }

    .archive-sidebar::-webkit-scrollbar-thumb:hover {
        background: var(--text-soft);
        /* Highlight on interaction */
    }

    /* Filter Actions (Apply/Reset) */
    .filter-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
        position: sticky;
        bottom: 0;
        background: var(--surface-alt);
        padding: 16px 0 4px;
        z-index: 10;
        border-top: 1px solid rgba(16, 41, 31, 0.09);
    }

    .filter-apply {
        background: var(--accent-gradient);
        color: var(--text-inverse);
        border: none;
        border-radius: 4px;
        padding: 14px 20px;
        font-size: 13px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .filter-apply:hover {
        background: var(--accent-gradient-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 41, 31, 0.3);
    }

    .filter-apply:active {
        transform: translateY(0);
    }

    .filter-reset {
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(16, 41, 31, 0.45);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        text-decoration: none;
        letter-spacing: 0.05em;
        transition: color 0.2s ease;
    }

    .filter-reset:hover {
        color: var(--text-main);
    }
}

/* --- PRODUCT GRID --- */
.archive-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    padding: 24px 0;
    list-style: none;
    margin: 0;
}

@media (min-width: 576px) {
    .archive-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .archive-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        padding: 40px 0;
    }
}

/* Force override Woo default widths/floats - increased specificity */
.vibrato-archive-wrapper .archive-products-grid .product,
.woocommerce .vibrato-archive-wrapper ul.products li.product,
.woocommerce-page .vibrato-archive-wrapper ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

/* Remove any potential pseudo elements on list items and the container itself that breaks layout */
.archive-products-grid::before,
.archive-products-grid::after,
.archive-products-grid .product::before,
.archive-products-grid .product::after {
    content: none !important;
    display: none !important;
}

/* --- PRODUCT CARD --- */
.vibrato-archive-wrapper .p-card,
.woocommerce .vibrato-archive-wrapper ul.products li.product.p-card,
.woocommerce-page .vibrato-archive-wrapper ul.products li.product.p-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    background: rgba(16, 41, 31, 0.03) !important;
    border: 1px solid rgba(16, 41, 31, 0.09) !important;
    border-radius: 4px !important;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}



.vibrato-archive-wrapper .p-card:hover {
    background: rgba(16, 41, 31, 0.06);
    border-color: rgba(16, 41, 31, 0.24);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.vibrato-archive-wrapper .p-img-box {
    position: relative;
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--surface-elevated);
}

.vibrato-archive-wrapper .p-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.7s;
}

.vibrato-archive-wrapper .p-card:hover .p-img-box img {
    transform: scale(1.05);
}

.vibrato-archive-wrapper .p-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vibrato-archive-wrapper .p-badge.sale {
    background: var(--primary);
    color: var(--text-inverse);
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    text-transform: uppercase;
}

.vibrato-archive-wrapper .p-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.vibrato-archive-wrapper .p-card:hover .p-overlay {
    opacity: 1;
}

.vibrato-archive-wrapper .p-zoom-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(16, 41, 31, 0.28);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.vibrato-archive-wrapper .p-zoom-btn .material-symbols-outlined {
    color: #fff;
}

.vibrato-archive-wrapper .p-title-wrapper {
    height: 64px;
    overflow: hidden;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.vibrato-archive-wrapper .p-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    font-family: var(--font-body);
}

.vibrato-archive-wrapper .p-title a {
    color: var(--text-main);
    text-decoration: none;
}

.vibrato-archive-wrapper .p-variants-slot {
    min-height: 16px;
    margin-bottom: 10px;
    overflow: hidden;
}

.vibrato-archive-wrapper .p-variant-note {
    display: inline-block;
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.vibrato-archive-wrapper .p-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
}

.vibrato-archive-wrapper .p-price ins {
    text-decoration: none;
    color: var(--text-main);
}

.vibrato-archive-wrapper .p-price del {
    font-size: 12px;
    color: var(--text-soft);
    margin-left: 6px;
    font-weight: 500;
    position: relative;
    padding-right: 18px;
    cursor: help;
}

.vibrato-archive-wrapper .p-price del::after {
    content: "i";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    background: var(--surface-elevated);
}


.vibrato-archive-wrapper .p-footer {
    display: flex;
    gap: 10px;
}

.vibrato-archive-wrapper .qty-box {
    display: flex;
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    border-radius: 2px;
}

.vibrato-archive-wrapper .qty-btn {
    width: 30px;
    background: none;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
}

.vibrato-archive-wrapper .qty-input {
    width: 30px;
    background: none;
    border: none;
    color: var(--text-main);
    text-align: center;
    font-weight: 700;
    -moz-appearance: textfield;
    appearance: textfield;
}

.vibrato-archive-wrapper .qty-input::-webkit-outer-spin-button,
.vibrato-archive-wrapper .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.vibrato-archive-wrapper .btn-buy-card {
    flex: 1;
    background: var(--accent-gradient);
    color: var(--text-inverse);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 2px;
    transition: 0.3s;
    height: 44px;
    padding: 0 16px;
}


.vibrato-archive-wrapper .btn-buy-card:hover {
    background: var(--emerald-dark);
    box-shadow: var(--shadow-emerald-sm);
}

/* --- CUSTOM FILTRATION SIDEBAR --- */
.archive-sidebar .widget {
    margin-bottom: 40px;
}

.archive-sidebar .widget-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-style: normal;
    color: var(--text-main);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

/* Woo widgets styling */
.archive-sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.archive-sidebar .widget a {
    color: var(--text-muted);
    font-size: 14px;
    transition: 0.3s;
    text-decoration: none;
}

.archive-sidebar .widget a:hover {
    color: var(--text-main);
}

.archive-sidebar .widget_layered_nav li,
.archive-sidebar .widget_layered_nav_filters li,
.archive-sidebar .widget_product_categories li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.archive-sidebar .widget_layered_nav li a,
.archive-sidebar .widget_product_categories li a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-sidebar .widget_layered_nav li a::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    background: var(--surface-strong);
    border-radius: 2px;
    display: inline-block;
}

.archive-sidebar .widget_layered_nav li.chosen a,
.archive-sidebar .widget_layered_nav_filters li a {
    color: var(--text-main);
    font-weight: 700;
}

.archive-sidebar .widget_layered_nav li.chosen a::before {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(16, 41, 31, 0.45);
}

.archive-sidebar .widget_layered_nav_filters li a::before {
    content: 'close';
    font-family: 'Material Symbols Outlined';
    font-size: 14px;
    color: var(--text-main);
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.archive-sidebar .widget_layered_nav_filters ul {
    gap: 8px;
}

.archive-sidebar .widget_layered_nav_filters li {
    justify-content: flex-start;
}

/* Woo price filter (jQuery UI or noUi fallback) */
.archive-sidebar .widget_price_filter .price_slider {
    margin: 20px 10px 30px;
}

.archive-sidebar .widget_price_filter .price_slider_wrapper {
    padding: 0;
}

.archive-sidebar .widget_price_filter .price_slider_amount {
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-sidebar .widget_price_filter .price_slider_amount .button {
    background: var(--emerald-luxury);
    color: var(--text-main);
    border: none;
    height: 40px;
    padding: 0 16px;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.archive-sidebar .widget_price_filter .price_label {
    color: var(--text-muted);
    font-size: 12px;
}

.archive-sidebar .widget_price_filter input {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.archive-sidebar .ui-slider,
.archive-sidebar .noUi-target {
    background: var(--surface-strong);
    border: none;
    box-shadow: none;
    height: 4px;
}

.archive-sidebar .ui-slider-range,
.archive-sidebar .noUi-connect {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(16, 41, 31, 0.38);
}

.archive-sidebar .ui-slider-handle,
.archive-sidebar .noUi-handle {
    border: none;
    background: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(16, 41, 31, 0.45);
    cursor: pointer;
    top: -6px;
}

/* Legacy Woo Filters (if still used) */
.archive-sidebar .widget_layered_nav_filters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 41, 31, 0.17);
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-main);
    border-radius: 3px;
    background: rgba(16, 41, 31, 0.09);
}

/* Custom filters */
.vibrato-filters {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-block {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
}

.filter-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-style: normal;
    color: var(--text-main);
    margin-bottom: 14px;
}

.filter-price {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.filter-price input {
    background: rgba(16, 41, 31, 0.06);
    border: 1px solid rgba(16, 41, 31, 0.17);
    color: var(--text-main);
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
}

.filter-price input:focus {
    border-color: rgba(16, 41, 31, 0.45);
    background: rgba(16, 41, 31, 0.11);
    box-shadow: 0 0 15px rgba(16, 41, 31, 0.09);
}

/* Hide number input arrows */
.filter-price input::-webkit-outer-spin-button,
.filter-price input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.filter-price input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.price-sep {
    color: var(--text-muted);
    font-size: 12px;
}

.price-range {
    position: relative;
    height: 48px;
    /* Increased touch area */
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.price-range-bg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(16, 41, 31, 0.28);
    /* More visible */
    border-radius: 2px;
    z-index: 1;
}

#price-range-highlight {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: #fff;
    /* Neutral white active range */
    z-index: 2;
    border-radius: 2px;
    pointer-events: none;
    /* Let clicks pass through to inputs */
}

.price-range input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    background: transparent;
    z-index: 3;
    margin: 0;
    padding: 0;
    height: 100%;
    /* Fix visibility */
    margin: 0;
    padding: 0;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    /* Neutral white thumb */
    border: 1px solid rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: -8px;
    /* Center partially */
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.price-range input[type="range"]::-webkit-slider-runnable-track {
    height: 0;
    background: transparent;
}

.price-range input[type="range"]::-moz-range-track {
    height: 0;
    background: transparent;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-block-async.is-loading .filter-options {
    opacity: 0.72;
}

.filter-loading {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.filter-loading::after {
    content: '...';
    display: inline-block;
    animation: vibratoFilterDots 1.1s infinite;
    width: 16px;
    overflow: hidden;
    vertical-align: bottom;
}

.filter-load-error {
    font-size: 12px;
    color: #9f3a3a;
}

@keyframes vibratoFilterDots {
    0% { width: 0; }
    100% { width: 16px; }
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.filter-option input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(16, 41, 31, 0.17);
    border-radius: 3px;
    background: rgba(16, 41, 31, 0.06);
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.filter-option input:hover {
    border-color: rgba(16, 41, 31, 0.35);
}

.filter-option input:checked {
    background: var(--primary, #990000);
    border-color: var(--primary, #990000);
    box-shadow: 0 0 10px rgba(16, 41, 31, 0.30);
}

.filter-option input:checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-option .filter-label {
    color: var(--text-main);
}

.filter-option:hover .filter-label {
    color: var(--primary);
}

.filter-label {
    flex: 1;
    color: var(--text-main);
}

.filter-count {
    color: var(--text-muted);
    font-size: 11px;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-apply {
    background: var(--primary);
    color: var(--text-inverse);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    border-radius: 2px;
    padding: 12px 16px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-apply:hover {
    background: #b31212;
    box-shadow: 0 0 18px rgba(16, 41, 31, 0.38);
}

.filter-reset {
    color: var(--text-muted);
    text-align: center;
    text-decoration: underline;
    font-size: 12px;
}

/* --- PAGINATION --- */
.vibrato-pagination {
    margin-top: 100px;
    padding-top: 50px;
    border-top: 1px solid rgba(16, 41, 31, 0.09);
    text-align: center;
}

/* Override WooCommerce defaults strictly */
.vibrato-pagination .woocommerce-pagination,
.vibrato-pagination ul.page-numbers {
    border: none !important;
    margin: 0 !important;
    display: inline-flex !important;
    gap: 40px;
    list-style: none !important;
}

.vibrato-pagination ul.page-numbers li {
    float: none !important;
    border: none !important;
    margin: 0 !important;
    overflow: visible !important;
}

.vibrato-pagination ul.page-numbers li a,
.vibrato-pagination ul.page-numbers li span {
    background: transparent !important;
    border: none !important;
    color: var(--text-soft) !important;
    font-family: var(--font-body);
    font-size: 20px !important;
    font-weight: 800 !important;
    padding: 0 !important;
    min-width: auto !important;
    display: block !important;
    line-height: 1.5 !important;
    transition: 0.3s;
}

.vibrato-pagination ul.page-numbers li span.current {
    color: var(--text-main) !important;
    background: transparent !important;
    position: relative;
}

.vibrato-pagination ul.page-numbers li span.current::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(16, 41, 31, 0.45);
}

.vibrato-pagination ul.page-numbers li a:hover {
    color: var(--text-main) !important;
    background: transparent !important;
    transform: translateY(-2px);
}

/* Toolbar (result count + sorting) */
.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(16, 41, 31, 0.09);
}

.archive-toolbar .result-count {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.filter-toggle {
    display: none;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    border-radius: 2px;
    cursor: pointer;
}

.archive-toolbar .v-sorting select {
    background: var(--surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 8px 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Empty state */
.archive-empty {
    padding: 40px 0;
    color: var(--text-muted);
}

.archive-empty-title {
    font-size: 14px;
    margin-bottom: 12px;
}

.archive-empty-reset {
    color: var(--text-main);
    text-decoration: underline;
}

/* Mobile filters off-canvas */
.archive-filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.2s;
    z-index: 9998;
}

@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }

    .archive-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: 100vw;
        background: var(--surface-alt);
        padding: 0 24px 24px;
        /* Removed top padding to allow sticky header to touch top */
        transform: translateX(-100%);
        pointer-events: none;
        transition: transform 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 24px;
        position: sticky;
        top: 0;
        background: var(--surface-alt);
        padding: 24px 0 15px;
        /* Added internal padding instead of sidebar padding */
        z-index: 10;
        border-bottom: 1px solid rgba(16, 41, 31, 0.09);
        display: flex !important;
        /* Force visibility */
    }

    .sidebar-mobile-title {
        font-family: var(--font-display);
        font-size: 24px;
        font-style: normal;
        color: var(--text-main);
    }

    .filter-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(16, 41, 31, 0.09);
        border: 1px solid rgba(16, 41, 31, 0.17);
        color: var(--text-main);
        font-size: 20px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex !important;
        /* Force visibility */
    }

    .filter-close:active {
        transform: scale(0.9);
        background: rgba(16, 41, 31, 0.17);
    }

    .filter-toggle-wrapper {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .filter-reset-inline {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: rgba(16, 41, 31, 0.45);
        text-decoration: underline;
        text-underline-offset: 3px;
        transition: color 0.2s ease;
    }

    .filter-reset-inline:hover {
        color: var(--text-main);
    }

    .filter-toggle {
        display: inline-flex;
    }

    .filter-actions {
        position: sticky;
        bottom: -24px;
        /* compensate sidebar padding */
        margin-top: 30px;
        margin-left: -24px;
        margin-right: -24px;
        padding: 20px 24px;
        background: var(--surface-alt);
        z-index: 10;
        border-top: 1px solid rgba(16, 41, 31, 0.09);
        box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5);
    }

    body.filters-open .archive-sidebar {
        transform: translateX(0);
        pointer-events: auto;
    }

    body.filters-open .archive-filters-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.filters-open {
        overflow: hidden;
    }
}

.sidebar-mobile-header,
.filter-close {
    display: none;
}

@media (max-width: 600px) {
    .vibrato-pagination ul.page-numbers {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .vibrato-pagination ul.page-numbers li a,
    .vibrato-pagination ul.page-numbers li span {
        font-size: 16px;
    }

    .archive-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .archive-toolbar .v-sorting {
        flex: 1 1 100%;
        order: 1;
    }

    .archive-toolbar .result-count {
        flex: 1 1 100%;
        order: 2;
    }

    .archive-toolbar .v-sorting .orderby,
    .archive-toolbar .v-sorting select {
        width: 100%;
        max-width: 100%;
    }
}

/* Woo product grid + cards */

/* Cleaned up redundant styles that were breaking the grid */
