/* archive.css — shop/category page supplement */

.rs-shop-hero {
    display: grid;
    gap: 1rem;
    margin: clamp(1rem, 2vw, 1.75rem) 0 1.25rem;
    padding: clamp(1rem, 2.2vw, 1.5rem);
    border: 1px solid var(--rs-gray-200);
    border-radius: var(--rs-radius-lg);
    background: linear-gradient(135deg, #f6fbff 0%, #fff 58%, #eefaf6 100%);
}

.rs-shop-hero .page-title { margin: 0; font-size: clamp(1.65rem, 4vw, 2.45rem); }
.rs-shop-hero > p { max-width: 720px; margin: 0; color: var(--rs-text-muted); line-height: 1.9; }
.rs-shop-hero__search { max-width: 680px; }
.rs-shop-hero__search .woocommerce-product-search { display: flex; gap: .5rem; }
.rs-shop-hero__search input[type="search"] { min-width: 0; flex: 1; }
.rs-shop-hero__categories { display: flex; gap: .55rem; overflow-x: auto; padding: .15rem 0 .35rem; scrollbar-width: thin; }
.rs-shop-hero__categories a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; min-height: 40px; padding: .5rem .8rem; border: 1px solid var(--rs-gray-200); border-radius: 999px; background: #fff; color: var(--rs-gray-700); font-size: .82rem; font-weight: 800; }
.rs-shop-hero__categories a:hover { border-color: var(--rs-primary); color: var(--rs-primary); }
.rs-shop-hero__categories span { min-width: 1.45rem; padding: .05rem .3rem; border-radius: 999px; background: var(--rs-gray-100); color: var(--rs-text-muted); text-align: center; font-size: .7rem; }

.rs-catalog-filters { display: grid; gap: 1rem; }
.rs-catalog-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rs-catalog-filters__head strong { font-size: 1rem; }
.rs-catalog-filters__close { display: none; width: 40px; height: 40px; border: 1px solid var(--rs-gray-200); border-radius: 50%; background: #fff; color: var(--rs-gray-700); font-family: inherit; font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer; }
.rs-catalog-filter { min-width: 0; margin: 0; padding: 0 0 1rem; border: 0; border-bottom: 1px solid var(--rs-gray-200); }
.rs-catalog-filter legend { width: 100%; margin-bottom: .65rem; font-size: .85rem; font-weight: 900; }
.rs-catalog-filter__options { display: grid; gap: .35rem; }
.rs-catalog-filter label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: .5rem; align-items: center; min-height: 34px; color: var(--rs-gray-700); font-size: .82rem; cursor: pointer; }
.rs-catalog-filter input { width: 17px; height: 17px; margin: 0; accent-color: var(--rs-primary); }
.rs-catalog-filter small { color: var(--rs-text-muted); font-size: .7rem; }
.rs-catalog-filter__stock { grid-template-columns: 20px minmax(0, 1fr) !important; }
.rs-catalog-filters__actions { position: sticky; bottom: -.05rem; display: grid; gap: .55rem; padding-top: .75rem; background: #fff; text-align: center; }
.rs-catalog-filters__actions .rs-btn { width: 100%; }
.rs-catalog-filters__actions > a { color: var(--rs-text-muted); font-size: .78rem; font-weight: 800; }
.rs-active-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0 1rem; }
.rs-active-filters a { display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: .35rem .65rem; border: 1px solid var(--rs-primary-light); border-radius: 999px; background: #f3f8ff; color: var(--rs-primary); font-size: .75rem; font-weight: 800; }
.rs-active-filters .rs-active-filters__clear { border-color: transparent; background: transparent; color: var(--rs-text-muted); }

/* WooCommerce ordering / result count */
.woocommerce-ordering select {
    border: 1px solid var(--rs-gray-300);
    border-radius: var(--rs-radius);
    padding: .4rem .75rem;
    font-family: inherit;
    font-size: .85rem;
    background: var(--rs-white);
}

.woocommerce-result-count {
    font-size: .85rem;
    color: var(--rs-text-muted);
    margin: 0;
}

/* WooCommerce price filter widget */
.widget_price_filter .price_slider_wrapper {
    padding: .5rem 0;
}

.widget_price_filter .price_slider_amount .button {
    background: var(--rs-primary);
    color: #fff;
    border: none;
    border-radius: var(--rs-radius);
    padding: .4rem .9rem;
    font-family: inherit;
    font-size: .82rem;
    cursor: pointer;
}

/* Layered nav widget */
.widget_layered_nav ul li {
    margin-bottom: .35rem;
    font-size: .88rem;
}

.widget_layered_nav ul li a {
    color: var(--rs-gray-700);
    transition: color var(--rs-trans);
}

.widget_layered_nav ul li a:hover { color: var(--rs-primary); }

.widget_layered_nav ul li .count {
    color: var(--rs-text-muted);
    font-size: .78rem;
}

/* Active filters */
.woocommerce-widget-layered-nav-list__item--chosen a { color: var(--rs-primary); font-weight: 700; }

.rs-filter-toggle,
.rs-filter-backdrop { display: none; }

/* Mobile filter sidebar overlay */
@media (max-width: 768px) {
    .rs-shop-hero { margin-top: 1rem; padding: 1rem; }
    .rs-shop-hero__search .woocommerce-product-search { align-items: stretch; }
    .rs-shop-hero__search button { min-height: 44px; padding-inline: .85rem; }

    .rs-sidebar {
        display: none;
        position: fixed;
        top: 0; right: 0;
        width: 80vw;
        max-width: 320px;
        height: 100vh;
        background: var(--rs-white);
        z-index: 950;
        padding: 1.5rem;
        box-shadow: var(--rs-shadow-lg);
        overflow-y: auto;
    }

    .rs-sidebar.open { display: block; }
    .rs-catalog-filters__close { display: inline-grid; place-items: center; }

    .rs-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: .55rem .9rem;
        color: var(--rs-primary);
        border: 1px solid currentColor;
        border-radius: var(--rs-radius);
        background: var(--rs-white);
        font: inherit;
        font-size: .8rem;
        font-weight: 800;
        cursor: pointer;
    }

    .rs-filter-backdrop {
        position: fixed;
        z-index: 940;
        inset: 0;
        border: 0;
        background: rgba(4, 21, 34, .54);
        cursor: pointer;
    }

    .rs-filter-backdrop.open { display: block; }
    body.rs-filter-open { overflow: hidden; }
}
