:root {
    --rr-com-favorite-pink: #f68d93;
}

.top_buttons > span.rr-com-top-favorite,
.top_buttons > span.rr-com-top-favorite:hover {
    background-color: rgba(246, 141, 147, .87);
}

.rr-com-top-favorite > a {
    position: relative;
    white-space: nowrap;
    padding-inline: 5px;
}

.rr-com-top-favorite img {
    display: inline-block;
    width: 14px;
    height: auto;
    margin-right: 4px;
    vertical-align: -1px;
}

.rr-com-top-favorite b {
    position: absolute;
    top: -6px;
    left: 12px;
    font: 700 10px/1 sans-serif;
    color: #fff;
}

@media (min-width: 768px) {
    .top_buttons:has(> .rr-com-top-favorite) { transform: translateX(-123px); }
}

@media (max-width: 767px) {
    .top_buttons:has(> .rr-com-top-favorite) {
        display: grid;
        width: auto;
        inset-inline: 5px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3px;
    }

    .top_buttons:has(> .rr-com-top-favorite) > span { width: auto; margin: 0; }
    .rr-com-top-favorite img { width: 12px; margin-right: 3px; }
    .rr-com-top-favorite b { top: -2px; left: 3px; font-size: 9px; }
}

ul.products li.product:has(> .rr-com-favorite-card),
.rr-com-favorite-saved-card {
    position: relative;
}

button.rr-com-favorite-card,
button.rr-com-favorite-card:hover {
    position: absolute;
    z-index: 2;
    top: calc(var(--rr-heart-top, 0px) - 12px);
    right: calc(var(--rr-heart-right, 0px) - 5px);
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 1px 5px 1px rgba(62, 65, 69, .35);
    background: url("icons/favorite-idle.png") center / contain no-repeat;
}

button.rr-com-favorite-card[aria-pressed="true"] {
    background-image: url("icons/favorite-active.png");
}

button.rr-com-favorite-card:focus-visible,
.rr-com-favorite-detail:focus-visible {
    outline: 2px solid #494055;
    outline-offset: 3px;
}

.rr-com-product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: clamp(14px, 1.8vw, 26px);
    row-gap: 12px;
    margin: 0 0 34px;
}

.single-product div.product .rr-com-product-actions > .price,
.single-product div.product .rr-com-product-actions form.cart {
    margin: 0;
    padding: 0;
}

.rr-com-product-actions > .price {
    white-space: nowrap;
}

.rr-com-product-actions > .stock {
    flex: 0 0 100%;
    margin: 0;
}

.rr-com-product-actions--options > form.cart {
    flex: 1 1 100%;
}

.rr-com-product-actions form.cart .quantity:has(input[type="hidden"]) {
    display: none;
}

/* WooCommerce explicitly shows the quantity container after a variation is selected. */
.rr-com-product-actions form.variations_form .quantity:has(input.qty[min="1"]):not(:has(input.qty[max="0"])) {
    display: none !important;
}

.rr-com-product-favorite {
    flex: 0 0 auto;
    width: min(100%, 236px);
}

.rr-com-product-favorite .rr-com-favorite-detail,
.rr-com-product-favorite .rr-com-favorite-detail:hover {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    height: var(--rr-cart-height, 44px);
    padding: 0 9px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 8px rgba(139, 181, 182, .72);
    color: var(--rr-com-favorite-pink);
    font: 700 var(--rr-cart-font-size, 14px)/1.1 Arial, sans-serif;
    text-align: left;
    text-decoration: none;
}

.rr-com-product-favorite.is-saved .rr-com-favorite-detail {
    background: var(--rr-com-favorite-pink);
    color: #fff;
    box-shadow: none;
}

.rr-com-favorite-detail > i {
    flex: 0 0 22px;
    height: 21px;
    background: url("icons/heart-pink.png") center / contain no-repeat;
}

.is-saved .rr-com-favorite-detail > i {
    background-image: url("icons/heart-white.png");
}

.rr-com-footer-social {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0 auto 18px;
}

.rr-com-footer-social a {
    display: grid;
    place-items: center;
    width: 28px;
    height: 32px;
}

.rr-com-footer-social img {
    display: block;
    object-fit: contain;
    border-radius: 0;
}

.rr-com-favorites-page {
    padding: 24px clamp(12px, 2.5vw, 40px);
    margin-bottom: 30px;
    background: rgba(180, 225, 230, .45);
    border-radius: 10px;
}

.rr-com-favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
    gap: 26px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.rr-com-favorite-saved-card img { width: 100%; }
.rr-com-favorite-saved-card h2 { font-size: 19px; margin: 12px 0 4px; }
.rr-com-favorite-saved-card p { margin: 0; }
.rr-com-favorites-page [data-rr-favorites-status]:empty { display: none; }
.rr-com-favorites-page [data-rr-favorites-next] { margin-bottom: 14px; }

.rr-com-favorite-error {
    position: fixed;
    z-index: 10000;
    inset: auto 16px 76px;
    width: fit-content;
    margin: auto;
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    background: #424348;
}

.rr-com-favorite-card[hidden],
.rr-com-product-favorite[hidden],
.rr-com-product-favorite .rr-com-favorite-detail[hidden],
.rr-com-favorite-error[hidden] {
    display: none;
}

@media (max-width: 767px) {
    .rr-com-product-actions { column-gap: clamp(8px, 2.7vw, 16px); }

    .rr-com-product-favorite {
        flex: 1 1 132px;
        max-width: min(100%, 150px);
    }

    .rr-com-product-favorite .rr-com-favorite-detail { gap: 7px; padding-inline: 7px; }
    .rr-com-favorite-detail > i { flex-basis: 21px; }
    .rr-com-favorite-detail > span { max-width: 15ch; }

    button.rr-com-favorite-card,
    button.rr-com-favorite-card:hover {
        width: 28px;
        height: 28px;
        right: calc(var(--rr-heart-right, 0px) - 3px);
    }
}

