/* ============================================================
   Energishop — Archive / Shop / Category / Search Styles
   Prefix: esh-  |  Colors: #111 / #FFD100 / #FFF
   Targets WooCommerce + Astra default markup
   ============================================================ */

/* ---- Tokens (reuse from esh-home) ---- */
:root {
    --esh-black: #111;
    --esh-yellow: #FFD100;
    --esh-white: #FFF;
    --esh-gray-50: #FAFAFA;
    --esh-gray-100: #F5F5F5;
    --esh-gray-200: #E5E5E5;
    --esh-gray-400: #A3A3A3;
    --esh-gray-600: #525252;
    --esh-gray-800: #262626;
    --esh-radius: 12px;
    --esh-radius-sm: 8px;
    --esh-shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --esh-shadow-md: 0 4px 20px rgba(0,0,0,.08);
    --esh-shadow-lg: 0 8px 40px rgba(0,0,0,.12);
    --esh-transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   LAYOUT — Full-width, force container widths, kill sidebar
   ============================================================ */

/* ============================================================
   SHOP CATEGORIES CAROUSEL
   ============================================================ */
.esh-shop-cats {
    margin: 16px 0 24px;
    overflow: hidden;
}

.esh-shop-cats__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--esh-gray-200) transparent;
}

.esh-shop-cats__track::-webkit-scrollbar {
    height: 6px;
}

.esh-shop-cats__track::-webkit-scrollbar-track {
    background: transparent;
}

.esh-shop-cats__track::-webkit-scrollbar-thumb {
    background: var(--esh-gray-200);
    border-radius: 3px;
}

.esh-shop-cats__card {
    flex: 0 0 160px;
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    text-decoration: none;
    color: var(--esh-gray-800);
    border-radius: var(--esh-radius);
    background: var(--esh-white);
    border: 1px solid var(--esh-gray-200);
    scroll-snap-align: start;
    transition: box-shadow var(--esh-transition), transform var(--esh-transition);
    overflow: hidden;
}

.esh-shop-cats__card:hover {
    box-shadow: var(--esh-shadow-md);
    transform: translateY(-2px);
    color: var(--esh-black);
}

.esh-shop-cats__img-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--esh-gray-100);
    margin-bottom: 8px;
}

.esh-shop-cats__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.esh-shop-cats__img-wrap .esh-shop-cats__placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

.esh-shop-cats__name {
    font-size: .82rem !important;
    font-weight: 700;
    color: var(--esh-black);
    line-height: 1.3;
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.esh-shop-cats__count {
    font-size: .75rem;
    color: var(--esh-gray-400);
    line-height: 1;
}

@media (max-width: 600px) {
    .esh-shop-cats__card {
        min-width: 100px;
        max-width: 120px;
        padding: 10px 12px 12px;
    }

    .esh-shop-cats__img-wrap {
        width: 64px;
        height: 64px;
    }

    .esh-shop-cats__name {
        font-size: 12px;
    }
}

/* ============================================================
   LAYOUT — Full-width, force container widths, kill sidebar (contd)
   ============================================================ */
.woocommerce-page:not(.home) .site-content,
.archive .site-content,
.search-results .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.woocommerce-page:not(.home) .site-main,
.archive .site-main,
.search-results .site-main {
    padding-top: 8px !important;
}

.woocommerce-page:not(.home) .ast-container,
.archive .ast-container,
.search-results .ast-container {
    max-width: 1340px !important;
    margin: 0 auto;
    padding: 0 24px;
    display: block !important;
}

.woocommerce-page:not(.home) #primary,
.archive #primary,
.search-results #primary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Kill sidebar on all archive pages */
.woocommerce-page:not(.home) #secondary,
.archive #secondary,
.search-results #secondary,
.ast-left-sidebar #secondary,
.ast-right-sidebar #secondary {
    display: none !important;
    width: 0 !important;
}

/* Override Astra sidebar layout on archives */
.woocommerce-page.ast-left-sidebar #primary,
.woocommerce-page.ast-right-sidebar #primary,
.archive.ast-left-sidebar #primary,
.archive.ast-right-sidebar #primary {
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.woocommerce-page:not(.home) .site-content,
.archive .site-content,
.search-results .site-content {
    padding-top: 0 !important;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.woocommerce-breadcrumb {
    font-size: .82rem !important;
    color: var(--esh-gray-400) !important;
    padding: 20px 0 8px !important;
    margin: 0 0 4px !important;
    border: none !important;
    letter-spacing: .01em;
}
.woocommerce-breadcrumb a {
    color: var(--esh-gray-600) !important;
    text-decoration: none !important;
    transition: var(--esh-transition);
}
.woocommerce-breadcrumb a:hover {
    color: var(--esh-black) !important;
}

/* ============================================================
   PAGE HEADER — Title + Result Count + Ordering
   ============================================================ */
.woocommerce-products-header,
.page-header {
    margin-bottom: 24px !important;
}

.woocommerce-products-header__title.page-title,
.page-title,
.ast-archive-title {
    font-size: clamp(1.5rem, 3vw, 2rem) !important;
    font-weight: 800 !important;
    color: var(--esh-black) !important;
    margin: 0 0 4px !important;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.term-description,
.taxonomy-description {
    font-size: .92rem;
    color: var(--esh-gray-600);
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 640px;
}

/* Top Bar — count + ordering */
.ast-woocommerce-container > .woocommerce-result-count,
.ast-woocommerce-container > .woocommerce-ordering {
    margin-bottom: 20px !important;
}

.woocommerce-result-count {
    font-size: .84rem !important;
    color: var(--esh-gray-400) !important;
    margin: 0 !important;
    line-height: 40px;
}

.woocommerce-ordering {
    margin: 0 0 0 auto !important;
}

.woocommerce-ordering .orderby {
    appearance: none;
    -webkit-appearance: none;
    background: var(--esh-white);
    border: 1.5px solid var(--esh-gray-200);
    border-radius: var(--esh-radius-sm);
    padding: 8px 40px 8px 14px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--esh-black);
    cursor: pointer;
    transition: var(--esh-transition);
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.woocommerce-ordering .orderby:focus {
    border-color: var(--esh-yellow);
    box-shadow: 0 0 0 3px rgba(255,209,0,.15);
}

/* ============================================================
   PRODUCT GRID — WooCommerce products list
   ============================================================ */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 40px !important;
    float: none !important;
    width: 100% !important;
    clear: both !important;
}

ul.products::before,
ul.products::after {
    display: none !important;
}

ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: var(--esh-radius);
    background: var(--esh-white);
    border: 1px solid var(--esh-gray-200);
    overflow: hidden;
    transition: var(--esh-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: var(--esh-shadow-md);
    border-color: var(--esh-yellow);
}

/* Product Image */
ul.products li.product .astra-shop-thumbnail-wrap,
ul.products li.product > a > img,
ul.products li.product .woocommerce-LoopProduct-link > img {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--esh-gray-50);
    display: block;
}

ul.products li.product .astra-shop-thumbnail-wrap {
    position: relative;
}

ul.products li.product .astra-shop-thumbnail-wrap img,
ul.products li.product > a > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 16px;
    transition: transform .4s ease;
    display: block;
}

ul.products li.product:hover .astra-shop-thumbnail-wrap img,
ul.products li.product:hover > a > img {
    transform: scale(1.06);
}

/* Product Info */
ul.products li.product .astra-shop-summary-wrap {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

ul.products li.product .ast-woo-product-category {
    font-size: .72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--esh-gray-400) !important;
    margin-bottom: 4px;
    display: block;
}

ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
    font-size: .88rem !important;
    font-weight: 600 !important;
    color: var(--esh-black) !important;
    line-height: 1.35 !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

ul.products li.product .price {
    font-size: .95rem !important;
    font-weight: 800 !important;
    color: var(--esh-black) !important;
    margin: 0 0 8px !important;
    display: block;
}

ul.products li.product .price del {
    color: var(--esh-gray-400) !important;
    font-weight: 500 !important;
    font-size: .8rem !important;
    opacity: .7;
}

ul.products li.product .price ins {
    text-decoration: none !important;
    color: var(--esh-black) !important;
}

ul.products li.product .price .woocommerce-Price-currencySymbol {
    font-weight: 600;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.added_to_cart,
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .ajax_add_to_cart {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    display: block !important;
    width: calc(100% - 24px) !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: auto 12px 12px !important;
    padding: 9px 12px !important;
    background: var(--esh-black) !important;
    color: var(--esh-yellow) !important;
    font-size: .75rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: var(--esh-transition) !important;
    text-decoration: none !important;
    letter-spacing: .02em;
    line-height: 1.5 !important;
}

ul.products li.product:hover .button,
ul.products li.product:hover .add_to_cart_button {
    background: var(--esh-yellow) !important;
    color: var(--esh-black) !important;
}

ul.products li.product .button.loading::after {
    border-color: var(--esh-black) transparent transparent transparent !important;
}

ul.products li.product .button.added::after {
    display: none !important;
}

ul.products li.product .added_to_cart {
    display: block !important;
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    color: var(--esh-yellow);
    margin: -8px 16px 12px;
    text-decoration: none;
}

/* Sale Badge */
ul.products li.product .onsale,
ul.products li.product span.onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    background: var(--esh-black) !important;
    color: var(--esh-yellow) !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    line-height: 1.4 !important;
    min-width: auto !important;
    min-height: auto !important;
    z-index: 2;
}

/* Out of Stock */
ul.products li.product.outofstock .astra-shop-thumbnail-wrap::after {
    content: 'Esgotado';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .88rem;
    font-weight: 700;
    color: var(--esh-gray-600);
    text-transform: uppercase;
    letter-spacing: .05em;
    z-index: 2;
}

/* Star Rating */
ul.products li.product .star-rating {
    margin: 0 0 6px 16px !important;
    font-size: .75rem !important;
    color: var(--esh-yellow) !important;
}

/* ============================================================
   CATEGORY CARDS — li.product-category items in shop grid
   ============================================================ */
ul.products li.product-category {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: var(--esh-radius);
    background: var(--esh-white);
    border: 1px solid var(--esh-gray-200);
    overflow: hidden;
    transition: var(--esh-transition);
    text-align: center;
}

ul.products li.product-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--esh-shadow-md);
    border-color: var(--esh-yellow);
}

ul.products li.product-category a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 0;
    text-decoration: none !important;
    color: inherit !important;
}

ul.products li.product-category a img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: contain !important;
    background: var(--esh-gray-100);
    border-radius: var(--esh-radius-sm) var(--esh-radius-sm) 0 0;
    padding: 16px !important;
    transition: transform .4s ease;
    display: block;
}

/* WooCommerce placeholder icon — make it presentable */
ul.products li.product-category a img[src*="placeholder"],
ul.products li.product-category a img[src*="woocommerce-placeholder"] {
    object-fit: contain !important;
    padding: 24px !important;
    background: var(--esh-gray-100);
    border-bottom: 2px dashed var(--esh-gray-200);
    opacity: .4;
}

/* Placeholder fallback — imagem faltando */
ul.products li.product-category a:has(img[src*="placeholder"]),
ul.products li.product-category a:has(img:not([src])) {
    position: relative;
}

ul.products li.product-category:hover a img {
    transform: scale(1.05);
}

ul.products li.product-category .woocommerce-loop-category__title {
    font-size: .92rem !important;
    font-weight: 700 !important;
    color: var(--esh-black) !important;
    margin: 0 !important;
    padding: 12px 16px 16px !important;
    line-height: 1.3;
}

ul.products li.product-category .woocommerce-loop-category__title .count,
ul.products li.product-category .woocommerce-loop-category__title mark.count {
    display: block !important;
    font-size: .76rem !important;
    font-weight: 500 !important;
    color: var(--esh-gray-400) !important;
    background: none !important;
    margin-top: 4px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.woocommerce nav.woocommerce-pagination,
nav.woocommerce-pagination {
    margin: 40px 0 60px !important;
    text-align: center;
}

.woocommerce-pagination ul.page-numbers,
.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex !important;
    gap: 8px !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.woocommerce-pagination ul.page-numbers li,
.woocommerce nav.woocommerce-pagination ul li {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-pagination .page-numbers,
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px !important;
    border-radius: var(--esh-radius-sm) !important;
    border: 1.5px solid var(--esh-gray-200) !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
    color: var(--esh-black) !important;
    background: var(--esh-white) !important;
    text-decoration: none !important;
    transition: var(--esh-transition) !important;
    line-height: 1 !important;
}

.woocommerce-pagination .page-numbers:hover,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    border-color: var(--esh-yellow) !important;
    background: rgba(255,209,0,.06) !important;
}

.woocommerce-pagination .page-numbers.current,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--esh-black) !important;
    color: var(--esh-yellow) !important;
    border-color: var(--esh-black) !important;
}

.woocommerce-pagination .page-numbers.dots {
    border-color: transparent !important;
    background: transparent !important;
    cursor: default;
}

/* ============================================================
   SEARCH RESULTS — Product Search
   ============================================================ */

/* Search form on results page */
.search-results .ast-search-menu-icon .search-field,
.woocommerce-product-search .search-field {
    border-radius: var(--esh-radius-sm) !important;
    border: 1.5px solid var(--esh-gray-200) !important;
    padding: 10px 16px !important;
    font-size: .9rem !important;
    transition: var(--esh-transition);
}

.woocommerce-product-search .search-field:focus {
    border-color: var(--esh-yellow) !important;
    box-shadow: 0 0 0 3px rgba(255,209,0,.15) !important;
    outline: none;
}

.woocommerce-product-search button[type="submit"] {
    background: var(--esh-yellow) !important;
    color: var(--esh-black) !important;
    border: none !important;
    border-radius: var(--esh-radius-sm) !important;
    padding: 10px 20px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: var(--esh-transition);
}

.woocommerce-product-search button[type="submit"]:hover {
    background: var(--esh-black) !important;
    color: var(--esh-yellow) !important;
}

/* No results */
.woocommerce-info,
.no-results .page-content p {
    background: var(--esh-gray-50) !important;
    border: 1px solid var(--esh-gray-200) !important;
    border-left: 4px solid var(--esh-yellow) !important;
    border-top: none !important;
    color: var(--esh-gray-600) !important;
    padding: 16px 20px !important;
    border-radius: var(--esh-radius-sm) !important;
    font-size: .9rem !important;
    margin: 0 0 24px !important;
}

.woocommerce-info::before {
    color: var(--esh-yellow) !important;
}

/* ============================================================
   CATEGORY ARCHIVE HEADER — when inside a specific category
   ============================================================ */
.tax-product_cat .woocommerce-products-header,
.tax-product_cat .ast-archive-description {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--esh-gray-200);
}

/* ============================================================
   ASTRA OVERRIDES — Clean up default Astra WooCommerce styles
   ============================================================ */

/* Remove Astra's default product card styles */
.ast-separate-container ul.products li.product,
.ast-separate-container ul.products li.product-category {
    background: var(--esh-white) !important;
    padding: 0 !important;
}

.ast-separate-container .ast-woocommerce-container {
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.ast-separate-container .ast-article-post {
    background: transparent !important;
    padding: 0 !important;
}

/* Fix Astra grid overrides */
.ast-woo-shop-archive ul.products li.product,
.columns-4 ul.products li.product {
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove page builder extra padding */
.ast-page-builder-template .ast-woocommerce-container {
    padding-left: 24px;
    padding-right: 24px;
}

/* Remove Astra's star colors override */
.woocommerce ul.products li.product .star-rating::before {
    color: var(--esh-gray-200) !important;
}
.woocommerce ul.products li.product .star-rating span::before {
    color: var(--esh-yellow) !important;
}

/* ============================================================
   NOTICES — WooCommerce cart/add messages
   ============================================================ */
.woocommerce-notices-wrapper .woocommerce-message {
    background: var(--esh-gray-50) !important;
    border: 1px solid var(--esh-gray-200) !important;
    border-left: 4px solid var(--esh-yellow) !important;
    border-top-color: var(--esh-gray-200) !important;
    color: var(--esh-black) !important;
    padding: 14px 20px !important;
    border-radius: var(--esh-radius-sm) !important;
    font-size: .88rem !important;
    line-height: 1.5;
}

.woocommerce-notices-wrapper .woocommerce-message::before {
    color: var(--esh-yellow) !important;
}

.woocommerce-notices-wrapper .woocommerce-message a {
    color: var(--esh-black) !important;
    font-weight: 700;
    text-decoration: none;
}

.woocommerce-notices-wrapper .woocommerce-message a:hover {
    color: var(--esh-yellow) !important;
}

/* ============================================================
   ACTIVE FILTERS / WIDGET AREA OVERRIDES
   ============================================================ */
.widget_layered_nav ul li a,
.widget_product_categories ul li a {
    color: var(--esh-gray-600);
    text-decoration: none;
    font-size: .88rem;
    transition: var(--esh-transition);
}

.widget_layered_nav ul li a:hover,
.widget_product_categories ul li a:hover {
    color: var(--esh-black);
}

.widget_layered_nav ul li .count,
.widget_product_categories ul li .count {
    color: var(--esh-gray-400);
    font-size: .78rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    .woocommerce-products-header__title.page-title,
    .page-title,
    .ast-archive-title {
        font-size: 1.4rem !important;
    }

    ul.products li.product .astra-shop-summary-wrap {
        padding: 10px 12px 14px;
    }

    ul.products li.product .woocommerce-loop-product__title,
    ul.products li.product h2 {
        font-size: .82rem !important;
    }

    ul.products li.product .price {
        font-size: .88rem !important;
    }

    ul.products li.product .button,
    ul.products li.product .add_to_cart_button {
        width: calc(100% - 24px) !important;
        margin: auto 12px 12px !important;
        padding: 8px 12px !important;
        font-size: .78rem !important;
    }

    ul.products li.product-category a img {
        padding: 12px !important;
    }

    ul.products li.product-category .woocommerce-loop-category__title {
        font-size: .82rem !important;
    }

    .woocommerce-pagination .page-numbers,
    .woocommerce nav.woocommerce-pagination ul li a,
    .woocommerce nav.woocommerce-pagination ul li span {
        min-width: 36px;
        height: 36px;
        font-size: .8rem !important;
    }

    .woocommerce-page:not(.home) .ast-container,
    .archive .ast-container,
    .search-results .ast-container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    ul.products li.product .astra-shop-thumbnail-wrap img,
    ul.products li.product > a > img {
        padding: 10px;
    }

    ul.products li.product .astra-shop-summary-wrap {
        padding: 8px 10px 12px;
    }

    ul.products li.product .woocommerce-loop-product__title,
    ul.products li.product h2 {
        font-size: .78rem !important;
    }

    ul.products li.product .ast-woo-product-category {
        font-size: .68rem !important;
    }

    ul.products li.product .price {
        font-size: .82rem !important;
        margin-bottom: 8px !important;
    }

    ul.products li.product .button,
    ul.products li.product .add_to_cart_button {
        width: calc(100% - 20px) !important;
        margin: auto 10px 10px !important;
        padding: 8px 10px !important;
        font-size: .74rem !important;
    }
}

/* ============================================================
   AJAX FILTERS — Layout, Panel, Controls
   ============================================================ */

/* ---- Archive Layout: Sidebar + Content grid ---- */
.esh-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 8px;
}

.esh-archive-content {
    min-width: 0;
}

/* ---- Top Bar: toggle + count + ordering ---- */
.esh-archive-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.esh-archive-topbar .woocommerce-result-count {
    margin: 0 !important;
    line-height: 40px;
}

.esh-archive-topbar .woocommerce-ordering {
    margin: 0 0 0 auto !important;
}

/* ---- Filter toggle button (mobile-visible) ---- */
.esh-filters__toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--esh-white);
    border: 1.5px solid var(--esh-gray-200);
    border-radius: 50px;
    font-size: .84rem;
    font-weight: 600;
    color: var(--esh-black);
    cursor: pointer;
    transition: var(--esh-transition);
    white-space: nowrap;
}

.esh-filters__toggle:hover {
    border-color: var(--esh-yellow);
    background: rgba(255,209,0,.04);
}

.esh-filters__toggle:active {
    transform: scale(.97);
}

.esh-filters__toggle svg {
    flex-shrink: 0;
}

.esh-filters__active-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--esh-yellow);
    color: var(--esh-black);
    font-size: .72rem;
    font-weight: 800;
    border-radius: 50px;
    line-height: 1;
}

/* ---- Filter Panel (aside) ---- */
.esh-filters {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border: 1px solid var(--esh-gray-200);
    border-radius: var(--esh-radius);
    background: var(--esh-white);
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--esh-gray-200) transparent;
}

.esh-filters::-webkit-scrollbar {
    width: 4px;
}

.esh-filters::-webkit-scrollbar-thumb {
    background: var(--esh-gray-200);
    border-radius: 4px;
}

/* Header */
.esh-filters__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--esh-gray-200);
    position: sticky;
    top: 0;
    background: var(--esh-white);
    z-index: 2;
    border-radius: var(--esh-radius) var(--esh-radius) 0 0;
}

.esh-filters__title {
    font-size: .92rem;
    font-weight: 800;
    color: var(--esh-black);
    margin: 0;
    letter-spacing: -.01em;
}

.esh-filters__clear {
    display: none;
    margin-left: auto;
    padding: 4px 12px;
    background: none;
    border: 1px solid var(--esh-gray-200);
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--esh-gray-600);
    cursor: pointer;
    transition: var(--esh-transition);
    white-space: nowrap;
}

.esh-filters__clear:hover {
    border-color: var(--esh-black);
    color: var(--esh-black);
}

.esh-filters__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--esh-gray-600);
    border-radius: 50%;
    transition: var(--esh-transition);
    padding: 0;
    margin-left: auto;
}

.esh-filters__close:hover {
    background: var(--esh-gray-100);
    color: var(--esh-black);
}

/* Body */
.esh-filters__body {
    padding: 4px 0;
}

/* ---- Filter Group (accordion) ---- */
.esh-filters__group {
    border-bottom: 1px solid var(--esh-gray-100);
}

.esh-filters__group:last-child {
    border-bottom: none;
}

.esh-filters__group--hidden {
    display: none;
}

.esh-filters__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    font-size: .84rem;
    font-weight: 700;
    color: var(--esh-black);
    cursor: pointer;
    transition: var(--esh-transition);
    text-align: left;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.esh-filters__group-toggle:hover {
    background: var(--esh-gray-50);
    color: var(--esh-black);
}

.esh-filters__group-toggle:focus,
.esh-filters__group-toggle:focus-visible {
    outline: none;
    box-shadow: none;
}

.esh-filters__group-toggle svg {
    flex-shrink: 0;
    transition: transform .25s ease;
}

.esh-filters__group-toggle--active svg {
    transform: rotate(180deg);
}

/* Group body (collapsible) */
.esh-filters__group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    padding: 0 20px;
}

.esh-filters__group-body--open {
    max-height: 500px;
    padding: 0 20px 14px;
    overflow-y: auto;
}

/* ---- Skeleton loading inside groups ---- */
.esh-filters__skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.esh-filters__skeleton span {
    display: block;
    height: 18px;
    background: var(--esh-gray-100);
    border-radius: 4px;
    animation: esh-skeleton-pulse 1.2s ease-in-out infinite;
}

.esh-filters__skeleton span:nth-child(1) { width: 80%; }
.esh-filters__skeleton span:nth-child(2) { width: 60%; }
.esh-filters__skeleton span:nth-child(3) { width: 70%; }

@keyframes esh-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ---- Custom Checkboxes ---- */
.esh-filters__checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    font-size: .82rem;
    color: var(--esh-gray-800);
    transition: var(--esh-transition);
    line-height: 1.3;
}

.esh-filters__checkbox--child {
    padding-left: 20px;
}

.esh-filters__checkbox:hover {
    color: var(--esh-black);
}

.esh-filters__checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.esh-filters__check-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--esh-gray-200);
    border-radius: 4px;
    background: var(--esh-white);
    transition: var(--esh-transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esh-filters__check-icon::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: var(--esh-yellow);
    border-radius: 2px;
    transform: scale(0);
    transition: transform .2s ease;
}

.esh-filters__checkbox input[type="checkbox"]:checked ~ .esh-filters__check-icon {
    border-color: var(--esh-yellow);
    background: var(--esh-white);
}

.esh-filters__checkbox input[type="checkbox"]:checked ~ .esh-filters__check-icon::after {
    transform: scale(1);
}

.esh-filters__checkbox input[type="checkbox"]:focus-visible ~ .esh-filters__check-icon {
    box-shadow: 0 0 0 3px rgba(255,209,0,.25);
    border-color: var(--esh-yellow);
}

.esh-filters__checkbox:hover .esh-filters__check-icon {
    border-color: var(--esh-gray-400);
}

.esh-filters__check-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esh-filters__check-count {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 500;
    color: var(--esh-gray-400);
    min-width: 20px;
    text-align: right;
}

.esh-filters__empty {
    display: block;
    font-size: .8rem;
    color: var(--esh-gray-400);
    padding: 4px 0;
}

/* ---- Dual Range Slider (price) ---- */
.esh-filters__price-range {
    position: relative;
    height: 32px;
    margin-bottom: 8px;
    --esh-range-left: 0%;
    --esh-range-right: 100%;
}

/* Track background */
.esh-filters__price-range::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--esh-gray-200);
    border-radius: 4px;
    transform: translateY(-50%);
    z-index: 0;
}

/* Active track segment */
.esh-filters__price-range::after {
    content: '';
    position: absolute;
    top: 50%;
    left: var(--esh-range-left);
    right: calc(100% - var(--esh-range-right));
    height: 4px;
    background: var(--esh-yellow);
    border-radius: 4px;
    transform: translateY(-50%);
    z-index: 1;
}

.esh-filters__range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.esh-filters__range::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
    border: none;
}

.esh-filters__range::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
}

.esh-filters__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--esh-white);
    border: 2px solid var(--esh-yellow);
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    cursor: pointer;
    pointer-events: auto;
    margin-top: -8px;
    transition: box-shadow .2s ease, transform .15s ease;
}

.esh-filters__range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--esh-white);
    border: 2px solid var(--esh-yellow);
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    cursor: pointer;
    pointer-events: auto;
}

.esh-filters__range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(255,209,0,.3);
}

.esh-filters__range::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 2px 12px rgba(255,209,0,.4);
}

.esh-filters__range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(255,209,0,.25);
}

.esh-filters__price-labels {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    font-weight: 600;
    color: var(--esh-gray-600);
}

/* ---- Overlay (mobile) ---- */
.esh-filters__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.esh-filters__overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* ---- Active Filter Chips ---- */
.esh-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    min-height: 0;
}

.esh-filters-chips:empty {
    display: none;
}

.esh-filters-chips:not(:empty) {
    margin-bottom: 16px;
}

.esh-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--esh-gray-50);
    border: 1px solid var(--esh-gray-200);
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 600;
    color: var(--esh-gray-800);
    cursor: pointer;
    transition: var(--esh-transition);
    white-space: nowrap;
}

.esh-chip:hover {
    border-color: var(--esh-black);
    color: var(--esh-black);
    background: var(--esh-white);
}

.esh-chip svg {
    width: 12px;
    height: 12px;
    opacity: .5;
    flex-shrink: 0;
}

.esh-chip:hover svg {
    opacity: 1;
}

/* ---- Loading state on product grid ---- */
ul.products.esh-loading {
    opacity: .35;
    pointer-events: none;
    position: relative;
    min-height: 200px;
    transition: opacity .2s ease;
}

ul.products.esh-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border: 3px solid var(--esh-gray-200);
    border-top-color: var(--esh-yellow);
    border-radius: 50%;
    animation: esh-spin .6s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 5;
}

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

/* ---- No results ---- */
.esh-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--esh-gray-400);
    font-size: .92rem;
}

/* ---- AJAX Pagination ---- */
.esh-pagination {
    margin: 32px 0 48px;
    text-align: center;
}

.esh-pagination__list {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.esh-pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: var(--esh-radius-sm);
    border: 1.5px solid var(--esh-gray-200);
    font-size: .84rem;
    font-weight: 600;
    color: var(--esh-black);
    background: var(--esh-white);
    text-decoration: none;
    transition: var(--esh-transition);
    cursor: pointer;
}

.esh-pagination__link:hover {
    border-color: var(--esh-yellow);
    background: rgba(255,209,0,.06);
}

.esh-pagination__link--active {
    background: var(--esh-black);
    color: var(--esh-yellow);
    border-color: var(--esh-black);
    pointer-events: none;
}

.esh-pagination__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 40px;
    font-size: .84rem;
    color: var(--esh-gray-400);
}

/* ============================================================
   FILTERS — RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    /* Layout: single column, no sidebar */
    .esh-archive-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Show toggle button */
    .esh-filters__toggle {
        display: inline-flex;
    }

    .esh-filters__active-count {
        display: inline-flex;
    }

    /* Filter panel becomes a mobile drawer */
    .esh-filters {
        position: fixed;
        top: var(--esh-header-height-mobile, 108px);
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        max-height: calc(100vh - var(--esh-header-height-mobile, 108px));
        height: 100%;
        z-index: 1000;
        border: none;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform .35s cubic-bezier(.4,0,.2,1);
        box-shadow: none;
        overflow-y: auto;
    }

    .esh-filters--open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.12);
    }

    /* Show close button on mobile */
    .esh-filters__close {
        display: flex;
    }

    /* Pagination */
    .esh-pagination__link {
        min-width: 36px;
        height: 36px;
        font-size: .8rem;
    }
}

@media (max-width: 480px) {
    .esh-filters {
        width: 280px;
    }

    .esh-archive-topbar {
        gap: 10px;
    }
}
