.product-card {
    flex-basis: calc(25% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    background: #fff;
    border: 1px solid #eee;
    max-height: 450px;
}

.shop-section {
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding-bottom: 150px;
}

aside.left-filter-section {
    flex-basis: 25%;
}

main.product_cards {
    display: flex;
    flex-direction: column;
    flex-basis: 75%;
    width: calc(var(--content-block-width) - 25% - 26px * 4);
}

.products {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    flex-basis: calc(80% - 40px);
}

.shop-message {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 20px);
}

nav.woocommerce-pagination {
    margin-top: 70px;
}

@media (min-width: 640px) {
    .shop-message {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* WooCommerce селектор по умолчанию имеет класс .orderby — переопределим */
.shop-message__sort select.orderby {
    padding: 8px 40px 8px 12px;
    /* Отступ справа под стрелку */
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='10' height='7' viewBox='0 0 10 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 7px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.shop-message__sort select.orderby:hover,
.shop-message__sort select.orderby:focus {
    border-color: #888;
    outline: none;
    cursor: pointer;
}


.shop-message__sort select.orderby:hover,
.shop-message__sort select.orderby:focus {
    border-color: #888;
    outline: none;
}

/* Результаты */
.shop-message__results {
    font-size: 14px;
    color: #555;
}

nav.woocommerce-breadcrumb.text-sm.text-gray-600.mb-4 {
    margin-top: 50px;
}

.price_slider_amount {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
}

.ui-slider-range.ui-corner-all.ui-widget-header {
    font-size: 2px !important;
    max-height: 4px;
    border: none !important;
    color: transparent !important;
    background-color: #FFAA80 !important;
    left: 0%;
    width: 100%;
    top: 0;
    bottom: 0;
    margin: auto;
}

.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content {
    background-color: #888 !important;
    max-height: 4px !important;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle {
    background-color: #1F75E9 !important;
}


.woocommerce .widget_price_filter .price_slider_amount .button,
button#toggle-filter {
    font-size: 1.15em;
    float: left;
    display: inline-block;
    padding: 10px 20px;
    width: 80%;
    background-color: #007aff;
    color: #fff;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    max-height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: backgroundColor .4s ease;
}

.woocommerce .widget_price_filter .price_slider_amount .button:hover,
button#toggle-filter:hover {
    background-color: #005cd6;
}

.widget.woocommerce.widget_price_filter {
    margin-top: 20px;
}

button.close-filter-btn.absolute.top-2.right-2.text-gray-500.hover\:text-gray-700 {
    display: none;
}

@media (max-width: 767px) {
main.product_cards {
    display: flex;
    flex-direction: column;
    flex-basis: 75%;
    width: 100%;
}
    .products {
        display: flex;
    	flex-direction: column;
        flex-wrap: wrap;
        gap: 5px;
        flex-basis: 100%;
    }

    .shop-section {
        flex-direction: column;
    }

    .product-card {
        flex-basis: 100%;
        min-width: 0;
        width: 100%;
        padding: 10px;
        margin: 0;
        max-width: 100vw;
    }

    .product-card__image img,
    .product-card__image img {
        max-height: 160px !important;
        height: 100%;
        object-fit: contain;
    }

    span.product-card__title-text {
        font-size: 12px;
    }

    a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
        width: 100%;
    }
.shop-message {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
}

/* Скрываем фильтр по умолчанию на мобильных */
@media (max-width: 767px) {
    .left-filter-section {
        position: fixed;
        top: -100%;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: top 0.3s ease-in-out;
        max-height: 90vh;
        overflow-y: auto;
    }

    .left-filter-section.open {
        top: 0;
    }

    body.filter-open {
        overflow: hidden;
    }

    button#toggle-filter {
        width: 100%;
        max-width: 100vw;
        margin: auto;
        padding: 20px 0px;
    }

    aside.left-filter-section.open {
        max-width: 99vw;
        max-width: 100dvw;
        max-height: 90vh;
        overflow-y: scroll;
    }

    body {
        overflow-x: hidden;
    }

    button.close-filter-btn.absolute.top-2.right-2.text-gray-500.hover\:text-gray-700 {
        display: flex;
        width: 30px;
        height: 30px;
        position: absolute;
        top: 50px;
        right: 10px;
        background: transparent;
        justify-content: center;
        align-items: center;
        padding: 0;
        border: none;
    }

    .close-filter-btn svg {
        width: 30px;
        height: 30px;
    }

    .bg-white.p-6.rounded-lg.shadow-md.sticky.top-4 {
        display: block;
    }

    aside.left-filter-section.open {
        border-bottom: 5px solid #b6dfff;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
        box-shadow: 0px 0px 40px #333;
    }
}