.sv-recently-viewed[hidden] {
    display: none !important;
}

.sv-recently-viewed {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--wp--style--global--wide-size, 1240px);
    margin: 42px auto 28px;
}

.sv-recently-viewed > h2 {
    margin: 0;
}

section.sv-recently-viewed.rvpw-recently-view ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100%;
    margin: 20px 0 0 !important;
    padding: 0 !important;
    list-style: none;
}

section.sv-recently-viewed.rvpw-recently-view ul.products::before,
section.sv-recently-viewed.rvpw-recently-view ul.products::after {
    display: none !important;
}

.sv-recently-viewed .sv-recent-product {
    box-sizing: border-box;
    display: flex !important;
    float: none !important;
    clear: none !important;
    flex-direction: column;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: 100%;
    margin: 0 !important;
    padding: 14px 16px 18px !important;
    border: 1px solid #e2e6df;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}

.sv-recent-product__image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 4px;
    background: #f7f8f6;
}

.sv-recent-product__image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    object-fit: contain;
}

.sv-recent-product__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}

.sv-recent-product__title-link {
    color: #232323;
    text-decoration: none;
}

.sv-recent-product__title {
    min-height: 3.9em;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
    font: 500 15px/1.3 Rubik, Arial, sans-serif;
    color: #232323;
}

.sv-recent-product__stock {
    margin-bottom: 5px;
    font: 400 12px/1.4 Rubik, Arial, sans-serif;
    color: #2f7d2a;
}

.sv-recent-product__stock.is-out-of-stock {
    color: #8a3124;
}

.sv-recent-product__price {
    margin: 0 0 14px;
    font: 600 18px/1.35 Rubik, Arial, sans-serif;
    color: #2f7d2a;
}

.sv-recent-product__link {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin-top: auto;
    padding: 11px 14px;
    border-radius: 4px;
    background: #c84f1d;
    color: #fff !important;
    font: 500 14px/1.4 Rubik, Arial, sans-serif;
    text-align: center;
    text-decoration: none !important;
}

.sv-recent-product__link:hover,
.sv-recent-product__link:focus-visible {
    background: #a94319;
}

@media (max-width: 1199px) {
    section.sv-recently-viewed.rvpw-recently-view ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 960px) {
    section.sv-recently-viewed.rvpw-recently-view ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .sv-recently-viewed {
        margin: 32px auto 22px;
    }

    section.sv-recently-viewed.rvpw-recently-view ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .sv-recently-viewed .sv-recent-product {
        padding: 10px 10px 14px !important;
    }

    .sv-recent-product__image-link {
        margin-bottom: 10px;
    }

    .sv-recent-product__title {
        min-height: 4.2em;
        font-size: 13px;
        line-height: 1.4;
    }

    .sv-recent-product__price {
        font-size: 15px;
    }

    .sv-recent-product__link {
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (max-width: 370px) {
    section.sv-recently-viewed.rvpw-recently-view ul.products {
        grid-template-columns: 1fr !important;
    }
}
