body.ast-woo-shop-archive #content.site-content {
    padding-bottom: 56px;
}

body.ast-woo-shop-archive #content.site-content > .ast-container {
    padding-right: 12px;
    padding-left: 12px;
}

body.post-type-archive-product .astra-shop-filter-button {
    display: none !important;
}

.ast-woocommerce-container > .woocommerce-products-header {
    display: none;
}

.mt-hide-counts .mt-filter-group .count {
    display: none;
}

.mt-product-category-info {
    position: relative;
    min-height: 310px;
    background-color: #979797;
    * {color: white; text-decoration: none; outline: none;}
    .mt-category-image {
        position: absolute;
        z-index: 0;
        top:0;right:0;bottom:0;left:0;
        width: 100%;
        height: 100%;
    }
    .mt-category-image img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    .mt-category-content {
        position: relative;
        min-height: 310px;
        z-index: 1;
        width: 100%;
        height: 100%;
        padding: 16px;
        > * {
            position: relative;
            z-index: 1;
        }
        &::after {
            content: "";
            display: block;
            position: absolute;
            top: 0; bottom: 0; left: 0;
            width: 100%;
            height: 100%;
            max-width: 486px;
            background: rgba(255, 255, 255, 0.10);
            backdrop-filter: blur(18px);
            z-index: 0;
        }
    }
    .ast-breadcrumbs {
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
    }
    .mt-category-title {
        font-size: 32px;
        font-style: normal;
        font-weight: 700;
        line-height: normal;
        margin-top: 26px;
        margin-bottom: 16px;
    }
    .mt-category-description {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        overflow-wrap: break-word;
    }
}

.ast-woocommerce-container {
    .ast-shop-toolbar-container {
        position: relative;
        z-index: 10;
        margin: 20px 0;
    }
}

.mt-woocommerce-ordering-wrapper-backdrop {
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: 0.25s ease-in-out;
}

.mt-woocommerce-ordering-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
    column-gap: 24px;

    .mt-orderby-text {
        font-weight: 500;
    }
    /* Custom Sorting Dropdown Styles */
    .mt-ordering-wrapper {
        position: relative;
        width: 100%;
        max-width: 394px;
        font-size: 14px;
        font-weight: 500;
    }

    .mt-ordering-selected {
        display: flex;
        justify-content: space-between;
        align-items: center;
        column-gap: 10px;
        padding: 8px 16px;
        border-radius: 8px;
        border: 1px solid #FFF;
        background: #F1F1F1;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mt-ordering-text {
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .mt-ordering-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #F1F1F1;
        border: 1px solid #FFF;
        border-radius: 0 0 8px 8px;
        border-top: none;
        list-style: none;
        padding: 0;
        margin: 0;
        z-index: 1;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }

        /* Open State */
    .mt-ordering-wrapper.open .mt-ordering-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .mt-ordering-wrapper.open .mt-ordering-selected {
        border-radius: 8px 8px 0 0;
    }

    .mt-ordering-wrapper .mt-ordering-icon.mt-ordering-arrow {
        display: inline-block;
    }
    .mt-ordering-wrapper .mt-ordering-icon.mt-ordering-close {
        display: none;
    }
    .mt-ordering-wrapper .mt-ordering-icon {
        margin-right: 3px;
    }
    .mt-ordering-wrapper .mt-ordering-icon svg {
        width: 16px;
        height: 16px;
        vertical-align: middle;
    }

    .mt-ordering-wrapper.open {
        .mt-ordering-icon.mt-ordering-arrow {
            display: none;
        }
        .mt-ordering-icon.mt-ordering-close {
            display: inline-block;
        }
    }

    /*.mt-ordering-wrapper.open .mt-ordering-icon svg {
        transform: rotateX(180deg);
    }*/

    .mt-ordering-dropdown li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 10px 15px;
        border-bottom: 1px solid #fff;
        transition: background 0.2s;
    }

    .mt-ordering-dropdown li:not(.mt-ordering-dropdown-title) {
        cursor: pointer;
    }

    .mt-ordering-dropdown li:not(.mt-ordering-dropdown-title)::after {
        content: '';
        display: flex;
        width: 24px;
        height: 24px;
        border: 1px solid #959595;
        border-radius: 0;
        background: #FDFDFD;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .mt-ordering-dropdown li.active::after {
        content: '✓';
        background-color: #000;
        border-color: #000;
        color: #fff;
        font-size: 12px;
    }

    .mt-ordering-dropdown li:last-child {
        border-bottom: none;
    }

    .mt-ordering-dropdown li:not(.mt-ordering-dropdown-title):hover {
        background-color: #f9f9f9;
    }

    .mt-ordering-dropdown li.active {
        font-weight: 700;
        /*background-color: #f5f5f5;*/
    }

    .mt-ordering-arrow svg {
        transition: transform 0.3s ease;
    }
}

.mt-ordering-dropdown-title {
    display: none !important;
    position: sticky;
    z-index: 1;
    top: 0;
    border: none !important;
    background: inherit;
    font-size: 16px;
    font-weight: 600;
    &::after {content: none !important;}
    .mt-ordering-close {cursor: pointer;}
}

.mt-loop-actions-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    .woosc-btn-icon::before {
        font-size: 14px;
    }
    .woosc-btn {
        border-radius: 8px;
        border: 1px solid #000;
        background: #FFF !important;
        color: #000;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
    }

    .woosw-btn-icon::before {
        font-size: 24px;
    }

    .woosw-btn.woosw-btn-icon-only {
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        outline: none;
        background: transparent;
        width: auto;
        height: auto;
    }
}

/* Container setup */
.astra-shop-thumbnail-wrap {
    position: relative;
}

/* Position secondary image directly over the primary one */
.secondary-hover-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    z-index: 1;
}

/* Show secondary image on hover */
.astra-shop-thumbnail-wrap:has(.secondary-hover-image):hover {
    img {opacity: 0 !important;}
    .secondary-hover-image {
        opacity: 1 !important;;
    }
}

.products {
    .woocommerce-loop-product__title {
        width: 100%;
        max-width: 100%;
        word-break: break-word !important;
    }
    .product-category {
        border-radius: 24px;
        border: 1px solid #FFF;
        overflow: hidden;
        .woocommerce-loop-category__title {
            border-radius: 12px;
        }
    }
    .product {
        position: relative;
        z-index: 0;
        border-radius: 24px;
        border: 1px solid #FFF;
        background: rgba(253, 253, 253, 0.60);
        .woocommerce-loop-product__link {
            height: 272px;
            background-color: white;
            img {
                object-fit: contain !important;
                width: 100% !important;
                height: 100% !important;
                transition: opacity 0.25s ease-in-out;
            }
        }
        .woocommerce-loop-product__title {
            margin: 0;
            padding: 0;
        }
        .astra-shop-thumbnail-wrap {
            position: relative;
            overflow: hidden;
            border-radius: 24px 24px 0 0;
            .mt-specs-wrapper {
                display: flex;
                flex-wrap: wrap;
                align-items: flex-start;
                gap: 16px;
                position: absolute;
                bottom: 0;
                right: 0;
                left: 0;
                z-index: 10;
                border-radius: 24px 24px 0 0;
                background: #F8F8F8;
                will-change: transform;
                transition: transform 0.2s ease;
                transform: translateY(100%);
                .mt-specs-list {
                    display: grid;
                    grid-template-rows: auto;
                    grid-template-columns: auto auto;
                    row-gap: 10px;
                    column-gap: 32px;
                    margin: auto;
                    padding: 14px 12px;
                    font-size: 12px;
                    font-weight: 400;
                    line-height: 1;
                    list-style-type: none;
                    li {
                        display: flex;
                        align-items: flex-start;
                    }
                    li::before {
                        content: "\00B7";
                        display: inline-block;
                        padding: 0 5px;
                        font-weight: 900;
                    }
                }
            }
        }
        .astra-shop-thumbnail-wrap:hover {
            .mt-specs-wrapper {
                transform: translateY(0);
            }
        }
        .onsale {
            display: inline-flex;
            height: 40px;
            justify-content: center;
            align-items: center;
            gap: 8px;
            color: white;
            background: #D90000;
            padding: 0 12px !important;
            border-radius: 8px !important;
            top: 20px !important;
            right: auto !important;
            left: 20px !important;
        }
        .price {
            display: flex !important;
            align-items: flex-end !important;
            bdi {
                color: #000;
                font-size: 16px !important;
                font-style: normal !important;
                font-weight: 400 !important;
                line-height: normal !important;
            }
            del bdi {
                color: rgba(0, 0, 0, 0.60) !important;
                font-style: italic !important;
            }
            del + ins, del ~ ins {
                margin-left: 10px;
            }
            ins bdi {
                font-weight: 500 !important;
            }
            .mt-guest-b2c {
                margin-left: auto;
                padding-left: 10px;
                font-size: 12px;
                font-style: italic;
                font-weight: 400;
                line-height: normal;
            }
        }
        .mt-actions-wrapper-bottom {
            display: flex;
            justify-content: center;
        }
        .mt-product-card-view-more {
            font-size: 16px;
            font-weight: 400;
            color: black;
            background-color: transparent;
            &:hover, &:focus, &:active {
                color: black;
                background-color: transparent;
            }
        }
        .ast-shop-product-out-of-stock {
            font-size: 12px;
            color: black !important;
            border-radius: 12px;
            background-color: rgba(255,255,255,.5) !important;
        }
        .astra-shop-summary-wrap {
            display: flex;
            flex-direction: column;
            row-gap: 16px;
            > * {
                margin-bottom: 0;
                padding-bottom: 0;
            }
            .mt-specs-wrapper {
                .mt-specs-list {
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                    margin: 0;
                    padding: 8px 0;
                    font-size: 14px;
                    font-weight: 400;
                    line-height: 1;
                    list-style-type: none;
                    border-top: 1px solid #FFF;
                    border-bottom: 1px solid #FFF;
                    li {
                        display: flex;
                        align-items: flex-start;
                    }
                    li::before {
                        content: "\00B7";
                        display: inline-block;
                        padding: 0 5px;
                        font-weight: 900;
                    }
                }
            }
        }
    }
}

.ast-shop-load-more {
    padding: 18px 24px;
    color: black !important;
    background-color: transparent !important;
    border-radius: 24px;
    border: 1px solid #000;
}

.ast-shop-pagination-infinite .ast-loader {
    display: none;
}

.astra-shop-filter-button {
    border-radius: 8px;
    border: 1px solid #FFF !important;
    background: #F1F1F1 !important;
    font-size: 14px;
    font-weight: 500 !important;
    .ast-icon svg {
        display: none !important;
    }
    .ast-icon::before {
        content: "";
        display: inline-block;
        width: 16px;
        height: 16px;
        background: url("../img/filters.svg") no-repeat center;
        background-size: contain;
    }
}

.mt-filters-title {
    font-size: 18px;
    font-weight: 500;
}

@media (min-width: 1024px) {
    body.ast-woo-shop-archive #content.site-content > .ast-container {
        padding-right: 20px;
        padding-left: 20px;
    }
    .mt-product-category-info {
        min-height: 520px;
        .mt-category-content {
            min-height: 520px;
            padding: 20px 28px 32px 80px;
        }
        .ast-breadcrumbs {
            font-size: 14px;
        }
        .mt-category-title {
            font-size: 56px;
            margin-top: 38px;
            margin-bottom: 24px;
        }
        .mt-category-description {
            font-size: 16px;
        }
    }
}
@media (min-width: 1280px) {
    body.ast-woo-shop-archive #content.site-content > .ast-container {
        padding-right: 80px;
        padding-left: 80px;
    }
    .astra-shop-filter-button {
        display: none !important;
    }
    .ast-left-sidebar #secondary {
        border-right: none;
        margin-right: 0;
    }
    .ast-left-sidebar #primary {
        border-left: none;
    }
    .ast-woo-sidebar-widget {
        margin-right: 16px;
    }
    /*.ast-woocommerce-container {
        padding-left: 60px;
    }*/
    .mt-product-category-info {
        .mt-category-content {
            max-width: 486px;
        }
    }
    .mt-woocommerce-ordering-wrapper .mt-ordering-wrapper {
        width: 394px;
    }
    .mt-woocommerce-ordering-wrapper {
        .mt-ordering-wrapper {
            font-size: 16px;
            font-weight: 400;
        }
    }
}
@media (min-width: 1580px) {}

@media (max-width: 1279px) {
    #secondary.widget-area.secondary:has(.mt-all-attributes-filters) {
        display: none;
    }
    .mt-loop-actions-wrapper {
        .woosc-btn {
            padding: 8px;
            font-size: 12px;
        }
    }
    .products {
        .product {
            .astra-shop-thumbnail-wrap {}
            .mt-actions-wrapper-bottom {}
            .mt-product-card-view-more {
                font-size: 12px;
            }
        }
    }
}
@media (max-width: 1023px) {
    .mt-product-category-info {
        .mt-category-content {
            &::after {
                width: 38%;
            }
        }
    }
    .ast-woocommerce-container {
        .ast-shop-toolbar-container {
            flex-direction: row;
            justify-content: space-between;
        }
    }
    .products {
         .product {}
     }
}
@media (max-width: 479px) {
    body.mt-ordering-wrapper-open {
        .mt-woocommerce-ordering-wrapper-backdrop {
            visibility: visible;
            opacity: 1;
        }
    }
    .mt-ordering-dropdown-title {
        display: flex !important;
    }
    .mt-woocommerce-ordering-wrapper form.mt-custom-ordering {
        width: 100%;
        max-width: 100%;
    }
    .mt-woocommerce-ordering-wrapper {
        .mt-ordering-dropdown {
            position: fixed;
            z-index: 2;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            margin: auto;
            max-width: calc(100dvw - 24px);
            max-height: calc(100dvh - 110px);
            height: fit-content;
            border-radius: 8px;
            overflow: auto;
        }
    }
    .ast-woocommerce-container {
        .ast-shop-toolbar-container {
            position: sticky;
            z-index: 1;
            top: var(--site-header-height, 55px);
            padding: 10px 0;
            background-color: #f1f1f1;
            .ast-shop-toolbar-aside-wrap {
                margin-bottom: 0;
            }
        }
    }
    .ast-shop-toolbar-aside-wrap {
        flex: 1;
    }
    .products {
        .product {
            .woocommerce-loop-product__link {
                height: 188px;
            }
        }
    }
}
