/* Product-page favorites: reuse the existing like-it action and saved state. */
.product-settings .rp-product-favorite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    margin: 4px 0;
    padding: 8px 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    color: #555;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
}
.product-settings .rp-product-favorite .mdi { color: inherit; font-size: 20px; }
.product-settings .rp-product-favorite .fav-count,
.product-settings .rp-product-favorite:not(.active) .rp-favorite-saved,
.product-settings .rp-product-favorite.active .rp-favorite-add { display: none; }
.product-settings .rp-product-favorite.active { color: #3f3650; }
.product-settings .rp-product-favorite:hover { color: #222; background: transparent; }
.product-settings .rp-product-favorite.active:hover { color: #332c42; }
.product-settings .rp-product-favorite:focus-visible { outline: 2px solid #555; outline-offset: 2px; }

/* Keep the existing catalog favorite toggle visible on mouse and touch screens. */
.product-card > button.like-it:not(.rp-favorites-remove) {
    top: 6px !important;
    left: 16px !important;
    right: auto !important;
    z-index: 3 !important;
    opacity: 1 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px;
    background: transparent !important;
    box-shadow: none !important;
    color: #111 !important;
    font-size: 24px !important;
    line-height: 44px;
}
.product-card > button.like-it:not(.rp-favorites-remove) .mdi {
    color: inherit;
    text-shadow: none;
}
.product-card > button.like-it:not(.rp-favorites-remove) .mdi::before {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    background: center / contain no-repeat;
}
.product-card > button.like-it:not(.rp-favorites-remove) .out-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M20.84%204.61a5.5%205.5%200%200%200-7.78%200L12%205.67l-1.06-1.06a5.5%205.5%200%200%200-7.78%207.78L12%2021.23l8.84-8.84a5.5%205.5%200%200%200%200-7.78Z%22%20fill%3D%22%23ddd%22%20fill-opacity%3D%22.65%22%20stroke%3D%22%23000%22%20stroke-width%3D%221%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.product-card > button.like-it:not(.rp-favorites-remove) .in-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M20.84%204.61a5.5%205.5%200%200%200-7.78%200L12%205.67l-1.06-1.06a5.5%205.5%200%200%200-7.78%207.78L12%2021.23l8.84-8.84a5.5%205.5%200%200%200%200-7.78Z%22%20fill%3D%22%23000%22%20fill-opacity%3D%221%22%20stroke%3D%22%23000%22%20stroke-width%3D%221%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.product-card > button.like-it .fav-count,
.product-card > button.like-it:not(.active) .rp-catalog-favorite-remove,
.product-card > button.like-it.active .rp-catalog-favorite-add { display: none; }
.product-card > button.like-it:not(.rp-favorites-remove):focus-visible {
    outline: 2px solid #111;
    outline-offset: 1px;
}

/* Align the touch target with the image; keep a thin orange cross inset equally. */
.favorites-body .product-card > button.rp-favorites-remove {
    position: absolute;
    top: 1px !important;
    right: 1rem !important;
    left: auto !important;
    z-index: 3 !important;
    opacity: 1 !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin: 0 !important;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 44px;
    text-shadow: none !important;
}
.favorites-body button.rp-favorites-remove::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    display: block;
    width: 15px;
    height: 15px;
    text-shadow: none !important;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.16));
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M1 1L19 19M19 1L1 19' fill='none' stroke='%233f3650' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
}
.favorites-body button.rp-favorites-remove .mdi,
.favorites-body button.rp-favorites-remove .fav-count { display: none !important; }
.favorites-body button.rp-favorites-remove:focus-visible { outline: 3px solid #1f5da8; outline-offset: 3px; }

/* Return to the store from the empty favorites panel. */
.fav-empty .rp-favorites-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    min-height: 44px;
    margin: 16px auto 0;
    background-color: #fff;
    border: 1px solid #cbd2d8;
    font-weight: 400;
}
.fav-empty .rp-favorites-shop:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}
.fav-empty .rp-favorites-shop:focus-visible {
    outline: 2px solid #1f5da8;
    outline-offset: 3px;
}
@media (max-width:991.98px) { #shop-body .clear-favorites-btn { min-height:44px; } }
