/* space between columns and rows, read by the product grid gap in woocommerce.css */
.woocommerce.woocommerce-shop ul.products.products-style-4:not(.shop-view-list),
.woocommerce.archive ul.products.products-style-4:not(.shop-view-list) {
    --ahura-shop-products-gap: 20px;
}

@media screen and (max-width: 576.98px) {
    .woocommerce.woocommerce-shop ul.products.products-style-4:not(.shop-view-list),
    .woocommerce.archive ul.products.products-style-4:not(.shop-view-list) {
        --ahura-shop-products-gap: 12px;
    }
}

body.woocommerce ul.products.products-style-4 > li {
    border-radius: 5px;
    border: 1px solid #eaebed;
    transition: all 0.3s;
}

body.woocommerce li.product.product-style-4 span.onsale {
    padding: 0 7px;
    font-size: 10px;
    border-radius: 3px;
    color: #FFFFFF;
    font-weight: normal;
}

.woocommerce.archive ul.products.products-style-4 li.product-style-4 .product-thumbnail-wrapper {
    height: 200px;
    margin: 0;
    border-bottom: 1px solid #eaebed;
}

ul.products li.product.product-style-4 div.woocommerce-LoopProduct-link {
    align-self: initial;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related.products ul.products li.product.product-style-4 div.woocommerce-LoopProduct-link {
    align-items: center;
    height: 100%;
}

.related.products li.product.product-style-4 .product-thumbnail-wrapper {
    height: 300px;
}

.related.products li.product.product-style-4 .product-thumbnail-wrapper img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.related.products ul.products li.product.product-style-4 .product-meta-wrapper {
    padding: 30px 30px 0 30px;
}

.woocommerce ul.products li.product-style-4 .product-thumbnail-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    margin: 0;
}

.woocommerce .product.product-style-4.sale.outofstock p.stock {
    top: 30px;
    right: 7px;
    padding: 0 7px;
    font-size: 10px;
    border-radius: 3px;
}

.woocommerce ul.products li.product.product-style-4 .button {
    box-shadow: initial;
}

.woocommerce ul.products li.product.mw_product_item.product-style-4 .woocommerce-loop-product__title {
    padding: 0;
}

.woocommerce ul.products li.product.product-style-4 .price {
    padding: 0
}

.woocommerce ul.products li.product.product-style-4 .stock.in-stock {
    font-size: 14px;
    font-weight: normal;
}

.woocommerce ul.products li.product.product-style-4 .woocommerce-loop-product__title {
    display: block;
}

.woocommerce ul.products li.product.product-style-4 .product-meta-wrapper {
    padding: 10px 10px 0 10px;
}

/* line the meta up with the add to cart button, which is 87% wide and centered */
.woocommerce ul.products:not(.shop-view-list) li.product.product-style-4 .product-meta-wrapper {
    padding-right: 6.5%;
    padding-left: 6.5%;
}

.woocommerce ul.products li.product.product.product-style-4 div.thumbnail-swiper {
    height: 102%;
    position: relative;
    padding-bottom: 20px;
    margin: 0;
}

.woocommerce ul.products li.product.product-style-4 .thumbnail-swiper .swiper-pagination {
    bottom: -9px;
    line-height: 0;
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    background-color: transparent;
    width: 35%;
    margin-left: auto;
    margin-right: auto;
}

li.product.product-style-4 .thumbnail-swiper .swiper-pagination .swiper-pagination-bullet {
    margin: 4px 3px;
    opacity: 1;
    background-color: #c8c8c8;
}

li.product.product-style-4 .woocommerce-archive-shop-sale-countdown {
    bottom: 0;
}

li.product.product-style-4 .woocommerce-archive-shop-sale-countdown span {
    font-weight: normal;
}

body.woocommerce ul li.product.mw_product_item:not(.product-style-3).product-style-4 .button.mw_add_to_cart {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column-reverse;
    overflow: hidden;
}

body.woocommerce ul li.product.mw_product_item:not(.product-style-3).product-style-4 .button.mw_add_to_cart.added {
    display: flex;
    flex-direction: row;
    margin-bottom: 0;
}

body.woocommerce ul li.product.mw_product_item:not(.product-style-3).product-style-4 .button.mw_add_to_cart.added span.icon {
    margin-left: 0;
}

body.woocommerce ul li.product.mw_product_item:not(.product-style-3).product-style-4 a.added_to_cart {
    width: 100%;
    text-align: center;
}

body.woocommerce ul li.product.mw_product_item.product-style-4 .star-rating {
    right: initial
}

.product.product-style-4 .rating svg {
    fill: var(--mw_primary_color);
}

.product.product-style-4 .rating .voted {
    opacity: 0.4;
    font-size: 0.9rem;
}

/* archive card texts start from the site direction side; the Customizer "text alignment" option overrides this */
body:where(.rtl).woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper {
    text-align: right;
}

body:where(.rtl).woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper :is(.price, .price del, .price ins, .price bdi, .product-sku, .product-attributes li, .rating) {
    justify-content: right;
}

body:where(.rtl).woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper .star-rating {
    margin-right: 0;
    margin-left: auto;
}

body:where(:not(.rtl)).woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper {
    text-align: left;
}

body:where(:not(.rtl)).woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper :is(.price, .price del, .price ins, .price bdi, .product-sku, .product-attributes li, .rating) {
    justify-content: left;
}

body:where(:not(.rtl)).woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper .star-rating {
    margin-right: auto;
    margin-left: 0;
}

/* the star box matches the stars' width, so it can be aligned and the rating fill is measured against the stars only */
body.woocommerce.archive ul.products li.product.product-style-4 .product-meta-wrapper .star-rating {
    width: 5.4em;
}

body.woocommerce .post-box ul.products li.mw_product_item.product.product-style-4 .button.mw_add_to_cart span:not(.icon) {
    font-size: 14px;
    font-weight: normal;
    transform: translateY(0);
    transition: all 0.3s;
}

body.woocommerce .post-box ul.products li.mw_product_item.product-style-4 .button.mw_add_to_cart:hover span:not(.icon) {
    transform: translateY(-30px) !important;
}

body.woocommerce .post-box ul.products li.product-style-4 .button.mw_add_to_cart span.icon {
    position: absolute;
    transform: translateY(30px);
    transition: all 0.3s;
}

body.woocommerce .post-box ul.products li.product-style-4 .button.mw_add_to_cart:hover span.icon {
    transform: translateY(0);
}

body.woocommerce .post-box ul.products li.product-style-4 .button.mw_add_to_cart span.icon.ah-theme-icon {
    font-size: 25px;
}

/* keep outline icons hollow: paths without their own fill follow the svg file's fill="none" */
body.woocommerce .post-box ul.products li.product-style-4 .button.mw_add_to_cart span.icon.ah-theme-icon svg[fill="none"] {
    fill: none;
}

.product.product-style-4 .product-preview-btn {
    background-color: transparent;
    border: initial;
    border-radius: initial;
    box-shadow: initial;
    padding: 0;
    left: 12px;
    top: 7px;
    display: flex;
    justify-content: end;
    height: initial;
    width: initial;
}

.product.product-style-4 .product-preview-btn svg {
    transition: all 0.3s;
}

.product.product-style-4 .product-attributes ul li {
    display: flex;
    border-radius: initial;
    font-size: 14px;
}

.product.product-style-4 .product-attributes ul li svg {
    opacity: 0.6;
}

.product.product-style-4 .product-attributes ul li span {
    opacity: 0.8
}

.product.product-style-4 .product-attributes ul li span.attr-title {
    padding-left: 4px;
}

.single-product .related.products .product-style-4 p.stock {
    position: relative;
}