.m24 .m24-product-image {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
}

.m24 .m24-product-image img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
}

body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_tag ul.products li.product .astra-shop-thumbnail-wrap,
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__link,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__link,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__link {
    display: block;
    width: 100%;
}

body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_tag ul.products li.product .astra-shop-thumbnail-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #f5f0e7;
}

body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
body.tax-product_tag ul.products li.product .astra-shop-thumbnail-wrap img,
body.woocommerce-shop ul.products li.product img.attachment-woocommerce_thumbnail,
body.tax-product_cat ul.products li.product img.attachment-woocommerce_thumbnail,
body.tax-product_tag ul.products li.product img.attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Katalog WooCommerce w stylistyce strony głównej Madras24. */
body.m24-catalog-page {
    background: #fffdf8;
    color: #2e322c;
}

body.m24-catalog-page .site-content .content-area,
body.m24-catalog-page .site-content .site-main {
    width: 100% !important;
    max-width: 1500px !important;
    margin: 0 auto !important;
}

body.m24-catalog-page .site-content .site-main {
    padding: 62px 42px 100px !important;
}

body.m24-catalog-page .woocommerce-products-header {
    margin: 0 0 34px;
}

body.m24-catalog-page .woocommerce-products-header__title,
body.m24-catalog-page .page-title {
    margin: 0 !important;
    color: #2e322c !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: clamp(44px, 4.2vw, 62px) !important;
    font-weight: 400 !important;
    letter-spacing: -.035em;
    line-height: 1.05;
}

body.m24-catalog-page .woocommerce-result-count {
    margin: 9px 0 34px !important;
    color: #666a61;
    font-family: Manrope, "Avenir Next", Arial, sans-serif;
    font-size: 14px;
}

body.m24-catalog-page .woocommerce-ordering {
    margin: 0 0 34px !important;
}

body.m24-catalog-page .woocommerce-ordering select {
    min-width: 230px;
    min-height: 46px;
    padding: 0 42px 0 15px;
    border: 1px solid #dcd2c2;
    border-radius: 8px;
    background-color: #fff;
    color: #2e322c;
    font-family: Manrope, "Avenir Next", Arial, sans-serif;
    font-size: 14px;
}

body.m24-catalog-page ul.products {
    clear: both;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 18px;
}

body.m24-catalog-page ul.products::before,
body.m24-catalog-page ul.products::after {
    display: none !important;
}

body.m24-catalog-page ul.products li.product {
    width: auto !important;
    height: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 18px !important;
    display: flex !important;
    flex-direction: column;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

body.m24-catalog-page ul.products li.product:hover {
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

body.m24-catalog-page ul.products li.product .astra-shop-thumbnail-wrap {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 14px;
    overflow: hidden !important;
    background: #f5f0e7;
}

body.m24-catalog-page ul.products li.product .woocommerce-loop-product__link {
    height: auto !important;
    display: block !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.m24-catalog-page ul.products li.product .woocommerce-loop-product__link > img,
body.m24-catalog-page ul.products li.product img.attachment-woocommerce_thumbnail,
body.m24-catalog-page ul.products li.product img.wp-post-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 0 17px !important;
    display: block !important;
    border-radius: 14px !important;
    object-fit: cover !important;
    object-position: center !important;
}

body.m24-catalog-page ul.products li.product .astra-shop-summary-wrap {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 4px !important;
    display: flex !important;
    flex: 1 0 auto !important;
    flex-direction: column;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.m24-catalog-page ul.products li.product .woocommerce-loop-product__title,
body.m24-catalog-page ul.products li.product h2 {
    width: 100% !important;
    height: auto !important;
    min-height: 72px;
    margin: 0 0 14px !important;
    padding: 0 !important;
    display: block !important;
    color: #2e322c !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 19px !important;
    font-weight: 400 !important;
    letter-spacing: -.012em;
    line-height: 1.3;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.m24-catalog-page ul.products li.product a {
    color: #2e322c !important;
    text-decoration: none !important;
}

body.m24-catalog-page ul.products li.product .price {
    width: 100% !important;
    height: auto !important;
    min-height: 28px;
    margin: auto 4px 15px !important;
    display: block !important;
    color: #b66f53 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 21px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.m24-catalog-page ul.products li.product .price del {
    color: #8b8d86 !important;
    font-size: .78em;
}

body.m24-catalog-page ul.products li.product .price ins {
    color: #b66f53 !important;
    font-weight: 400 !important;
    text-decoration: none;
}

body.m24-catalog-page ul.products li.product .button,
body.m24-catalog-page ul.products li.product .added_to_cart {
    width: calc(100% - 8px);
    min-height: 46px;
    margin: 0 4px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #7f9279 !important;
    border-radius: 8px !important;
    background: #7f9279 !important;
    color: #fff !important;
    font-family: Manrope, "Avenir Next", Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center;
}

body.m24-catalog-page ul.products li.product .button:hover,
body.m24-catalog-page ul.products li.product .added_to_cart:hover {
    border-color: #657861 !important;
    background: #657861 !important;
}

body.m24-catalog-page ul.products li.product .onsale {
    top: 22px !important;
    right: 22px !important;
    min-width: 0;
    min-height: 0;
    padding: 8px 12px;
    border-radius: 18px;
    background: #fffdf8;
    color: #657861;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

body.m24-catalog-page .woocommerce-pagination {
    margin-top: 62px;
}

body.m24-catalog-page .woocommerce-pagination ul.page-numbers {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0 !important;
}

body.m24-catalog-page .woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.m24-catalog-page .woocommerce-pagination .page-numbers a,
body.m24-catalog-page .woocommerce-pagination .page-numbers span {
    width: 46px;
    height: 46px;
    padding: 0 !important;
    display: grid !important;
    place-items: center;
    border: 1px solid #dcd2c2 !important;
    border-radius: 50% !important;
    background: #fffdf8 !important;
    color: #2e322c !important;
    font-family: Manrope, "Avenir Next", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

body.m24-catalog-page .woocommerce-pagination .page-numbers a:hover {
    border-color: #7f9279 !important;
    background: #dce3d7 !important;
    color: #2e322c !important;
}

body.m24-catalog-page .woocommerce-pagination .page-numbers .current {
    border-color: #7f9279 !important;
    background: #7f9279 !important;
    color: #fff !important;
}

body.m24-catalog-page .woocommerce-pagination .page-numbers .prev,
body.m24-catalog-page .woocommerce-pagination .page-numbers .next {
    width: auto;
    min-width: 70px;
    padding: 0 18px !important;
    border-radius: 24px !important;
    color: #657861 !important;
}

@media (max-width: 1100px) {
    body.m24-catalog-page ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body.m24-catalog-page .site-content .site-main {
        padding: 44px 16px 76px !important;
    }

    body.m24-catalog-page .woocommerce-result-count,
    body.m24-catalog-page .woocommerce-ordering {
        float: none !important;
    }

    body.m24-catalog-page .woocommerce-ordering select {
        width: 100%;
    }

    body.m24-catalog-page ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 10px;
    }

    body.m24-catalog-page ul.products li.product {
        padding: 0 0 12px !important;
    }

    body.m24-catalog-page ul.products li.product .astra-shop-summary-wrap {
        padding: 0 3px !important;
    }

    body.m24-catalog-page ul.products li.product .woocommerce-loop-product__title,
    body.m24-catalog-page ul.products li.product h2 {
        min-height: 66px;
        font-size: 15px !important;
    }

    body.m24-catalog-page ul.products li.product .price {
        font-size: 18px !important;
    }

    body.m24-catalog-page .woocommerce-pagination ul.page-numbers {
        gap: 5px;
        flex-wrap: wrap;
    }

    body.m24-catalog-page .woocommerce-pagination .page-numbers a,
    body.m24-catalog-page .woocommerce-pagination .page-numbers span {
        width: 40px;
        height: 40px;
        font-size: 13px !important;
    }

    body.m24-catalog-page .woocommerce-pagination .page-numbers .prev,
    body.m24-catalog-page .woocommerce-pagination .page-numbers .next {
        min-width: 54px;
        padding: 0 12px !important;
    }
}
/* Wyszukiwarka produktów nad katalogiem. */
body.m24-catalog-page .m24-catalog-search {
    width: 100%;
    margin: 0 0 34px;
    padding: 24px 26px;
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(420px, 1.3fr);
    align-items: center;
    gap: 30px;
    border: 1px solid #dcd2c2;
    border-radius: 14px;
    background: #f7f3ea;
}

body.m24-catalog-page .m24-catalog-search p {
    margin: 0 0 5px;
    color: #657861;
    font-family: Manrope, "Avenir Next", Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

body.m24-catalog-page .m24-catalog-search h2 {
    margin: 0;
    color: #2e322c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(25px, 2.1vw, 34px);
    font-weight: 400;
    line-height: 1.08;
}

body.m24-catalog-page .m24-catalog-search form {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

body.m24-catalog-page .m24-catalog-search input[type="search"] {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid #d2c7b7;
    border-radius: 8px;
    outline: 0;
    background: #fffdf8;
    color: #2e322c;
    font-family: Manrope, "Avenir Next", Arial, sans-serif;
    font-size: 15px;
    box-shadow: none;
}

body.m24-catalog-page .m24-catalog-search input[type="search"]:focus {
    border-color: #7f9279;
    box-shadow: 0 0 0 3px rgba(127, 146, 121, .14);
}

body.m24-catalog-page .m24-catalog-search button {
    min-width: 126px;
    height: 52px;
    margin: 0;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #7f9279;
    border-radius: 8px;
    background: #7f9279;
    color: #fff;
    font-family: Manrope, "Avenir Next", Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

body.m24-catalog-page .m24-catalog-search button:hover {
    border-color: #657861;
    background: #657861;
}

body.m24-catalog-page .m24-catalog-search button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

@media (max-width: 760px) {
    body.m24-catalog-page .m24-catalog-search {
        margin-bottom: 24px;
        padding: 20px 16px;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body.m24-catalog-page .m24-catalog-search form {
        grid-template-columns: minmax(0, 1fr) 52px;
        gap: 8px;
    }

    body.m24-catalog-page .m24-catalog-search button {
        min-width: 52px;
        width: 52px;
        padding: 0;
    }

    body.m24-catalog-page .m24-catalog-search button span {
        display: none;
    }
}
