/* FluentCart Enhancements — favorites heart on product card images. */

/* Positioned box around FluentCart's image link; the heart sits on its top-right corner. */
.fce-fav-media {
    position: relative;
}

/* FluentCart's list layout stretches the image column; keep the box filling it. */
.fct-product-image-block > .fce-fav-media,
.fct-dynamic-product-image > .fce-fav-media,
.fct-product-image-wrap > .fce-fav-media {
    height: 100%;
}

.fce-fav {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 5;
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    line-height: 0;
    cursor: pointer;
    transition: transform .15s ease;
}

[dir="rtl"] .fce-fav {
    right: auto !important;
    left: 10px !important;
}

.fce-fav:hover {
    transform: scale(1.12);
}

.fce-fav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, .45) !important;
}

/* Just the heart: white outline with a soft shadow so it stays visible on any photo. */
.fce-fav-icon {
    display: block;
    width: 28px;
    height: 28px;
    overflow: visible;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}

.fce-fav-icon path {
    fill: rgba(0, 0, 0, .35);
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linejoin: round;
    transition: fill .15s ease, stroke .15s ease;
}

.fce-fav:hover .fce-fav-icon path {
    fill: rgba(224, 36, 94, .55);
}

.fce-fav.is-active .fce-fav-icon path {
    fill: #e0245e;
    stroke: #e0245e;
}

/* Plain fallback list (when FluentCart's card renderer is unavailable). */
.fce-favorites-plain {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

/* Customer dashboard → Favorites */
.fce-favorites-title {
    margin: 0 0 16px;
}

.fce-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.fce-favorites-item .fct-product-card {
    width: 100% !important;
    height: 100%;
}

.fce-fav-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 99999;
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    border-radius: 8px;
    background: #2f3448;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease;
}

.fce-fav-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.fce-fav-toast a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .fce-fav,
    .fce-fav-icon path,
    .fce-fav-toast {
        transition: none;
    }
}
