/*
 * File: assets/css/ifl-store.css
 * Description: Centralized Global CSS for IFL Store UI components.
 * Version: 5.1.0 (Dark mode support)
 */

/* ========================================================================
   ACCESSIBILITY FOUNDATION
   ======================================================================== */

/* Screen reader only — visually hidden but accessible to assistive tech.
   Used for form labels that have visible placeholders. */
.ifl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip navigation link — appears on focus for keyboard users */
.ifl-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #37518c;
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-weight: bold;
    text-decoration: none;
    z-index: 100000;
    transition: top 0.2s;
}
.ifl-skip-link:focus {
    top: 0;
}

/* Focus outline for keyboard navigation — consistent across all interactive elements */
.ifl-header-cart-trigger:focus-visible,
.ifl-remove-btn:focus-visible,
.ifl-remove-item:focus-visible,
.ifl-catalog-card a:focus-visible,
.ifl-catalog-card button:focus-visible,
.ifl-catalog-card .button:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Donation amount radio cards — accessible visually hidden radio pattern */
.ifl-amt-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.ifl-amt-lbl:focus-within {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Header Cart */
.ifl-header-cart { position: relative; display: inline-block; cursor: pointer; font-family: inherit; }
.ifl-header-cart-trigger { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; padding: 10px 0; }
.ifl-header-cart-icon { width: 24px; height: 24px; }
.ifl-header-cart-qty { background: #37518c; color: #fff; border-radius: 50%; padding: 2px 8px; font-size: 0.8em; font-weight: bold; margin-left: -5px; }
.ifl-header-cart-total { font-weight: bold; }
.ifl-header-dropdown { display: none; position: absolute; right: 0; top: 100%; background: #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.15); padding: 20px; width: 420px; max-width: 90vw; border-radius: 8px; z-index: 99999; border: 1px solid #e2e8f0; }
/* Keyboard + hover accessible: :focus-within ensures keyboard users can open the dropdown */
@media(min-width: 768px) {
    .ifl-header-cart:hover .ifl-header-dropdown,
    .ifl-header-cart:focus-within .ifl-header-dropdown { display: block; }
}

/* Cart Page */
.ifl-cart-container { max-width: 1000px; margin: 40px auto; font-family: inherit; }
.ifl-cart-grid { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.ifl-cart-row { display: grid; grid-template-columns: 1fr; gap: 15px; padding: 20px 15px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
@media(min-width: 768px) {
    .ifl-cart-row { grid-template-columns: minmax(0, 1fr) 100px 140px 80px; padding: 20px 25px; }
    .ifl-cart-header { background: #f8fafc; border-bottom: 2px solid #cbd5e1; font-weight: bold; color: #475569; padding: 15px 25px; border-radius: 8px 8px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 100px 140px 80px; gap: 15px; margin-bottom: -15px; }
}
.ifl-cart-item-name { font-size: 1.15em; font-weight: bold; color: #37518c; line-height: 1.4; word-wrap: break-word; }
.ifl-cart-item-sku { display: inline-block; background: #e2e8f0; color: #475569; font-size: 0.75em; padding: 2px 8px; border-radius: 12px; margin-top: 6px; font-weight: bold; letter-spacing: 0.5px; }
.ifl-cart-qty-col { text-align: center; }
.ifl-cart-price-col { text-align: right; font-weight: bold; font-size: 1.2em; color: #1e293b; }
.ifl-cart-action-col { text-align: right; }
.ifl-remove-btn { color: #d63638; border: 1px solid transparent; background: none; cursor: pointer; font-weight: bold; font-size: 0.9em; padding: 6px 12px; border-radius: 4px; transition: all 0.2s; }
.ifl-remove-btn:hover, .ifl-remove-btn:focus-visible { background: #fef2f2; border-color: #fecaca; }
.ifl-remove-btn:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
.ifl-cart-footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
@media(min-width: 768px) { .ifl-cart-footer-grid { grid-template-columns: 1fr 1fr; } }

/* Checkout Page */
.ifl-checkout-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media(min-width: 768px) { .ifl-checkout-grid { grid-template-columns: 1.5fr 1fr; } }
@keyframes ifl-spin { to { transform: rotate(360deg); } }

/* Catalog / Category / Featured */
.ifl-store-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 0px; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.ifl-catalog-card { border: 1px solid #e2e8f0; padding: 15px; border-radius: 12px; background: #fff; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.2s, box-shadow 0.2s; }
.ifl-catalog-card:hover, .ifl-catalog-card:focus-within { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.ifl-catalog-card a { text-decoration: none; color: inherit; display: block; margin-bottom: 15px; }
.ifl-catalog-card img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 12px; aspect-ratio: 1/1; object-fit: cover; }
.ifl-catalog-card h3 { font-size: 1.1em; line-height: 1.3; color: #37518c; min-height: 2.6em; margin: 0; }
.ifl-catalog-price { font-weight: 900; font-size: 1.25em; margin: 8px 0; color: #1e293b; }
.ifl-catalog-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.ifl-catalog-pagination a, .ifl-catalog-pagination span { padding: 8px 14px; border: 1px solid #cbd5e1; border-radius: 6px; text-decoration: none; color: #37518c; font-weight: bold; background: #fff; }
.ifl-catalog-pagination .current { background: #37518c; color: #fff; border-color: #37518c; }

/* Search Results */
body.page-template-page-store-search .content-sidebar-wrap, 
body.page-template-page-store-search .content, 
body.page-template-page-store-search .page-full-main-bg, 
body.page-template-page-store-search .page-top, 
body.page-template-page-store-search .entry-content { 
    width: 100% !important; max-width: 100% !important; float: none !important; margin-left: auto !important; margin-right: auto !important; display: block !important; padding: 0 !important;
}
body.page-template-page-store-search .content { max-width: 1400px !important; padding: 0 20px !important; }
.ifl-store-search-container { width: 100%; max-width: 1400px; margin: 0 auto; font-family: inherit; }
.ifl-best-match-card { background: #f8fafc; border: 2px solid #37518c; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(55,81,140,0.15); margin-bottom: 40px; display: flex; flex-direction: column; width: 100% !important; }
@media(min-width: 768px) { .ifl-best-match-card { flex-direction: row; } }
.ifl-best-match-badge { display: inline-flex; background: #37518c; color: white; padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; margin-bottom: 12px; text-transform: uppercase; }
.ifl-ai-summary-box { background: #f4f6fa; border-left: 4px solid #37518c; padding: 12px 15px; border-radius: 0 8px 8px 0; font-size: 0.95rem; color: #1e2c4d; display: none; margin-top: 12px; line-height: 1.5; }
.ifl-ai-summary-box strong { color: #2b406e; text-transform: uppercase; display: block; margin-bottom: 5px;}
.ifl-shimmer { animation: shimmer 2s infinite linear; background: linear-gradient(to right, #e2e8f0 4%, #cbd5e1 25%, #e2e8f0 36%); background-size: 1000px 100%; border-radius: 4px; height: 16px; margin-bottom: 8px; }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

/* Account Dashboard */
.ifl-account-wrap { max-width: 1000px; margin: 40px auto; font-family: -apple-system, BlinkMacSystemFont, sans-serif; display: flex; gap: 40px; flex-wrap: wrap; }
.ifl-account-nav { flex: 0 0 250px; }
.ifl-account-nav ul { list-style: none; padding: 0; margin: 0; }
.ifl-account-nav a { display: block; padding: 15px 20px; text-decoration: none; color: #475569; border-left: 3px solid transparent; font-weight: bold; background: #f8fafc; margin-bottom: 5px; border-radius: 0 8px 8px 0; }
.ifl-account-nav a:hover { background: #f1f5f9; color: #1e293b; }
.ifl-account-nav a.active { border-left-color: #37518c; background: #eff6ff; color: #37518c; }
.ifl-account-content { flex: 1; min-width: 300px; }
.ifl-order-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

/* Global Cart Notification */
#ifl-cart-notification { position: fixed; top: 20px; right: 20px; background: #37518c; color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); z-index: 999999; display: none; min-width: 300px; animation: slideInRight 0.3s ease-out forwards; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
#ifl-cart-notification .actions { margin-top: 15px; display: flex; gap: 10px; }
#ifl-cart-notification .btn { flex: 1; text-align: center; padding: 8px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 0.9em; cursor: pointer; border: none; }
#ifl-cart-notification .btn-light { background: #fff !important; color: #37518c !important; }

/* Toast Notifications */
.ifl-toast { position: fixed; top: 20px; right: 20px; min-width: 320px; max-width: 480px; padding: 16px 44px 16px 20px; border-radius: 8px; color: #fff; font-size: 0.95em; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,0.25); z-index: 1000000; transform: translateX(110%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.ifl-toast--visible { transform: translateX(0); opacity: 1; }
.ifl-toast--error { background: #dc2626; }
.ifl-toast--success { background: #059669; }
.ifl-toast--warning { background: #d97706; }
.ifl-toast--info { background: #37518c; }
.ifl-toast-close { position: absolute; top: 8px; right: 12px; background: none; border: none; color: rgba(255,255,255,0.8); font-size: 1.4em; cursor: pointer; padding: 0 4px; line-height: 1; }
.ifl-toast-close:hover { color: #fff; }
.ifl-toast-msg { display: block; }

/* ========================================================================
   BUTTON HOVER/FOCUS STATES (Replacing inline onmouseover/onmouseout)
   ======================================================================== */
.ifl-add-to-cart-btn {
    width: 100%;
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background 0.2s;
}
.ifl-add-to-cart-btn:hover, .ifl-add-to-cart-btn:focus-visible {
    background: #37518c;
}
.ifl-add-to-cart-btn:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Category card links — keyboard focus matches hover state */
.ifl-category-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #37518c;
    font-weight: bold;
    font-size: 1.2em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.ifl-category-card:hover, .ifl-category-card:focus-visible {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.ifl-category-card:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Checkout form input focus */
.ifl-one-page-checkout input:focus-visible,
.ifl-one-page-checkout select:focus-visible,
.ifl-one-page-checkout textarea:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 1px;
    border-color: #3b82f6;
}

/* Modal / Dialog accessibility */
.ifl-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

/* Search bar — focus-within border highlight (replaces inline onfocusin/onfocusout) */
.ifl-search-wrap:focus-within {
    border-color: #3b82f6 !important;
}

/* Search button hover/focus (replaces inline onmouseover/onmouseout) */
.ifl-search-btn:hover, .ifl-search-btn:focus-visible {
    background: #1e3a8a !important;
}
.ifl-hero-search-form button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

/* Contextual widget recommendation links (replaces inline onmouseover/onmouseout) */
.ifl-rec-link:hover, .ifl-rec-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.ifl-rec-link:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Sidebar category nav links — hover/focus parity */
.ifl-account-nav-link:hover, .ifl-account-nav-link:focus-visible {
    background: #eff6ff !important;
}
.ifl-account-nav-link:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* ========================================================================
   COMPONENT STYLES — extracted from inline styles in ifl-shortcodes.php
   ======================================================================== */

/* --- Design Token Utilities --- */
.ifl-text-muted   { color: #64748b; }
.ifl-text-dark    { color: #1e293b; }
.ifl-text-primary { color: #37518c; }
.ifl-text-success { color: #166534; }
.ifl-text-danger  { color: #d63638; }
.ifl-fw-bold      { font-weight: bold; }
.ifl-text-center  { text-align: center; }
.ifl-text-right   { text-align: right; }
.ifl-link-inherit { text-decoration: none; color: inherit; }

/* --- Pay What You Want / PWYW --- */
.ifl-pwyw-container {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: inherit;
}
.ifl-pwyw-title { margin: 0 0 10px 0; color: #1e293b; font-size: 1.1em; }
.ifl-pwyw-desc { color: #475569; font-size: 0.9em; margin-bottom: 15px; }
.ifl-pwyw-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ifl-price-input-wrap { position: relative; flex: 1; min-width: 150px; }
.ifl-currency-symbol { position: absolute; left: 12px; top: 12px; color: #64748b; font-weight: bold; }
.ifl-price-input {
    width: 100%; padding: 10px 10px 10px 25px; border: 1px solid #cbd5e1;
    border-radius: 4px; font-weight: bold; font-size: 1.1em;
}
.ifl-btn-success {
    background: #10b981; color: #fff; border: none; padding: 12px 25px;
    border-radius: 4px; font-weight: bold; cursor: pointer; white-space: nowrap;
    transition: background 0.2s;
}
.ifl-btn-success:hover, .ifl-btn-success:focus-visible { background: #059669; }
.ifl-express-mount { width: 100%; margin-top: 10px; }

/* --- Standalone Donation Form --- */
.ifl-donation-container {
    max-width: 600px; margin: 40px auto; font-family: inherit;
    background: #fff; padding: 30px; border-radius: 12px;
    border: 1px solid #e2e8f0; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.ifl-donation-title { color: #37518c; text-align: center; margin-top: 0; margin-bottom: 20px; }
.ifl-donation-desc { text-align: center; color: #475569; margin-bottom: 25px; }
.ifl-fieldset-clean { border: none; padding: 0; margin: 0 0 15px 0; }
.ifl-amt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ifl-amt-lbl {
    background: #f8fafc; border: 2px solid #cbd5e1; padding: 15px 10px;
    text-align: center; border-radius: 6px; cursor: pointer; font-weight: bold;
    font-size: 1.2em; color: #37518c; transition: all 0.2s;
}
.ifl-amt-lbl--selected { background: #eff6ff; border-color: #37518c; }
.ifl-amt-lbl--full { grid-column: span 3; }
.ifl-custom-amt-wrap { display: none; margin-bottom: 20px; position: relative; }
.ifl-currency-lg { position: absolute; left: 15px; top: 15px; font-weight: bold; color: #37518c; font-size: 1.2em; }
.ifl-custom-amt-input {
    width: 100%; padding: 15px 15px 15px 35px; border: 2px solid #cbd5e1;
    border-radius: 6px; font-weight: bold; font-size: 1.2em; color: #37518c;
    box-sizing: border-box; outline: none;
}
.ifl-monthly-box {
    background: #eff6ff; padding: 20px; border-radius: 8px;
    margin-bottom: 20px; border: 1px solid #bfdbfe;
}
.ifl-monthly-label {
    display: flex; align-items: center; gap: 10px; font-weight: bold;
    color: #1e3a8a; cursor: pointer; font-size: 1.1em;
}
.ifl-monthly-checkbox { width: 20px; height: 20px; accent-color: #37518c; }
.ifl-monthly-date-panel {
    display: none; margin-top: 15px; padding-top: 15px; border-top: 1px solid #bfdbfe;
}
.ifl-date-label { display: block; font-size: 0.9em; font-weight: bold; margin-bottom: 5px; color: #37518c; }
.ifl-date-input {
    width: 100%; padding: 10px; border: 1px solid #cbd5e1;
    border-radius: 4px; font-family: inherit; box-sizing: border-box; outline: none;
}
.ifl-express-donation { margin-bottom: 15px; width: 100%; }
.ifl-or-divider { display: flex; align-items: center; margin: 15px 0; display: none; }
.ifl-or-line { flex: 1; border: 0; border-top: 1px solid #cbd5e1; }
.ifl-or-text { padding: 0 10px; color: #94a3b8; font-size: 0.9em; font-weight: bold; text-transform: uppercase; }
.ifl-btn-submit-lg {
    width: 100%; background: #10b981; color: #fff; border: none; padding: 18px;
    border-radius: 6px; font-weight: bold; font-size: 1.3em; cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: background 0.2s;
}
.ifl-btn-submit-lg:hover, .ifl-btn-submit-lg:focus-visible { background: #059669; }

/* --- Free Shipping Notice --- */
.ifl-fs-notice {
    padding: 12px 15px; border-radius: 6px; font-weight: bold;
    font-size: 0.95em; margin-bottom: 15px; text-align: center;
}
.ifl-fs-notice--info { background: #eff6ff; color: #37518c; border: 1px solid #bfdbfe; }
.ifl-fs-notice--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* --- State Dropdown --- */
.ifl-state-select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; }

/* --- Extra Gift UI --- */
.ifl-extra-gift-box {
    padding: 25px; border-radius: 12px; margin-top: 25px;
}
.ifl-extra-gift-box--thanks {
    background: #f0fdf4; border: 2px solid #166534; text-align: center;
}
.ifl-extra-gift-box--active {
    background: #eff6ff; border: 2px solid #37518c;
}
.ifl-extra-gift-title { margin: 0 0 10px 0; font-size: 1.2em; }
.ifl-extra-gift-title--thanks { color: #166534; margin-bottom: 5px; }
.ifl-extra-gift-title--active { color: #37518c; }
.ifl-extra-gift-desc { font-size: 0.9em; color: #64748b; margin-bottom: 15px; }
.ifl-extra-gift-desc--thanks { font-size: 0.95em; color: #15803d; margin: 0; }
.ifl-extra-gift-form { display: flex; flex-direction: column; gap: 10px; }
.ifl-gift-row { display: flex; gap: 10px; }
.ifl-gift-input-wrap { position: relative; flex: 1; }
.ifl-gift-currency { position: absolute; left: 15px; top: 12px; font-weight: bold; color: #37518c; }
.ifl-gift-input {
    width: 100%; padding: 12px 12px 12px 35px; border: 1px solid #cbd5e1;
    border-radius: 6px; font-weight: bold; font-size: 1.1em; color: #37518c;
}
.ifl-btn-primary {
    background: #37518c; color: #fff; border: none; padding: 0 25px;
    border-radius: 6px; font-weight: bold; cursor: pointer;
    transition: background 0.2s;
}
.ifl-btn-primary:hover, .ifl-btn-primary:focus-visible { background: #2c4170; }
.ifl-recurring-label {
    display: flex; align-items: center; gap: 8px; font-size: 0.95em;
    color: #1e293b; margin-top: 5px; cursor: pointer;
}
.ifl-date-wrap-sm { display: none; margin-top: 10px; }
.ifl-date-label-sm { display: block; font-size: 0.85em; font-weight: bold; margin-bottom: 5px; color: #37518c; }
.ifl-date-input-sm {
    width: 100%; padding: 8px; border: 1px solid #cbd5e1;
    border-radius: 4px; font-family: inherit;
}

/* --- Order Summary Table --- */
.ifl-order-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.ifl-order-thead { border-bottom: 2px solid #cbd5e1; background: #f8fafc; text-align: left; }
.ifl-order-th { padding: 12px 15px; color: #475569; }
.ifl-order-th--center { text-align: center; }
.ifl-order-th--right { text-align: right; }
.ifl-order-row { border-bottom: 1px solid #e2e8f0; }
.ifl-order-td { padding: 15px; }
.ifl-order-td--name { font-weight: bold; color: #37518c; }
.ifl-order-td--center { text-align: center; color: #1e293b; }
.ifl-order-td--right { text-align: right; color: #1e293b; font-weight: bold; }
.ifl-order-dl-wrap { margin-top: 8px; }
.ifl-order-dl-btn {
    display: inline-block; font-size: 0.85em; color: #ffffff;
    background-color: #10b981; padding: 6px 12px; text-decoration: none;
    border-radius: 4px; font-weight: normal;
}
.ifl-order-dl-btn:hover { background-color: #059669; color: #fff; }
.ifl-order-totals-wrap { display: flex; justify-content: flex-end; margin-top: 15px; }
.ifl-order-totals {
    width: 100%; max-width: 350px; border-collapse: collapse;
    margin-bottom: 20px; font-size: 0.95em;
}
.ifl-order-totals td { padding: 8px 0; }
.ifl-order-totals-label { color: #64748b; }
.ifl-order-totals-value { text-align: right; color: #1e293b; }
.ifl-order-total-row { border-top: 2px solid #e2e8f0; font-weight: bold; font-size: 1.2em; }
.ifl-order-total-row td { padding: 15px 0 0 0; }
.ifl-order-total-amount { color: #37518c; }
.ifl-order-details-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; margin-top: 10px; background: #f8fafc;
    padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0;
}
.ifl-order-detail-heading {
    margin: 0 0 10px 0; color: #37518c; font-size: 1em;
    border-bottom: 1px solid #cbd5e1; padding-bottom: 5px;
}
.ifl-order-detail-text { margin: 0; font-size: 0.9em; color: #475569; line-height: 1.6; }
.ifl-tribute-box {
    margin-top: 20px; background: #fffbeb; padding: 20px;
    border-radius: 8px; border: 1px solid #fde68a;
}
.ifl-tribute-title { margin: 0 0 5px 0; color: #b45309; font-size: 1.1em; }
.ifl-tribute-text { margin: 0; font-size: 0.95em; color: #92400e; }

/* --- Mini Cart --- */
.ifl-mini-empty { margin: 0; color: #64748b; }
.ifl-cart-list { list-style: none; padding: 0; margin: 0; max-height: 400px; overflow-y: auto; }
.ifl-cart-list-item {
    border-bottom: 1px solid #e2e8f0; padding: 15px 0;
    display: flex; align-items: flex-start; gap: 15px;
}
.ifl-mini-thumb-wrap { flex: 0 0 50px; height: 50px; }
.ifl-mini-thumb {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 4px; border: 1px solid #e2e8f0;
}
.ifl-mini-details { flex: 1; line-height: 1.4; }
.ifl-mini-item-name { font-weight: bold; color: #37518c; margin-bottom: 5px; }
.ifl-mini-price-col { text-align: right; min-width: 80px; }
.ifl-mini-price { font-weight: bold; font-size: 1.1em; color: #1e293b; }
.ifl-mini-remove {
    color: #d63638; border: none; background: none; cursor: pointer;
    font-size: 0.85em; text-decoration: underline; padding: 0; margin-top: 5px;
}
.ifl-mini-total {
    margin-top: 15px; text-align: right; font-weight: bold;
    font-size: 1.2em; border-top: 2px solid #cbd5e1;
    padding-top: 15px; color: #1e293b;
}
.ifl-mini-actions { margin-top: 20px; display: flex; gap: 15px; }
.ifl-mini-btn {
    flex: 1 1 50%; text-align: center; padding: 10px;
    text-decoration: none; font-weight: bold; font-size: 0.95em;
    border-radius: 6px; box-sizing: border-box;
}
.ifl-mini-btn--secondary {
    border: 2px solid #cbd5e1 !important; color: #475569 !important; background: #fff !important;
}
.ifl-mini-btn--primary {
    background: #37518c !important; border: 2px solid #37518c !important; color: #fff !important;
}
.ifl-mini-btn--secondary:hover,
.ifl-mini-btn--secondary:focus { background: #f1f5f9 !important; color: #1e293b !important; border-color: #94a3b8 !important; text-decoration: none !important; }
.ifl-mini-btn--primary:hover,
.ifl-mini-btn--primary:focus { background: #2c4170 !important; border-color: #2c4170 !important; color: #fff !important; text-decoration: none !important; }

/* --- Cart Page Specifics --- */
.ifl-cart-empty {
    padding: 40px; text-align: center; background: #f8fafc; border-radius: 8px;
}
.ifl-cart-empty a { color: #37518c; font-weight: bold; }
.ifl-cart-item-flex { display: flex; gap: 15px; align-items: center; }
.ifl-cart-thumb-wrap { flex: 0 0 70px; height: 70px; }
.ifl-cart-thumb {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 6px; border: 1px solid #e2e8f0;
}
.ifl-cart-monthly-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ifl-cart-monthly-label { font-size: 0.85em; color: #64748b; }
.ifl-cart-date-input {
    width: auto; padding: 4px 8px; border: 1px solid #cbd5e1;
    border-radius: 4px; font-size: 0.85em; font-family: inherit;
}
.ifl-qty-muted { color: #64748b; font-weight: bold; }
.ifl-qty-input {
    width: 70px; padding: 8px; border: 1px solid #cbd5e1;
    border-radius: 4px; text-align: center;
}
.ifl-donation-price-wrap { position: relative; max-width: 140px; margin-left: auto; }
.ifl-donation-currency { position: absolute; left: 12px; top: 10px; color: #64748b; font-size: 0.9em; }
.ifl-donation-input {
    width: 100%; padding: 8px 8px 8px 25px; border: 1px solid #cbd5e1;
    border-radius: 4px; text-align: left; font-weight: bold; font-family: inherit;
}
.ifl-cart-subtotal-box {
    background: #f8fafc; padding: 30px; border-radius: 12px;
    border: 1px solid #e2e8f0; display: flex; flex-direction: column;
    justify-content: center;
}
.ifl-cart-subtotal-heading {
    margin: 0 0 10px 0; text-align: center; color: #475569;
    font-size: 1.2em; text-transform: uppercase;
}
.ifl-cart-subtotal-price {
    font-size: 3em; font-weight: 900; color: #37518c;
    margin: 0 0 20px 0; text-align: center; line-height: 1;
}
.ifl-cart-btn-row { display: flex; gap: 15px; margin-top: 15px; }
.ifl-cart-btn {
    flex: 1 1 50%; padding: 15px 10px; text-decoration: none;
    border-radius: 6px; text-align: center; font-weight: bold;
    box-sizing: border-box;
}
.ifl-cart-btn--secondary {
    border: 2px solid #cbd5e1; color: #475569; background: #fff;
}
.ifl-cart-btn--primary {
    background: #37518c; color: #fff; border: 2px solid #37518c;
}

/* --- Concierge Commerce Module --- */
.ifl-concierge-section {
    margin-top: 35px; padding-top: 25px;
    border-top: 1px solid #cbd5e1; text-align: left;
}
.ifl-concierge-title { margin: 0 0 5px 0; color: #1e293b; font-size: 1.1em; }
.ifl-emoji-lg { font-size: 1.2em; }
.ifl-concierge-desc { font-size: 0.85em; color: #64748b; margin-bottom: 15px; }
.ifl-concierge-form {
    display: flex; flex-direction: column; gap: 12px;
    background: #fff; padding: 15px; border: 1px solid #e2e8f0; border-radius: 8px;
}
.ifl-concierge-select {
    padding: 10px; border: 1px solid #ccc; border-radius: 4px;
    font-weight: bold; color: #37518c;
}
.ifl-concierge-input {
    width: 100%; padding: 10px; border: 1px solid #ccc;
    border-radius: 4px; box-sizing: border-box;
}
.ifl-concierge-textarea {
    width: 100%; padding: 10px; border: 1px solid #ccc;
    border-radius: 4px; font-family: inherit; font-size: 0.9em; box-sizing: border-box;
}
.ifl-concierge-submit {
    background: #10b981; color: #fff; border: none; padding: 12px;
    border-radius: 6px; cursor: pointer; font-weight: bold;
    width: 100%; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.2s;
}
.ifl-concierge-submit:hover { background: #059669; }
.ifl-concierge-result {
    margin-top: 15px; font-size: 0.9em; color: #166534;
    display: none; background: #dcfce7; padding: 10px;
    border-radius: 4px; border: 1px solid #bbf7d0;
}
.ifl-offscreen { position: absolute; left: -9999px; }

/* --- Checkout Page --- */
.ifl-checkout-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.9); z-index: 999999;
    flex-direction: column; align-items: center; justify-content: center;
}
.ifl-spinner {
    width: 70px; height: 70px; border: 6px solid #e2e8f0;
    border-top-color: #37518c; border-radius: 50%;
    animation: ifl-spin 1s linear infinite;
}
.ifl-overlay-text { margin-top: 25px; font-weight: bold; color: #1e293b; font-size: 1.4em; }
.ifl-checkout-container {
    max-width: 1100px; margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.ifl-checkout-back { margin-bottom: 30px; }
.ifl-checkout-back a { text-decoration: none; color: #37518c; font-weight: bold; }
.ifl-checkout-section { margin-bottom: 30px; }
.ifl-checkout-heading {
    border-bottom: 2px solid #37518c; padding-bottom: 10px; color: #37518c;
}
.ifl-checkout-field-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px;
}

/* Required legend */
.ifl-required-legend {
    font-size: 0.8em; color: #6b7280; margin: 6px 0 0 0;
}
.ifl-required-legend span { color: #dc2626; font-weight: bold; }

/* Name row: Prefix | First Name | Last Name | Suffix on one line */
.ifl-name-row {
    display: grid;
    grid-template-columns: 105px 1fr 1fr 95px;
    gap: 8px;
    margin-top: 15px;
}
.ifl-name-row > div > input,
.ifl-name-row > div > select { width: 100%; box-sizing: border-box; }

/* Mobile: Prefix+First on row 1, Last+Suffix on row 2 */
@media (max-width: 767px) {
    .ifl-name-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .ifl-name-row > div:nth-child(1) { /* Prefix */
        flex: 0 0 95px;
    }
    .ifl-name-row > div:nth-child(2) { /* First Name — fills rest of row 1 */
        flex: 1 1 0;
        min-width: calc(100% - 110px); /* Forces Last Name to wrap to row 2 */
    }
    .ifl-name-row > div:nth-child(3) { /* Last Name — fills most of row 2 */
        flex: 1 1 0;
        min-width: calc(100% - 100px);
    }
    .ifl-name-row > div:nth-child(4) { /* Suffix */
        flex: 0 0 85px;
    }
}

/* Mobile: City on its own line, State + Zip on the next */
@media (max-width: 767px) {
    .ifl-checkout-3col {
        grid-template-columns: 1fr 1fr;
    }
    .ifl-checkout-3col > div:first-child {
        grid-column: 1 / -1; /* City spans full width */
    }
}
.ifl-checkout-field-full { margin-top: 15px; }
.ifl-checkout-input {
    width: 100%; padding: 12px; border: 1px solid #ccc;
    border-radius: 4px; box-sizing: border-box;
}
.ifl-checkout-label { font-weight: bold; display: block; margin-bottom: 5px; font-size: 0.9em; }

/* --- International Banner --- */
.ifl-intl-banner {
    background: #fffbeb; border: 2px solid #fde68a; padding: 25px;
    border-radius: 8px; margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.ifl-intl-banner-title {
    margin: 0 0 10px 0; color: #b45309;
    display: flex; align-items: center; gap: 10px;
}
.ifl-intl-banner-text { color: #92400e; font-size: 1.05em; line-height: 1.5; margin-bottom: 15px; }
.ifl-intl-banner-text--fallback { color: #92400e; font-size: 1.05em; line-height: 1.5; }
.ifl-intl-banner-btn {
    display: block; background: #b45309; color: #fff; padding: 15px;
    border-radius: 6px; text-decoration: none; font-weight: bold;
    font-size: 1.1em; text-align: center; cursor: pointer; transition: background 0.2s;
}
.ifl-intl-banner-btn:hover { background: #92400e; color: #fff; }
.ifl-intl-dismiss { color: #92400e; text-decoration: underline; font-size: 0.9em; }
.ifl-intl-dismiss-wrap { text-align: center; margin-top: 10px; }

/* --- Cart Empty (checkout) --- */
.ifl-checkout-empty { padding: 40px; text-align: center; }

/* --- Checkout Form Fields --- */
.ifl-checkout-input-full {
    width: 100%; padding: 12px; border: 1px solid #ccc;
    border-radius: 4px; margin-top: 15px;
}
.ifl-checkout-input-inline {
    padding: 12px; border: 1px solid #ccc; border-radius: 4px;
}
.ifl-checkout-3col { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-top: 15px; }
.ifl-checkout-ship-toggle {
    display: flex; align-items: center; gap: 8px; margin-top: 20px;
    font-weight: bold; cursor: pointer; color: #37518c;
}
.ifl-checkout-checkbox { width: 18px; height: 18px; accent-color: #37518c; }
.ifl-shipping-panel {
    display: none; margin-top: 15px; padding: 20px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 8px;
}
.ifl-shipping-title { margin: 0 0 15px 0; color: #1e293b; float: none; width: 100%; padding: 0; }
.ifl-optin-box {
    margin-top: 25px; padding: 15px; background: #f8fafc;
    border-radius: 8px; border: 1px solid #e2e8f0;
}
.ifl-optin-label {
    display: flex; align-items: center; gap: 10px; font-size: 0.95em;
    color: #1e293b; font-weight: bold; cursor: pointer;
}

/* --- Payment Section --- */
.ifl-payment-element {
    min-height: 200px; background: #fff; padding: 15px;
    border: 1px solid #e2e8f0; border-radius: 8px;
}
.ifl-payment-loading { padding: 20px; text-align: center; color: #94a3b8; }
.ifl-payment-disabled { padding: 20px; text-align: center; color: #d63638; font-weight: bold; }
#payment-request-button { margin-bottom: 20px; }
.ifl-payment-divider {
    display: none; text-align: center; margin-bottom: 20px;
    color: #64748b; font-size: 0.9em; font-weight: bold;
}
.ifl-payment-divider span {
    background: #fff; padding: 0 10px; position: relative; top: 10px;
}
.ifl-payment-divider hr { border-top: 1px solid #e2e8f0; margin-top: 0; }
.ifl-cc-label { display: block; font-weight: bold; color: #1e293b; margin-bottom: 5px; }

/* --- Radio Station Search --- */
.ifl-radio-panel {
    display: none; margin-top: 15px; padding: 20px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.ifl-radio-title { margin: 0 0 10px 0; color: #1e293b; font-size: 1.05em; }
.ifl-radio-desc { font-size: 0.9em; color: #475569; margin-bottom: 10px; }
.ifl-radio-search {
    width: 100%; padding: 10px; border: 1px solid #ccc;
    border-radius: 4px; margin-bottom: 10px;
}
.ifl-radio-select { height: 150px; }

/* --- Tribute Section --- */
.ifl-tribute-panel {
    padding: 20px; background: #f8fafc; border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ifl-tribute-label {
    display: flex; align-items: center; gap: 8px; font-weight: bold;
    cursor: pointer; color: #1e293b; margin: 0;
}
.ifl-tribute-fields {
    display: none; margin-top: 15px; padding-top: 15px;
    border-top: 1px solid #cbd5e1;
}
.ifl-tribute-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 15px; }
.ifl-tribute-optional { font-weight: normal; color: #64748b; font-size: 0.8em; }

/* --- Submit Button --- */
.ifl-checkout-submit {
    width: 100%; padding: 18px; background: #37518c; color: #fff;
    border: none; font-size: 1.2em; font-weight: bold; cursor: pointer;
    border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background 0.2s;
}
.ifl-checkout-submit:hover, .ifl-checkout-submit:focus-visible { background: #2c4170; }

/* --- Order Summary Sidebar --- */
.ifl-summary-sidebar {
    background: #f8fafc; padding: 25px; border-radius: 12px;
    border: 1px solid #e2e8f0; position: sticky; top: 20px;
}
.ifl-summary-header {
    display: flex; justify-content: space-between; align-items: center;
}
.ifl-summary-header h3 { margin: 0; }
.ifl-summary-edit { font-size: 0.85em; color: #37518c; }
.ifl-summary-list { margin-top: 20px; }
.ifl-summary-item {
    display: flex; justify-content: space-between; margin-bottom: 15px;
    font-size: 0.95em; align-items: start;
}
.ifl-summary-divider { border-top: 1px solid #cbd5e1; margin: 20px 0 0 0; padding-top: 15px; }
.ifl-summary-row {
    display: flex; justify-content: space-between; color: #64748b; margin-bottom: 8px;
}
.ifl-summary-grand {
    margin-top: 25px; padding: 20px; border-top: 3px solid #37518c;
    display: flex; justify-content: space-between; align-items: baseline;
}
.ifl-summary-grand-label { font-size: 1.2em; font-weight: bold; }
.ifl-summary-grand-total { font-size: 2em; font-weight: 900; color: #37518c; }
.ifl-summary-qty { color: #37518c; }
.ifl-summary-price { font-weight: bold; }
.ifl-summary-row--discount { color: #10b981; }
.ifl-summary-subtext { font-size: 0.85em; color: #64748b; text-align: right; margin-top: 5px; }

/* --- Address Verification Modal --- */
.ifl-smarty-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99999;
    align-items: center; justify-content: center;
}
.ifl-smarty-modal {
    background: #fff; padding: 30px; border-radius: 12px;
    max-width: 550px; width: 90%; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.ifl-smarty-title {
    margin-top: 0; color: #37518c; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px;
}
.ifl-smarty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 25px 0; }
.ifl-smarty-entered {
    background: #f8fafc; padding: 15px; border: 1px solid #e2e8f0; border-radius: 8px;
}
.ifl-smarty-suggested {
    background: #eff6ff; padding: 15px; border: 2px solid #37518c; border-radius: 8px;
}
.ifl-smarty-suggested span { font-weight: bold; }
.ifl-smarty-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* --- Order Confirmation --- */
.ifl-confirmation-wrap { max-width: 800px; margin: 40px auto; font-family: inherit; }
.ifl-confirmation-header { text-align: center; margin-bottom: 30px; }
.ifl-confirmation-icon {
    width: 72px; height: 72px; color: #10b981; margin: 0 auto 20px auto;
}
.ifl-confirmation-title { color: #1e293b; margin-bottom: 10px; font-size: 2.5em; }
.ifl-confirmation-subtitle { font-size: 1.2em; color: #64748b; }
.ifl-confirmation-card {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 30px; text-align: left; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.ifl-confirmation-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid #37518c; padding-bottom: 15px; margin-bottom: 20px;
}
.ifl-confirmation-card-header h3 { margin: 0; color: #37518c; font-size: 1.5em; }
.ifl-confirmation-meta { text-align: right; font-size: 0.9em; color: #64748b; }
.ifl-confirmation-txn-id { color: #94a3b8; }
.ifl-confirmation-footer {
    margin-top: 25px; padding-top: 20px; border-top: 1px solid #e2e8f0;
    font-size: 0.95em; color: #475569; line-height: 1.5;
}
.ifl-confirmation-cta { margin-top: 30px; text-align: center; }
.ifl-confirmation-btn {
    background: #37518c; color: #fff; padding: 12px 35px;
    text-decoration: none; border-radius: 6px; font-weight: bold;
}
.ifl-confirmation-btn:hover { background: #2c4170; color: #fff; }

/* --- Post-Checkout Login/Register --- */
.ifl-post-checkout-box {
    padding: 25px; border-radius: 12px; text-align: left; margin-bottom: 30px;
}
.ifl-post-checkout-box--login {
    background: #eff6ff; border: 1px solid #bfdbfe;
}
.ifl-post-checkout-box--register {
    background: #f8fafc; border: 1px solid #cbd5e1;
}
.ifl-post-checkout-box h3 { margin-top: 0; font-size: 1.3em; }
.ifl-post-checkout-box--login h3 { color: #1e3a8a; }
.ifl-post-checkout-box--register h3 { color: #37518c; }
.ifl-post-checkout-box p { margin-bottom: 15px; }
.ifl-post-checkout-box--login p { color: #3b82f6; }
.ifl-post-checkout-box--register p { color: #475569; }

/* --- Store Home --- */
.ifl-store-hero {
    background: linear-gradient(135deg, #1e293b 0%, #37518c 100%);
    border-radius: 16px; padding: 60px 30px; text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px -5px rgba(55, 81, 140, 0.3);
}
.ifl-store-hero-title {
    color: #fff; font-size: 2.5em; margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.ifl-store-hero-desc {
    color: #bfdbfe; font-size: 1.2em; margin: 0 auto 30px auto;
    max-width: 600px; line-height: 1.5;
}
.ifl-store-hero-search { max-width: 700px; margin: 0 auto; }
.ifl-store-section-divider { margin-top: 60px; border-top: 2px solid #e2e8f0; padding-top: 40px; }
.ifl-catalog-title {
    color: #1e293b; margin-top: 0; font-size: 2em;
    border-bottom: 2px solid #e2e8f0; padding-bottom: 10px;
}
.ifl-no-image-placeholder {
    width: 100%; aspect-ratio: 1/1; background: #e2e8f0; border-radius: 8px;
    margin-bottom: 12px; display: flex; align-items: center;
    justify-content: center; color: #94a3b8;
}
.ifl-no-image-placeholder--light {
    background: #f1f5f9; font-weight: bold;
}
.ifl-add-form { background: #f8fafc; padding: 12px; border-radius: 8px; }
.ifl-add-form--outlined {
    background: #fff; border: 1px solid #cbd5e1;
}
.ifl-product-actions { margin-top: auto; }

/* --- Category Grid --- */
.ifl-categories-wrap { margin-bottom: 40px; }
.ifl-categories-title { color: #1e293b; margin-top: 0; margin-bottom: 20px; font-size: 1.8em; }
.ifl-category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.ifl-category-count {
    font-size: 0.75em; color: #64748b; margin-top: 8px; font-weight: normal;
    background: #f1f5f9; padding: 2px 10px; border-radius: 12px;
}

/* --- Search Results --- */
.ifl-search-bar {
    display: flex; width: 100%; box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 50px; overflow: hidden; background: #fff;
    border: 2px solid #cbd5e1; transition: border-color 0.3s;
}
.ifl-search-icon-wrap {
    padding: 15px 10px 15px 25px; color: #94a3b8; display: flex; align-items: center;
}
.ifl-search-input {
    flex: 1; padding: 15px 15px 15px 5px; border: none; outline: none;
    font-size: 1.1em; background: transparent; color: #1e293b;
    box-shadow: none; -webkit-appearance: none;
}
.ifl-search-submit {
    background: #37518c; color: #fff; border: none; padding: 0 35px;
    font-weight: bold; font-size: 1.1em; cursor: pointer; transition: background 0.2s;
}
.ifl-search-empty {
    padding: 40px; text-align: center; border: 1px dashed #ccc;
}
.ifl-debug-log {
    background: #fee2e2; border: 1px solid #ef4444; padding: 15px;
    margin-bottom: 30px; border-radius: 8px; color: #b91c1c;
}
.ifl-debug-log ul { margin: 0; padding-left: 20px; }
.ifl-best-match-img { width: 100%; height: 100%; object-fit: cover; min-height: 250px; }
.ifl-best-match-body { padding: 25px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ifl-best-match-title a { text-decoration: none; color: #0f172a; }
.ifl-best-match-price { font-weight: 800; font-size: 1.4em; margin: 0 0 12px 0; color: #1e293b; }
.ifl-search-results-heading {
    font-size: 1.3rem; color: #475569; margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0; padding-bottom: 10px;
}
.ifl-search-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px;
}
.ifl-search-no-results {
    padding: 60px; background: #f8fafc; border-radius: 12px;
    text-align: center; border: 1px solid #e2e8f0;
}
.ifl-search-no-results p { font-size: 1.2em; color: #64748b; }

/* --- Contextual Widget --- */
.ifl-contextual-widget {
    background: #f8fafc; padding: 25px; border: 1px solid #cbd5e1;
    border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px; font-family: inherit;
}
.ifl-widget-title { margin: 0 0 15px 0; color: #1e293b; font-size: 1.2em; }
.ifl-widget-rec-heading {
    margin: 25px 0 15px 0; border-top: 2px solid #e2e8f0;
    padding-top: 20px; color: #37518c; font-size: 1.05em; text-transform: uppercase;
}
.ifl-rec-list { display: flex; flex-direction: column; gap: 15px; }
.ifl-rec-link {
    display: flex; gap: 15px; text-decoration: none; color: inherit;
    background: #fff; padding: 12px; border: 1px solid #e2e8f0;
    border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s;
}
.ifl-rec-thumb-wrap { flex: 0 0 60px; height: 60px; }
.ifl-rec-thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.ifl-rec-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ifl-rec-name {
    margin: 0 0 4px 0; font-size: 0.95em; font-weight: bold;
    color: #1e293b; line-height: 1.3;
}
.ifl-rec-price { font-weight: bold; color: #10b981; font-size: 0.9em; }

/* --- Smart Recommendations --- */
.ifl-smart-recs-heading {
    margin: 0 0 15px 0; color: #1e293b; font-size: 1.2em;
    border-bottom: 2px solid #e2e8f0; padding-bottom: 10px;
}
.ifl-smart-rec-card-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.ifl-smart-rec-btn {
    width: 100%; background: #f8fafc; color: #37518c;
    border: 1px solid #cbd5e1; padding: 10px; border-radius: 6px;
    font-weight: bold; cursor: pointer;
}
.ifl-smart-rec-btn:hover { background: #eff6ff; }

/* --- My Account --- */
.ifl-account-login-wrap {
    max-width: 600px; margin: 40px auto; padding: 40px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 12px; text-align: center;
    font-family: inherit;
}
.ifl-account-login-title { color: #37518c; margin-top: 0; }
.ifl-account-login-desc { color: #475569; font-size: 1.1em; margin-bottom: 25px; }
.ifl-account-login-btn {
    display: inline-block; background: #37518c; color: #fff;
    padding: 14px 35px; border-radius: 6px; text-decoration: none;
    font-weight: bold; font-size: 1em;
}
.ifl-account-login-btn:hover { background: #2c4170; color: #fff; }
.ifl-account-welcome {
    padding: 20px; background: #37518c; color: white;
    border-radius: 8px; margin-bottom: 20px;
}
.ifl-account-welcome h3 { margin: 0 0 5px 0; font-size: 1.2em; }
.ifl-account-welcome-name { font-weight: bold; font-size: 1.4em; }
.ifl-account-logout { color: #d63638; }
.ifl-order-history-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.ifl-order-history-header h2 { margin: 0; color: #1e293b; }
.ifl-sync-btn { font-size: 0.85em; padding: 4px 10px; }
.ifl-order-card--se { border-left: 4px solid #0ea5e9; }
.ifl-order-card--digital { border-left: 4px solid #10b981; }
.ifl-order-card-header {
    display: flex; justify-content: space-between; border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px; margin-bottom: 15px; font-size: 0.9em; color: #64748b;
}
.ifl-badge { padding: 2px 6px; border-radius: 4px; font-size: 0.8em; font-weight: bold; }
.ifl-badge--offline { background: #e0f2fe; color: #0284c7; }
.ifl-badge--digital { background: #dcfce7; color: #166534; }
.ifl-order-card-body {
    display: flex; justify-content: space-between; align-items: center;
}
.ifl-order-card-items { font-size: 0.9em; color: #475569; flex: 1; }
.ifl-order-card-total { text-align: right; min-width: 100px; }
.ifl-order-card-amount { font-weight: bold; font-size: 1.2em; color: #1e293b; }
.ifl-section-title { margin: 0; color: #1e293b; }
.ifl-downloads-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px;
}
.ifl-download-card {
    background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px;
    padding: 20px; text-align: center;
}
.ifl-download-card h4 { margin: 0 0 15px 0; color: #37518c; }

/* --- Profile Form --- */
.ifl-profile-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 25px; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.ifl-profile-desc { color: #475569; margin-top: 0; margin-bottom: 20px; }
.ifl-profile-form { display: flex; flex-direction: column; gap: 15px; }
.ifl-profile-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ifl-profile-3col { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 15px; }
.ifl-profile-label {
    display: block; font-weight: bold; font-size: 0.9em;
    color: #1e293b; margin-bottom: 5px;
}
.ifl-profile-label-hint { font-weight: normal; color: #64748b; }
.ifl-profile-input {
    width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px;
}
.ifl-profile-input--disabled {
    border-color: #e2e8f0; background: #f8fafc; color: #64748b; cursor: not-allowed;
}
.ifl-profile-section-heading {
    margin: 15px 0 5px 0; border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px; font-size: 1.1em; color: #37518c;
}
.ifl-profile-actions { margin-top: 15px; }
.ifl-profile-submit {
    background: #37518c; color: #fff; border: none; padding: 12px 25px;
    border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1em;
}
.ifl-profile-submit:hover { background: #2c4170; }
.ifl-profile-result { margin-left: 15px; font-weight: bold; font-size: 0.9em; }

/* --- Product Recommendations Footer --- */
.ifl-recommendations-wrapper {
    margin-top: 60px; border-top: 2px solid #e2e8f0;
    padding-top: 40px; font-family: inherit;
}
.ifl-recs-title { color: #1e293b; margin-top: 0; font-size: 2em; margin-bottom: 20px; }
.ifl-recs-loading {
    min-height: 200px; display: flex; align-items: center; justify-content: center;
    background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px;
}
.ifl-recs-loading-inner {
    color: #64748b; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.ifl-recs-loading-text {
    font-weight: bold; letter-spacing: 0.5px; font-size: 0.9em; margin-top: 10px;
}

/* ========================================================================
   COMPANION RESOURCE DETAIL PAGE
   ======================================================================== */

/* Back to dashboard link */
.ifl-companion-back-link {
    display: inline-block;
    color: #37518c;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 12px;
    transition: color 0.2s;
}
.ifl-companion-back-link:hover {
    color: #2c4170;
    text-decoration: underline;
}

.ifl-companion-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.ifl-companion-detail-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Cover image column */
.ifl-companion-cover-wrap {
    flex: 0 0 38%;
    min-width: 220px;
}
.ifl-companion-cover-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.ifl-companion-cover-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: bold;
    border: 1px solid #e2e8f0;
}

/* Info column */
.ifl-companion-info {
    flex: 1;
    min-width: 280px;
}
.ifl-companion-description {
    font-size: 1.05em;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
}
.ifl-companion-description p:last-child {
    margin-bottom: 0;
}

/* Download button */
.ifl-companion-download-btn {
    display: inline-block;
    background: #37518c;
    color: #fff;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95em;
    transition: background 0.2s;
    border: 2px solid #37518c;
}
.ifl-companion-download-btn:hover {
    background: #2c4170;
    border-color: #2c4170;
    color: #fff;
}
.ifl-companion-download-btn:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

.ifl-companion-coming-soon {
    color: #64748b;
    font-style: italic;
    margin-top: 20px;
}

/* ---- Upsell Card: "Get the full resource" ---- */

.ifl-companion-upsell {
    max-width: 900px;
    margin: 50px auto 0;
    padding: 0 20px 100px;
}
.ifl-companion-upsell-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
.ifl-companion-upsell-heading {
    font-size: 1.6em;
    color: #37518c;
    margin: 0;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'Arno Pro', 'Garamond', 'Georgia', serif;
    font-style: italic;
}
.ifl-companion-upsell-card-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 30px;
}
.ifl-companion-upsell-sidebar {
    flex: 1 1 0;
    min-width: 0;
    text-align: right;
    border-left: 1px solid #e2e8f0;
    padding-left: 30px;
}

/* Upsell image */
.ifl-companion-upsell-image {
    flex: 1 1 0;
    min-width: 0;
}
.ifl-companion-upsell-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Upsell description (column 2) */
.ifl-companion-upsell-desc {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: #475569;
}

/* Upsell meta details */
.ifl-companion-upsell-meta {
    margin-bottom: 20px;
}
.ifl-companion-upsell-format {
    margin: 0 0 4px 0;
    font-size: 0.9em;
    color: #1e293b;
    font-weight: 600;
}
.ifl-companion-upsell-code {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #64748b;
    font-weight: bold;
    text-transform: uppercase;
}
.ifl-companion-upsell-price {
    margin: 0 0 8px 0;
    font-size: 2em;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.2;
}

/* Stock status badges */
.ifl-companion-stock {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    letter-spacing: 0.3px;
}
.ifl-companion-stock--available {
    background: #f0fdf4;
    color: #15803d;
}
.ifl-companion-stock--unavailable {
    background: #fef2f2;
    color: #b91c1c;
}
.ifl-companion-stock--backorder {
    background: #fffbeb;
    color: #b45309;
}

/* Upsell action area */
.ifl-companion-upsell-action {
    margin-top: 20px;
}
.ifl-companion-upsell-qty {
    width: 100%;
    height: 46px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1.1em;
    text-align: center;
    box-sizing: border-box;
}

/* Upsell button — works as both <a> and <button> */
a.ifl-companion-upsell-btn,
button.ifl-companion-upsell-btn {
    display: inline-block;
    background: #37518c;
    color: #fff;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
a.ifl-companion-upsell-btn:hover,
button.ifl-companion-upsell-btn:hover {
    background: #2c4170;
    color: #fff;
}
a.ifl-companion-upsell-btn:focus-visible,
button.ifl-companion-upsell-btn:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* ---- Locked overlay link styles ---- */
.ifl-companion-overlay-text a {
    color: #fff;
    text-decoration: underline;
}
.ifl-companion-overlay-text a:hover {
    text-decoration: none;
}

/* ---- Copyright terms ---- */
.ifl-companion-copyright {
    display: block;
    margin-top: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* ---- Dashboard ---- */
.ifl-companion-dashboard {
    width: 100%;
    box-sizing: border-box;
}

/* ---- Companion cards section (below page-top content area) ---- */
.ifl-companion-cards-section {
    padding: 0 50px 50px;
}
.ifl-companion-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}
a.ifl-companion-card { cursor: pointer; }
a.ifl-companion-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.ifl-companion-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #f1f5f9;
    overflow: hidden;
}
.ifl-companion-card-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.ifl-companion-card-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.ifl-companion-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ifl-companion-card-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    margin-bottom: 10px;
    align-self: flex-start;
}
.ifl-companion-card-tag--expiring {
    background: #fee2e2;
    color: #b91c1c;
}
.ifl-companion-card-tag--permanent {
    background: #e0e7ff;
    color: #1d4ed8;
}
.ifl-companion-card-title {
    margin: 0 0 10px 0;
    color: #882D2B;
    font-size: 1.25em;
    font-family: 'Arno Pro', 'Garamond', 'Georgia', serif;
}
.ifl-companion-card-excerpt {
    color: #475569;
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.5;
    flex: 1;
}
.ifl-companion-card-cta {
    display: block;
    text-align: center;
    background: #37528C;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: auto;
}

/* ---- Dashboard card grid ---- */
.ifl-companion-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    width: 100%;
}

/* ---- Responsive: Stack on mobile ---- */
@media (max-width: 767px) {
    .ifl-companion-dashboard {
        padding: 0 15px;
    }
    .ifl-companion-cards-section {
        padding: 0 15px 30px;
    }
    .ifl-companion-card-grid {
        grid-template-columns: 1fr;
    }
    .ifl-companion-detail {
        padding: 20px 15px;
    }
    .ifl-companion-upsell {
        padding: 0 15px 100px;
    }
    .ifl-companion-detail-grid {
        flex-direction: column;
    }
    .ifl-companion-cover-wrap {
        flex: none;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .ifl-companion-upsell-card-body {
        flex-direction: column;
    }
    .ifl-companion-upsell-image {
        flex: none;
        width: 160px;
        margin: 0 auto;
    }
    .ifl-companion-upsell-sidebar {
        flex: none;
        width: 100%;
        text-align: center;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-left: 0;
        padding-top: 20px;
    }
}

/* ==========================================================================
   DARK MODE — html.ifl-dark overrides
   Uses CSS custom properties from the theme's dark mode variables.
   ========================================================================== */

/* --- Cart Page --- */
html.ifl-dark .ifl-cart-container { color: #e0e0e0; }
html.ifl-dark .ifl-cart-row { background: #1e1e1e; border-color: #3a3a3a; box-shadow: none; }
html.ifl-dark .ifl-cart-header { background: #2a2a2a; border-bottom-color: #3a3a3a; color: #b0b0b0; }
html.ifl-dark .ifl-cart-item-name { color: #7ba3d9; }
html.ifl-dark .ifl-cart-item-sku { background: #3a3a3a; color: #b0b0b0; }
html.ifl-dark .ifl-cart-price-col { color: #e0e0e0; }
html.ifl-dark .ifl-cart-empty { background: #2a2a2a; color: #b0b0b0; }
html.ifl-dark .ifl-cart-empty a { color: #7ba3d9; }
html.ifl-dark .ifl-cart-thumb { border-color: #3a3a3a; }
html.ifl-dark .ifl-cart-monthly-label { color: #b0b0b0; }
html.ifl-dark .ifl-cart-date-input { background: #333; color: #e0e0e0; border-color: #555; }
html.ifl-dark .ifl-qty-muted { color: #b0b0b0; }
html.ifl-dark .ifl-qty-input { background: #333; color: #e0e0e0; border-color: #555; }
html.ifl-dark .ifl-donation-currency { color: #b0b0b0; }
html.ifl-dark .ifl-donation-input { background: #333; color: #e0e0e0; border-color: #555; }
html.ifl-dark .ifl-cart-subtotal-box { background: #2a2a2a; border-color: #3a3a3a; }
html.ifl-dark .ifl-cart-subtotal-heading { color: #b0b0b0; }
html.ifl-dark .ifl-cart-subtotal-price { color: #7ba3d9; }
html.ifl-dark .ifl-cart-btn--secondary { background: #2a2a2a; border-color: #555; color: #e0e0e0; }
html.ifl-dark .ifl-remove-btn { color: #ef4444; }
html.ifl-dark .ifl-remove-btn:hover,
html.ifl-dark .ifl-remove-btn:focus-visible { background: #3a1a1a; border-color: #7f1d1d; }

/* --- Catalog / Category Cards --- */
html.ifl-dark .ifl-catalog-card { background: #1e1e1e; border-color: #3a3a3a; box-shadow: none; }
html.ifl-dark .ifl-catalog-card:hover,
html.ifl-dark .ifl-catalog-card:focus-within { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4); }
html.ifl-dark .ifl-catalog-card h3 { color: #7ba3d9; }
html.ifl-dark .ifl-catalog-price { color: #e0e0e0; }
html.ifl-dark .ifl-catalog-pagination a,
html.ifl-dark .ifl-catalog-pagination span { background: #2a2a2a; border-color: #3a3a3a; color: #7ba3d9; }

/* --- Search Results --- */
html.ifl-dark .ifl-best-match-card { background: #2a2a2a; border-color: #7ba3d9; }
html.ifl-dark .ifl-ai-summary-box { background: #1e1e1e; color: #e0e0e0; border-left-color: #7ba3d9; }
html.ifl-dark .ifl-ai-summary-box strong { color: #7ba3d9; }

/* --- Account Dashboard --- */
html.ifl-dark .ifl-account-nav a { background: #2a2a2a; color: #b0b0b0; }
html.ifl-dark .ifl-account-nav a:hover { background: #333; color: #e0e0e0; }
html.ifl-dark .ifl-account-nav a.active { background: #1e3a6e; color: #7ba3d9; border-left-color: #7ba3d9; }
html.ifl-dark .ifl-order-card { background: #1e1e1e; border-color: #3a3a3a; color: #e0e0e0; }

/* --- Mini Cart --- */
html.ifl-dark .ifl-mini-empty { color: #b0b0b0; }
html.ifl-dark .ifl-cart-list-item { border-bottom-color: #3a3a3a; }
html.ifl-dark .ifl-mini-thumb { border-color: #3a3a3a; }
html.ifl-dark .ifl-mini-item-name { color: #7ba3d9; }
html.ifl-dark .ifl-mini-price { color: #e0e0e0; }
html.ifl-dark .ifl-mini-total { border-top-color: #3a3a3a; color: #e0e0e0; }
html.ifl-dark .ifl-mini-btn--secondary { background: #2a2a2a; border-color: #555; color: #e0e0e0; }

/* --- Checkout --- */
html.ifl-dark .ifl-checkout-grid { color: #e0e0e0; }
html.ifl-dark .ifl-checkout-container { color: #e0e0e0; }
html.ifl-dark .ifl-checkout-heading { color: #7ba3d9; border-bottom-color: #7ba3d9; }
html.ifl-dark .ifl-checkout-label { color: #e0e0e0; }
html.ifl-dark .ifl-checkout-input,
html.ifl-dark .ifl-checkout-input-full,
html.ifl-dark .ifl-checkout-input-inline { background: #333; color: #e0e0e0; border-color: #555; }
html.ifl-dark .ifl-required-legend { color: #b0b0b0; }
html.ifl-dark .ifl-shipping-title { color: #e0e0e0; }
html.ifl-dark .ifl-optin-box { background: #2a2a2a; border-color: #3a3a3a; }
html.ifl-dark .ifl-optin-label { color: #e0e0e0; }
html.ifl-dark .ifl-summary-sidebar { background: #1e1e1e; border-color: #3a3a3a; }
html.ifl-dark .ifl-summary-header h3 { color: #e0e0e0; }
html.ifl-dark .ifl-summary-edit { color: #7ba3d9; }
html.ifl-dark .ifl-summary-item { color: #e0e0e0; }
html.ifl-dark .ifl-summary-divider { border-top-color: #3a3a3a; }
html.ifl-dark .ifl-summary-row { color: #b0b0b0; }
html.ifl-dark .ifl-summary-grand { border-top-color: #7ba3d9; }
html.ifl-dark .ifl-summary-grand-label { color: #e0e0e0; }
html.ifl-dark .ifl-summary-grand-total { color: #7ba3d9; }
html.ifl-dark .ifl-summary-qty { color: #7ba3d9; }
html.ifl-dark .ifl-summary-subtext { color: #b0b0b0; }
html.ifl-dark .ifl-payment-element { background: #2a2a2a; border-color: #3a3a3a; }
html.ifl-dark .ifl-payment-divider span { background: #1e1e1e; color: #b0b0b0; }
html.ifl-dark .ifl-payment-divider hr { border-top-color: #3a3a3a; }
html.ifl-dark .ifl-cc-label { color: #e0e0e0; }
html.ifl-dark .ifl-radio-panel { background: #2a2a2a; border-color: #3a3a3a; }
html.ifl-dark .ifl-radio-title { color: #e0e0e0; }
html.ifl-dark .ifl-radio-desc { color: #b0b0b0; }
html.ifl-dark .ifl-radio-search { background: #333; color: #e0e0e0; border-color: #555; }
html.ifl-dark .ifl-tribute-panel { background: #2a2a2a; border-color: #3a3a3a; }
html.ifl-dark .ifl-tribute-label { color: #e0e0e0; }
html.ifl-dark .ifl-tribute-fields { border-top-color: #3a3a3a; }
html.ifl-dark .ifl-checkout-back a { color: #7ba3d9; }
html.ifl-dark .ifl-checkout-empty { color: #b0b0b0; }

/* --- Free Shipping Notice --- */
html.ifl-dark .ifl-fs-notice--info { background: #1e2d4a; color: #7ba3d9; border-color: #3a5a8a; }
html.ifl-dark .ifl-fs-notice--success { background: #1a2e1a; color: #4ade80; border-color: #2a5a2a; }

/* --- Extra Gift UI --- */
html.ifl-dark .ifl-extra-gift-box--active { background: #1e2d4a; border-color: #7ba3d9; }
html.ifl-dark .ifl-extra-gift-box--thanks { background: #1a2e1a; border-color: #166534; }
html.ifl-dark .ifl-extra-gift-title--active { color: #7ba3d9; }
html.ifl-dark .ifl-extra-gift-title--thanks { color: #4ade80; }
html.ifl-dark .ifl-extra-gift-desc { color: #b0b0b0; }
html.ifl-dark .ifl-extra-gift-desc--thanks { color: #4ade80; }
html.ifl-dark .ifl-gift-input { background: #333; color: #7ba3d9; border-color: #555; }
html.ifl-dark .ifl-gift-currency { color: #7ba3d9; }
html.ifl-dark .ifl-recurring-label { color: #e0e0e0; }
html.ifl-dark .ifl-date-label-sm { color: #7ba3d9; }
html.ifl-dark .ifl-date-input-sm { background: #333; color: #e0e0e0; border-color: #555; }

/* --- Concierge Commerce --- */
html.ifl-dark .ifl-concierge-title { color: #e0e0e0; }
html.ifl-dark .ifl-concierge-desc { color: #b0b0b0; }
html.ifl-dark .ifl-concierge-form { background: #1e1e1e; border-color: #3a3a3a; }
html.ifl-dark .ifl-concierge-select { background: #333; color: #e0e0e0; border-color: #555; }
html.ifl-dark .ifl-concierge-section { border-top-color: #3a3a3a; }

/* --- Tribute --- */
html.ifl-dark .ifl-tribute-title { color: #fbbf24; }
html.ifl-dark .ifl-tribute-text { color: #fcd34d; }

/* --- Mailchimp Signup Widget (sidebar) --- */
html.ifl-dark .widget_mc4wp_form_widget { background-color: #2a2a2a; border-color: #3a3a3a; }

/* --- Monthly Companion --- */
html.ifl-dark .ifl-monthly-box { background: #2a2a2a; border-color: #3a3a3a; }
html.ifl-dark .ifl-monthly-label { color: #e0e0e0; }

/* --- State Dropdown --- */
html.ifl-dark .ifl-state-select { background: #333; color: #e0e0e0; border-color: #555; }

/* --- Header Cart Dropdown --- */
html.ifl-dark .ifl-header-dropdown { background: #1e1e1e; border-color: #3a3a3a; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
html.ifl-dark .ifl-header-cart-total { color: #e0e0e0; }
html.ifl-dark .ifl-mini-btn--secondary:hover,
html.ifl-dark .ifl-mini-btn--secondary:focus { background: #333; color: #e0e0e0; border-color: #555; }

/* --- Cart Page Buttons --- */
html.ifl-dark .ifl-cart-btn--secondary:hover,
html.ifl-dark .ifl-cart-btn--secondary:focus { background: #333; color: #e0e0e0; border-color: #555; }

/* --- Monthly Companion Dashboard --- */
html.ifl-dark .ifl-companion-intro,
html.ifl-dark .ifl-companion-intro-inner { color: #e0e0e0; }
html.ifl-dark .ifl-companion-card-title { color: #882D2B !important; }
html.ifl-dark .ifl-companion-card-excerpt { color: #475569 !important; }
html.ifl-dark .ifl-companion-card-tag--expiring { background: #3a1a1a; color: #fca5a5; }
html.ifl-dark .ifl-companion-card-tag--permanent { background: #1e2d4a; color: #93c5fd; }

/* --- Companion Resource Detail --- */
html.ifl-dark .ifl-companion-description { color: #e0e0e0; }
html.ifl-dark .ifl-companion-coming-soon { color: #b0b0b0; }

/* --- Companion Upsell Card ("Get the full resource") --- */
html.ifl-dark .ifl-companion-upsell-card { background: #1e1e1e; border-color: #3a3a3a; box-shadow: none; }
html.ifl-dark .ifl-companion-upsell-heading { color: #7ba3d9; border-bottom-color: #3a3a3a; }
html.ifl-dark .ifl-companion-upsell-desc { color: #b0b0b0; }
html.ifl-dark .ifl-companion-upsell-sidebar { border-left-color: #3a3a3a; }
html.ifl-dark .ifl-companion-upsell-format { color: #e0e0e0; }
html.ifl-dark .ifl-companion-upsell-code { color: #b0b0b0; }
html.ifl-dark .ifl-companion-upsell-price { color: #e0e0e0; }
html.ifl-dark .ifl-companion-stock--available { background: #1a2e1a; color: #4ade80; }
html.ifl-dark .ifl-companion-stock--unavailable { background: #3a1a1a; color: #fca5a5; }
html.ifl-dark .ifl-companion-stock--backorder { background: #2a2400; color: #fbbf24; }
html.ifl-dark .ifl-companion-upsell-qty { background: #333; color: #e0e0e0; border-color: #555; }

/* --- Category Sidebar --- */
html.ifl-dark .ifl-cat-sidebar-inner { background: #1e1e1e !important; border-color: #3a3a3a !important; box-shadow: none !important; }
html.ifl-dark .ifl-cat-sidebar h2 { color: #e0e0e0 !important; border-bottom-color: #3a3a3a !important; }
html.ifl-dark .ifl-cat-sidebar p { color: #b0b0b0 !important; }
html.ifl-dark .ifl-cat-sidebar a { color: #7ba3d9 !important; }
html.ifl-dark .ifl-cat-sidebar .ifl-account-nav-link { background: transparent !important; }
html.ifl-dark .ifl-cat-sidebar .ifl-account-nav-link[aria-current="page"] { background: #1e3a6e !important; }
html.ifl-dark .ifl-cat-sidebar .ifl-account-nav-link span { background: #3a3a3a !important; color: #b0b0b0 !important; }
html.ifl-dark .ifl-cat-sidebar select { background: #333 !important; color: #e0e0e0 !important; border-color: #555 !important; }
html.ifl-dark .ifl-cat-sidebar div[style*="border-bottom"] { border-bottom-color: #3a3a3a !important; }