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

:root {
    --fcs-primary: #2563eb;
    --fcs-primary-hover: #1d4ed8;
    --fcs-bg-muted: #f8fafc;
    --fcs-border: #000000;
    --fcs-icon-color: #1e293b;
    --fcs-text: #1e293b;
    --fcs-text-light: #64748b;
    --fcs-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.fcs-product-toolbar--loop {
    margin-top: 8px;
    padding: 4px 0;
}

.fcs-product-toolbar--single {
    justify-content: start;
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
}

/* 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: 99;
}

.fcs-product-toolbar--top_left {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 99;
}

.fcs-product-toolbar--top_center {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
}

.fcs-product-toolbar--img_bottom_left {
    position: absolute;
    bottom: 30%; /* Approximate position over image */
    left: 10px;
    z-index: 99;
}

.fcs-product-toolbar--img_bottom_right {
    position: absolute;
    bottom: 30%; /* Approximate position over image */
    right: 10px;
    z-index: 99;
}

.fcs-product-toolbar--img_bottom_center {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
}

/* Hover Effect Logic */
.fcs-product-toolbar--hover-effect {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

/* Specific hover triggers: only inside actual product items/cards */
li.product:hover .fcs-product-toolbar--hover-effect,
.block-item:hover .fcs-product-toolbar--hover-effect,
.flickity-cell-content:hover .fcs-product-toolbar--hover-effect,
.carousel-cell:hover .fcs-product-toolbar--hover-effect,
.type-product-loop:hover .fcs-product-toolbar--hover-effect, /* Generic loop items */
.fcs-fav-card:hover .fcs-product-toolbar--hover-effect,
.fcs-product-toolbar--hover-effect:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Slide animation override for centered elements to prevent transform conflict */
.fcs-product-toolbar--top_center.fcs-product-toolbar--hover-effect,
.fcs-product-toolbar--img_bottom_center.fcs-product-toolbar--hover-effect {
    transform: translateX(-50%) translateY(10px);
}

li.product:hover .fcs-product-toolbar--top_center.fcs-product-toolbar--hover-effect,
li.product:hover .fcs-product-toolbar--img_bottom_center.fcs-product-toolbar--hover-effect,
.block-item:hover .fcs-product-toolbar--top_center.fcs-product-toolbar--hover-effect,
.block-item:hover .fcs-product-toolbar--img_bottom_center.fcs-product-toolbar--hover-effect,
.flickity-cell-content:hover .fcs-product-toolbar--top_center.fcs-product-toolbar--hover-effect,
.flickity-cell-content:hover .fcs-product-toolbar--img_bottom_center.fcs-product-toolbar--hover-effect,
.fcs-fav-card:hover .fcs-product-toolbar--top_center.fcs-product-toolbar--hover-effect,
.fcs-fav-card:hover .fcs-product-toolbar--img_bottom_center.fcs-product-toolbar--hover-effect,
.fcs-product-toolbar--top_center.fcs-product-toolbar--hover-effect:hover,
.fcs-product-toolbar--img_bottom_center.fcs-product-toolbar--hover-effect:hover {
    transform: translateX(-50%) translateY(0);
}

/* ==========================================
   Favorite Button
   ========================================== */
.fcs-favorite-btn {
    border: 1px solid var(--fcs-border);
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: var(--fcs-icon-color);
}

.fcs-favorite-btn:hover {
    background: var(--fcs-bg-muted);
    border-color: var(--fcs-primary);
    color: var(--fcs-primary);
    transform: translateY(-2px);
    box-shadow: var(--fcs-shadow);
}

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

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

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

/* Share Button */
.fcs-share-btn {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
    margin-left: 6px;
}

.fcs-share-btn:hover {
    color: #2563eb;
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.fcs-share-btn svg {
    fill: none;
    stroke: currentColor;
}

/* Copied tooltip */
.fcs-share-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.fcs-share-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #1e293b;
}

.fcs-share-tooltip.fcs-show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Auto-injected button container (for custom sliders, page builders) */
.fcs-auto-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 5px 0;
}

.fcs-auto-buttons .fcs-favorite-btn {
    padding: 6px;
}

.fcs-auto-buttons .fcs-compare-btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.fcs-auto-buttons .fcs-compare-btn span {
    font-size: 12px;
}


/* Header count */
.fcs-header-favorites,.fcs-header-comparison {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fff !important;
}

.fcs-header-favorites .fcs-count,.fcs-header-comparison .fcs-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4d;
    color: #fff;
    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-favorites-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--fcs-text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* Premium Share Bar (Matched with Comparison Page) */
.fcs-shareable-url-container {
    margin-bottom: 40px;
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--fcs-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.fcs-share-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--fcs-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    text-align: left;
}

.fcs-shareable-url-bar {
    display: flex;
    background: var(--fcs-bg-muted);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid var(--fcs-border);
    align-items: center;
    max-width: 600px;
    transition: all 0.3s ease;
}

.fcs-shareable-url-bar:focus-within {
    border-color: var(--fcs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.fcs-share-icon {
    color: var(--fcs-primary);
    display: flex;
    align-items: center;
}

.fcs-shareable-url-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
    color: var(--fcs-text);
    outline: none;
    font-family: monospace;
}

.fcs-shareable-url-bar button {
    background: var(--fcs-primary);
    color: white;
    border: none;
    border-radius: 100px;
    padding: 10px 24px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s ease;
}

.fcs-shareable-url-bar button:hover {
    background: var(--fcs-primary-hover);
    transform: scale(1.02);
}

/* Product Grid */
.fcs-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fcs-fav-card {
    background: #fff;
    border: 1px solid var(--fcs-border);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.fcs-fav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px -10px rgba(0,0,0,0.1);
    border-color: var(--fcs-primary);
}

.fcs-fav-image {
    position: relative;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.fcs-fav-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s ease;
}

.fcs-fav-card:hover .fcs-fav-image img {
    transform: scale(1.05);
}

.fcs-fav-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 2;
}

.fcs-fav-remove:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.1);
}

.fcs-fav-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fcs-favorites-page .fcs-fav-card .fcs-fav-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

.fcs-favorites-page .fcs-fav-card .fcs-fav-title a {
    color: var(--fcs-text);
    text-decoration: none;
}

.fcs-favorites-page .fcs-fav-card .fcs-fav-title a:hover {
    color: var(--fcs-primary);
}

.fcs-favorites-page .fcs-fav-card .fcs-fav-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--fcs-primary);
    margin-bottom: 20px;
}
.fcs-favorites-page .fcs-fav-card .fcs-fav-price .custom-price-block {
    min-height: unset;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.fcs-fav-footer {
    margin-top: auto;
}

.fcs-favorites-page .fcs-fav-card .fcs-fav-cart-btn {
    display: block;
    background: var(--fcs-primary);
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.fcs-fav-cart-btn:hover {
    background: var(--fcs-primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Empty State */
.fcs-empty-msg {
    text-align: center;
    padding: 80px 20px;
    color: var(--fcs-text-light);
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .fcs-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fcs-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .fcs-shareable-url-container {
        padding: 16px;
    }
    
    .fcs-shareable-url-bar input {
        font-size: 12px;
        padding: 8px 5px;
    }
    
    .fcs-shareable-url-bar button {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .fcs-product-grid {
        grid-template-columns: 1fr;
    }
    
    .fcs-fav-image img {
        height: 240px;
    }
}


