/**
 * WooCommerce Favorites & Exact Reorder - Frontend Styles
 *
 * @package WooCommerce_Favorites_Reorder
 */

/* ==========================================================================
   1. FAVORITE BUTTON (LOOP, BLOCK & SINGLE PRODUCT)
   ========================================================================== */

.wc-fr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 15px;
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 600;
    color: #be185d;
    background: linear-gradient(135deg, #fff0f5 0%, #fff5f7 100%);
    border: 1.5px solid #fbcfe8;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-sizing: border-box;
    vertical-align: middle;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(190, 24, 93, 0.08), inset 0 1px 0 rgba(255,255,255,0.7);
    letter-spacing: 0.01em;
}

.wc-fr-btn:hover {
    color: #9d174d;
    background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 100%);
    border-color: #f9a8d4;
    box-shadow: 0 3px 10px rgba(190, 24, 93, 0.16), inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateY(-1px);
}

.wc-fr-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(190, 24, 93, 0.1);
}

.wc-fr-btn:focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

/* Loop, block, and auto-attached button specific */
.wc-fr-btn-loop,
.wc-fr-btn-block,
.wc-fr-btn-auto {
    margin-top: 8px;
    margin-bottom: 4px;
    width: 100%;
    justify-content: center;
}

.wc-block-components-product-button .wc-fr-favorite-btn,
.wp-block-button .wc-fr-favorite-btn {
    margin-top: 6px;
    width: 100%;
}

/* Single product button specific */
.wc-fr-btn-single {
    margin-top: 12px;
    margin-bottom: 8px;
}

/* Heart Icon Styling */
.wc-fr-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    position: relative;
    color: inherit;
    flex-shrink: 0;
}

.wc-fr-heart-icon {
    width: 17px;
    height: 17px;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s ease;
}

.wc-fr-heart-filled {
    display: none;
    color: #e11d48;
}

.wc-fr-heart-outline {
    display: block;
    color: currentColor;
}

/* Favorited State — solid rose fill */
.wc-fr-favorite-btn.is-favorited {
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48 0%, #be185d 100%);
    border-color: #e11d48;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.32), inset 0 1px 0 rgba(255,255,255,0.18);
}

.wc-fr-favorite-btn.is-favorited:hover {
    background: linear-gradient(135deg, #be123c 0%, #9d174d 100%);
    border-color: #be123c;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
    transform: translateY(-1px);
}

.wc-fr-favorite-btn.is-favorited .wc-fr-heart-outline {
    display: none;
}

.wc-fr-favorite-btn.is-favorited .wc-fr-heart-filled {
    display: block;
    color: #ffffff;
    animation: wcFrHeartPop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wc-fr-favorite-btn.is-favorited .wc-fr-label {
    color: #ffffff;
}

@keyframes wcFrHeartPop {
    0%   { transform: scale(0.5); }
    55%  { transform: scale(1.35); }
    80%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Favorite Count Badge */
.wc-fr-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    background: rgba(0,0,0,0.18);
    border-radius: 9999px;
    margin-left: 2px;
    vertical-align: middle;
}

.wc-fr-favorite-btn:not(.is-favorited) .wc-fr-count-badge {
    background: #e11d48;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.3);
}

/* Label text */
.wc-fr-label {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    transition: color 0.15s ease;
}

/* Spinner — inline inside button */
.wc-fr-spinner {
    display: none;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(190, 24, 93, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: wcFrSpin 0.75s linear infinite;
    flex-shrink: 0;
}

.wc-fr-btn.is-loading .wc-fr-icon-wrap,
.wc-fr-btn-remove.is-loading .wc-fr-remove-icon {
    display: none;
}

.wc-fr-btn.is-loading .wc-fr-spinner,
.wc-fr-btn-remove.is-loading .wc-fr-spinner {
    display: inline-block;
}

.wc-fr-favorite-btn.is-favorited .wc-fr-spinner {
    border-color: rgba(255,255,255,0.3);
    border-top-color: #ffffff;
}

@keyframes wcFrSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   2. MY ACCOUNT FAVORITES TABLE
   ========================================================================== */

.wc-fr-favorites-wrapper {
    margin: 1.5em 0;
}

.wc-fr-favorites-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

.wc-fr-favorites-table th,
.wc-fr-favorites-table td {
    padding: 12px 14px;
    vertical-align: middle;
    text-align: left;
}

.wc-fr-col-thumbnail {
    width: 70px;
    text-align: center;
}

.wc-fr-thumb-wrap img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.wc-fr-col-product {
    min-width: 180px;
}

.wc-fr-product-title {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
}

.wc-fr-product-title:hover {
    color: #e11d48;
}

.wc-fr-product-title.unavailable-title {
    color: #6b7280;
    font-style: italic;
}

.wc-fr-notice-deleted {
    display: block;
    color: #dc2626;
    font-size: 0.8rem;
}

.wc-fr-vendor-info {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

.wc-fr-vendor-link {
    color: #2563eb;
    text-decoration: none;
}

.wc-fr-vendor-link:hover {
    text-decoration: underline;
}

.wc-fr-col-price {
    white-space: nowrap;
    font-weight: 600;
}

/* Stock Badges */
.wc-fr-stock {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.wc-fr-stock.in-stock {
    background-color: #ecfdf5;
    color: #065f46;
}

.wc-fr-stock.out-of-stock {
    background-color: #fef2f2;
    color: #991b1b;
}

/* Actions Column */
.wc-fr-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wc-fr-action-buttons .button {
    margin: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
}

.wc-fr-btn-remove {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    color: #6b7280 !important;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.wc-fr-btn-remove:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.wc-fr-remove-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Deleted row styling */
.wc-fr-favorite-row.is-deleted {
    background-color: #fafafa;
    opacity: 0.85;
}

/* Fade out row animation */
.wc-fr-favorite-row.is-removing {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Empty State */
.wc-fr-empty-state {
    padding: 2em;
    text-align: center;
}

.wc-fr-empty-state p {
    margin-bottom: 1em;
    font-size: 1.05rem;
}

.wc-fr-btn-browse {
    display: inline-block;
}

/* ==========================================================================
   3-A. REORDER BUTTONS
   ========================================================================== */

.wc-fr-reorder-view-order-wrapper {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.wc-fr-btn-reorder {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wc-fr-reorder-icon {
    font-size: 1.1rem;
    display: inline-block;
}

/* =========================================================
   3. MY-ACCOUNT REORDER SPLASH CARD (Modern Aesthetic Card)
   ========================================================= */

.wc-fr-reorder-splash.wc-fr-splash-card,
div.wc-fr-splash-card {
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #2563eb !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    padding: 16px 22px !important;
    margin: 0 0 26px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    font-family: inherit !important;
    transition: all 0.25s ease !important;
    animation: wfr-scard-fade-in 0.35s ease both !important;
}

@keyframes wfr-scard-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-fr-reorder-splash.wc-fr-splash-card:hover {
    box-shadow: 0 6px 24px -2px rgba(15, 23, 42, 0.11), 0 3px 8px -1px rgba(15, 23, 42, 0.05) !important;
    border-color: #cbd5e1 !important;
    border-left-color: #1d4ed8 !important;
}

/* --- Card Topbar --- */
.wc-fr-scard-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    gap: 12px !important;
}

.wc-fr-scard-topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.wc-fr-scard-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 3px 10px !important;
    border-radius: 9999px !important;
    border: 1px solid #bfdbfe !important;
    line-height: 1.3 !important;
}

.wc-fr-scard-badge-icon {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.wc-fr-scard-order-pill {
    font-size: 0.82rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.wc-fr-scard-dismiss-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    padding: 0 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50% !important;
    color: #94a3b8 !important;
    font-size: 1.15rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.wc-fr-scard-dismiss-btn:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #ef4444 !important;
    transform: scale(1.05) !important;
}

/* --- Card Body --- */
.wc-fr-scard-body {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
}

/* Section 1: Thumbnail */
.wc-fr-scard-thumb-section {
    position: relative !important;
    flex-shrink: 0 !important;
    width: 64px !important;
    height: 64px !important;
}

.wc-fr-scard-thumb-link {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

.wc-fr-scard-thumb {
    width: 64px !important;
    height: 64px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    display: block !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.2s ease !important;
}

.wc-fr-scard-thumb-link:hover .wc-fr-scard-thumb {
    transform: scale(1.04) !important;
}

.wc-fr-scard-more-badge {
    position: absolute !important;
    bottom: -4px !important;
    right: -4px !important;
    background: #1e293b !important;
    color: #ffffff !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 9999px !important;
    border: 1.5px solid #ffffff !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Section 2: Info */
.wc-fr-scard-info-section {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.wc-fr-scard-question {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.3 !important;
}

.wc-fr-scard-product-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.35 !important;
}

.wc-fr-scard-product-title a {
    color: #0f172a !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.wc-fr-scard-product-title a:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.wc-fr-scard-product-attrs {
    font-size: 0.78rem !important;
    color: #64748b !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.3 !important;
}

.wc-fr-scard-meta-chips {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.wc-fr-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
}

.wc-fr-chip-qty {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
}

.wc-fr-chip-price {
    background: #f8fafc !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border: 1px solid #e2e8f0 !important;
}

.wc-fr-chip-total {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.wc-fr-chip-item-count {
    color: #64748b !important;
    font-weight: 500 !important;
    margin-left: 2px !important;
}

.wc-fr-chip-stock {
    font-weight: 600 !important;
}

.wc-fr-stock-dot {
    font-size: 0.55rem !important;
    line-height: 1 !important;
}

.wc-fr-stock-instock {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.wc-fr-stock-outofstock {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.wc-fr-stock-onbackorder {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* Section 3: Actions */
.wc-fr-scard-actions-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.wc-fr-scard-buttons-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.wc-fr-scard-btn-reorder {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
    line-height: 1.35 !important;
}

.wc-fr-scard-btn-reorder:hover,
.wc-fr-scard-btn-reorder:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38) !important;
    text-decoration: none !important;
    outline: none !important;
}

.wc-fr-scard-btn-reorder:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2) !important;
}

.wc-fr-scard-btn-review {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    background: #ffffff !important;
    color: #334155 !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    line-height: 1.35 !important;
}

.wc-fr-scard-btn-review:hover,
.wc-fr-scard-btn-review:focus {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    text-decoration: none !important;
}

.wc-fr-btn-icon {
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

.wc-fr-scard-safety-note {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.72rem !important;
    color: #64748b !important;
    line-height: 1.3 !important;
}

.wc-fr-safety-icon {
    color: #16a34a !important;
    font-size: 0.8rem !important;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 820px) {
    .wc-fr-scard-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .wc-fr-scard-thumb-section {
        width: 56px !important;
        height: 56px !important;
    }

    .wc-fr-scard-thumb {
        width: 56px !important;
        height: 56px !important;
    }

    .wc-fr-scard-actions-section {
        width: 100% !important;
        align-items: stretch !important;
    }

    .wc-fr-scard-buttons-group {
        width: 100% !important;
    }

    .wc-fr-scard-btn-reorder,
    .wc-fr-scard-btn-review {
        flex: 1 1 50% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .wc-fr-scard-safety-note {
        justify-content: center !important;
    }
}
/* --- 3D. CART & CHECKOUT VIRTUAL CART BANNER --- */
.wc-fr-virtual-cart-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.wc-fr-vbanner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.wc-fr-vbanner-content {
    flex: 1;
}

.wc-fr-vbanner-title {
    font-size: 1rem;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.wc-fr-vbanner-desc {
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.45;
}

.wc-fr-vbanner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.wc-fr-btn-vbanner-restore {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    padding: 7px 14px !important;
}

.wc-fr-btn-vbanner-restore:hover {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.wc-fr-btn-vbanner-merge {
    font-size: 0.85rem !important;
    padding: 7px 14px !important;
    border-radius: 6px !important;
}

/* --- 3E. VIRTUAL CART MODAL & DRAWER --- */
.wc-fr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.wc-fr-modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wc-fr-modal {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(16px);
    transition: transform 0.25s ease;
}

.wc-fr-modal-backdrop.is-open .wc-fr-modal {
    transform: translateY(0);
}

.wc-fr-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    z-index: 10;
    transition: all 0.2s ease;
}

.wc-fr-modal-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.wc-fr-modal-body {
    overflow-y: auto;
    padding: 24px;
    max-height: calc(85vh - 48px);
}

.wc-fr-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #64748b;
}

/* Modal/overlay loading spinner — scoped so it does NOT override the inline btn spinner */
.wc-fr-modal-loading .wc-fr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wc-fr-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes wc-fr-spin {
    to { transform: rotate(360deg); }
}

.wc-fr-vcart-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.wc-fr-vcart-badge {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wc-fr-vcart-badge-icon {
    color: #2563eb;
}

.wc-fr-vcart-shield-notice {
    font-size: 0.85rem;
    color: #15803d;
    background: #f0fdf4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
}

.wc-fr-vcart-notice-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.wc-fr-vcart-notice-warning ul {
    margin: 4px 0 0 18px;
    padding: 0;
}

.wc-fr-vcart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.wc-fr-vcart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.wc-fr-vcart-item-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.wc-fr-vcart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wc-fr-vcart-item-details {
    flex: 1;
    min-width: 0;
}

.wc-fr-vcart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.wc-fr-vcart-item-title a {
    color: inherit;
    text-decoration: none;
}

.wc-fr-vcart-item-title a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.wc-fr-vcart-item-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 4px;
}

.wc-fr-vcart-item-price {
    font-size: 0.85rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-fr-vcart-item-stock-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

.wc-fr-vcart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wc-fr-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

.wc-fr-qty-btn {
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 30px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.wc-fr-qty-btn:hover {
    background: #e2e8f0;
}

.wc-fr-qty-input {
    width: 36px !important;
    height: 30px !important;
    padding: 0 !important;
    text-align: center !important;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

.wc-fr-qty-input::-webkit-outer-spin-button,
.wc-fr-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-fr-vcart-item-remove {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wc-fr-vcart-item-remove:hover {
    color: #ef4444;
    background: #fee2e2;
}

.wc-fr-vcart-item-subtotal {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 65px;
    text-align: right;
}

.wc-fr-vcart-footer {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wc-fr-vcart-totals {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    font-size: 1.05rem;
}

.wc-fr-vcart-totals-label {
    color: #64748b;
}

.wc-fr-vcart-totals-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.wc-fr-vcart-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.wc-fr-btn-vcart-checkout {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
}

.wc-fr-btn-vcart-checkout:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.wc-fr-btn-vcart-merge {
    border-radius: 6px !important;
    padding: 10px 16px !important;
}

.wc-fr-vcart-empty {
    text-align: center;
    padding: 30px 10px;
    color: #64748b;
}

/* ==========================================================================
   4. MOBILE RESPONSIVENESS
   ========================================================================== */

@media (max-width: 768px) {
    .wc-fr-btn {
        min-height: 44px;
        padding: 8px 16px;
    }

    .wc-fr-favorites-table thead {
        display: none;
    }

    .wc-fr-favorites-table,
    .wc-fr-favorites-table tbody,
    .wc-fr-favorites-table tr,
    .wc-fr-favorites-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .wc-fr-favorites-table tr {
        margin-bottom: 1.25em;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .wc-fr-favorites-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f3f4f6;
    }

    .wc-fr-favorites-table td:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: flex-end;
    }

    .wc-fr-favorites-table td::before {
        content: attr(data-title);
        font-weight: 600;
        font-size: 0.85rem;
        color: #6b7280;
        margin-right: 12px;
    }

    .wc-fr-favorites-table td.wc-fr-col-thumbnail::before {
        content: "";
        display: none;
    }

    .wc-fr-favorites-table td.wc-fr-col-thumbnail {
        justify-content: center;
        padding-bottom: 12px;
    }

    .wc-fr-thumb-wrap img {
        width: 80px;
        height: 80px;
    }

    .wc-fr-action-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .wc-fr-action-buttons .button {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}


/* ==========================================================================
   5. PRODUCT HIGHLIGHTS
   ========================================================================== */

.wfr-highlights-section {
	margin: 2em 0;
}

.wfr-highlights-heading {
	margin-bottom: 1em;
	font-size: 1.4rem;
	font-weight: 700;
	color: #111827;
}

.wfr-highlights-grid {
	display: grid;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Column variants */
.wfr-highlights-cols-1 { grid-template-columns: repeat(1, 1fr); }
.wfr-highlights-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wfr-highlights-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wfr-highlights-cols-4 { grid-template-columns: repeat(4, 1fr); }
.wfr-highlights-cols-5 { grid-template-columns: repeat(5, 1fr); }
.wfr-highlights-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Product Card */
.wfr-highlights-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wfr-highlights-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.wfr-highlights-card__thumb {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #f9fafb;
}

.wfr-highlights-card__thumb a {
	display: block;
	width: 100%;
	height: 100%;
}

.wfr-highlights-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.wfr-highlights-card:hover .wfr-highlights-card__thumb img {
	transform: scale(1.04);
}

.wfr-highlights-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(17, 24, 39, 0.8);
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
	white-space: nowrap;
	backdrop-filter: blur(4px);
}

.wfr-highlights-card--favourited .wfr-highlights-card__badge {
	background: rgba(225, 29, 72, 0.85);
}

.wfr-highlights-card__body {
	padding: 12px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wfr-highlights-card__title {
	font-weight: 600;
	font-size: 0.9rem;
	color: #111827;
	text-decoration: none;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wfr-highlights-card__title:hover {
	color: #e11d48;
}

.wfr-highlights-card__price {
	font-weight: 700;
	font-size: 0.95rem;
	color: #111827;
}

.wfr-highlights-card__price .woocommerce-Price-amount {
	color: inherit;
}

.wfr-highlights-card__stock {
	font-size: 0.75rem;
}

.wfr-highlights-card__footer {
	padding: 0 12px 12px;
}

.wfr-highlights-card__atc.button {
	display: block;
	width: 100%;
	text-align: center;
	padding: 8px 12px;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 4px;
	box-sizing: border-box;
}

/* Empty state */
.wfr-highlights-empty {
	padding: 2em;
	text-align: center;
	color: #6b7280;
	font-size: 1rem;
	border: 1px dashed #d1d5db;
	border-radius: 8px;
}

/* Mobile */
@media (max-width: 768px) {
	.wfr-highlights-cols-3,
	.wfr-highlights-cols-4,
	.wfr-highlights-cols-5,
	.wfr-highlights-cols-6 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.wfr-highlights-grid {
		grid-template-columns: repeat(1, 1fr) !important;
	}
}

/* ==========================================================================
   WFR FAVORITES SCROLL / CAROUSEL COMPONENT
   ========================================================================== */

.wfr-fav-scroll-container {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    box-sizing: border-box;
    font-family: inherit;
}

.wfr-fav-scroll-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1.25rem !important;
    gap: 1rem !important;
    position: relative !important;
    width: 100% !important;
}

.wfr-fav-scroll-header-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.wfr-fav-scroll-heading {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

.wfr-fav-scroll-subheading {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: #6b7280;
}

/* Controls (Prev / Next Buttons) matching reference image */
.wfr-fav-scroll-controls {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wfr-fav-scroll-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    color: #374151 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    outline: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    text-decoration: none !important;
}

.wfr-fav-scroll-nav-btn:hover:not(:disabled):not(.is-disabled) {
    background-color: #f3f4f6 !important;
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
}

.wfr-fav-scroll-nav-btn:active:not(:disabled):not(.is-disabled) {
    transform: translateY(1px) !important;
    background-color: #e5e7eb !important;
    background: #e5e7eb !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.wfr-fav-scroll-nav-btn:disabled,
.wfr-fav-scroll-nav-btn.is-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    border-color: #e5e7eb !important;
    color: #9ca3af !important;
    background-color: #f9fafb !important;
    background: #f9fafb !important;
    box-shadow: none !important;
}

.wfr-fav-scroll-nav-btn svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.2 !important;
    pointer-events: none !important;
    vertical-align: middle !important;
    overflow: visible !important;
}

/* Scroll Track & Container (Strict Continuous Single-Line Horizontal Slider) */
.wfr-fav-scroll-track-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wfr-fav-scroll-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* STRICTLY continuous single line - never wraps */
    align-items: stretch !important;
    gap: 20px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding: 8px 4px 18px 4px;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.wfr-fav-scroll-track.is-dragging {
    cursor: grabbing !important;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.wfr-fav-scroll-track.is-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    pointer-events: none !important;
}

.wfr-fav-scroll-card img,
.wfr-fav-card-img {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Hide scrollbar for clean aesthetic while keeping touch/nav functional */
.wfr-fav-scroll-track::-webkit-scrollbar {
    height: 6px;
}

.wfr-fav-scroll-track::-webkit-scrollbar-track {
    background: transparent;
}

.wfr-fav-scroll-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.wfr-fav-scroll-track::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Individual Product Card (Strict No-Shrink Single Line) */
.wfr-fav-scroll-card {
    scroll-snap-align: start;
    flex: 0 0 240px !important; /* Never shrinks, never wraps */
    min-width: 240px !important;
    max-width: 240px !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
}

.wfr-fav-scroll-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.wfr-fav-scroll-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

/* Card Image Area */
.wfr-fav-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 14px;
    box-sizing: border-box;
}

.wfr-fav-card-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.wfr-fav-card-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.wfr-fav-scroll-card-inner:hover .wfr-fav-card-img {
    transform: scale(1.05);
}

/* Floating Action / Heart Button */
.wfr-fav-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.wfr-fav-card-heart-btn.wc-fr-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid #fbcfe8 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wfr-fav-card-heart-btn.wc-fr-btn:hover {
    background: #ffffff !important;
    transform: scale(1.1) !important;
    border-color: #f43f5e !important;
}

.wfr-fav-card-heart-btn .wc-fr-label {
    display: none !important;
}

/* Card Body */
.wfr-fav-card-body {
    padding: 12px 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 0 auto;
}

.wfr-fav-card-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.wfr-fav-card-title:hover {
    color: #2563eb;
}

.wfr-fav-card-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    margin-top: auto;
}

.wfr-fav-card-price ins {
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
}

.wfr-fav-card-price del {
    color: #94a3b8;
    font-size: 0.82rem;
    margin-right: 4px;
}

/* Card Footer / Add to Cart */
.wfr-fav-card-footer {
    padding: 6px 14px 14px;
    width: 100%;
    box-sizing: border-box;
}

.wfr-fav-card-btn.button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 7px 12px;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: 6px;
    box-sizing: border-box;
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.wfr-fav-card-btn.button:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Empty & Loading States */
.wfr-fav-scroll-empty {
    width: 100%;
    padding: 2.5rem 1rem;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.95rem;
}

.wfr-fav-scroll-empty p {
    margin: 0 0 1rem;
}

.wfr-fav-scroll-shop-btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
}

.wfr-fav-scroll-placeholder {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 3rem 1rem;
    color: #64748b;
    font-size: 0.95rem;
}

.wfr-fav-scroll-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wfr-spin 0.75s linear infinite;
}

@keyframes wfr-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .wfr-fav-scroll-heading {
        font-size: 1.25rem;
    }
    .wfr-fav-scroll-card {
        flex: 0 0 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
    }
}

