/* ==========================================
   FCS Product Toolbar (Wrapper for all buttons)
   ========================================== */
.fcs-product-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}


.fcs-product-toolbar--single {
    justify-content: start;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 25;
}

/* Positioning Variants */
.product {
    position: relative;
    /* Ensure card is a relative container for absolute positioning */
}

/* Container context for absolute positioning */
li.product,
.block-item,
.flickity-cell-content,
.carousel-cell,
.fcs-fav-card {
    position: relative;
}

.fcs-product-toolbar--top_right {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
}

.fcs-favorites-page .fcs-product-toolbar--top_right {
    top: 48px;
}


/* Hover Effect Logic */
/* Hover Effect Logic - Always visible for touch accessibility */
.fcs-product-toolbar--hover-effect {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: color 0.2s ease;
    transform: none;
}


/* ==========================================
   Favorite Button (Minimalistic & Compact)
   ========================================== */
.fcs-favorite-btn {
    border: none;
    background: transparent;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    box-shadow: none;
    color: #888888;
    transform: none;
}

/* Desktop-only hover effect */
@media (hover: hover) and (pointer: fine) {
    .fcs-favorite-btn:hover {
        background: transparent;
        border-color: transparent;
        color: #ff4d4d;
        transform: none;
        box-shadow: none;
    }
}

.fcs-favorite-btn.active {
    color: #ff4d4d;
    background: transparent;
    border: none;
}

.fcs-favorite-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.fcs-favorite-btn.active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Share Button */
.fcs-share-btn {
    background: transparent;
    padding: 4px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    vertical-align: middle;
    color: #888888;
    box-shadow: none;
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .fcs-share-btn:hover {
        background: transparent;
        color: #094F3A;
    }
}

.fcs-share-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    transition: stroke 0.2s ease;
}

/* Position tooltip nicely when inside toolbar */
.fcs-product-toolbar .fcs-share-tooltip {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.fcs-product-toolbar .fcs-share-tooltip.fcs-show {
    transform: translateY(0);
}

.fcs-product-toolbar .fcs-share-tooltip::before {
    left: auto;
    right: 10px;
    transform: none;
}

/* Header count without !important */
.fcs-header-favorites,
.fcs-header-comparison,
header a.fcs-header-favorites,
header a.fcs-header-comparison {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    margin: 0 1rem 0 0rem;
}

.fcs-header-favorites:hover,
.fcs-header-comparison:hover,
header a.fcs-header-favorites:hover,
header a.fcs-header-comparison:hover {
    color: #ffffff;
}

.fcs-header-favorites .fcs-count,
.fcs-header-comparison .fcs-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4d;
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ==========================================
   Favorites Page & Grid
   ========================================== */

.fcs-fav-image {
    position: relative;
    background: #f8fafc;
    width: 100%;
    aspect-ratio: 2/3;
}

.fcs-fav-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.fcs-fav-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}


.fcs-fav-price bdi {
    color: #000000;
}

.fcs-fav-price del bdi {
    color: #FA565AE5;
}

.fcs-fav-price del span {
    text-decoration-color: #FA565AE5;
}

.fcs-comparison-page .fcs-comparison-matrix h3.card-title,
.fcs-favorites-page .fcs-fav-card h3.card-title {
    font-size: 16px;
}

.fcs-comparison-page .fcs-comparison-matrix h3.card-title a,
.fcs-favorites-page .fcs-fav-card h3.card-title a {
    color: #094f3a !important;
}

.fcs-comparison-page .fcs-comparison-matrix h3.card-title a:hover,
.fcs-favorites-page .fcs-fav-card h3.card-title a:hover {
    text-decoration: underline !important;
}


.fcs-fav-remove {
    top: 12px;
    right: 10px;
    z-index: 10;
    border: none;
    color: #D20002;
    background: none;
}