/* GoBuy Global Light Theme Variables */

body.light-theme {
    --bg-dark: #F3F4F6;
    --bg-card: #FFFFFF;
    --white: #0F172A;
    --text-light: #0F172A;
    --text-muted: #4B5563;
    --glass: #FFFFFF;
    --glass-border: #D1D5DB;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --primary: #0072FF;
    --primary-dark: #0056b3;

    /* Merchant Specific overrides */
    --green: #1B5E20;
    --red: #B71C1C;
    --orange: #E65100;
}

body.light-theme,
body.light-theme * {
    color: #0F172A !important;
}

/* Light Theme Overrides for common components */
body.light-theme .navbar,
body.light-theme .header-top-row,
body.light-theme .header-bottom-row,
body.light-theme .merchant-header,
body.light-theme .card,
body.light-theme .manage-card,
body.light-theme .stat-item,
body.light-theme .product-details-card,
body.light-theme .amazon-category-card,
body.light-theme .product-card-mini,
body.light-theme .modal-content,
body.light-theme .drawer-content,
body.light-theme .edit-card,
body.light-theme .container {
    background: var(--bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    box-shadow: var(--card-shadow) !important;
}

/* Stronger backgrounds for merchant action cards in light mode */
body.light-theme .manage-card {
    background: linear-gradient(135deg, #FFFFFF, #F8FAFC) !important;
}
body.light-theme .manage-card:hover {
    background: #FFFFFF !important;
    border-color: var(--primary) !important;
}

body.light-theme .header-logo-text,
body.light-theme .sub-nav-link,
body.light-theme .nav-action-item,
body.light-theme .nav-cart-btn,
body.light-theme .header-actions,
body.light-theme .sub-nav-all,
body.light-theme .drawer-header,
body.light-theme .drawer-link,
body.light-theme .section-title,
body.light-theme .product-title,
body.light-theme h1, body.light-theme h2, body.light-theme h3, body.light-theme h4 {
    color: var(--text-light) !important;
}

/* Fix Merchant Store Name in Light Mode */
body.light-theme .store-name {
    background: none !important;
    -webkit-text-fill-color: #0F172A !important;
    color: #0F172A !important;
    font-weight: 900;
}

body.light-theme .form-input,
body.light-theme .search-cat-dropdown,
body.light-theme select,
body.light-theme input,
body.light-theme textarea {
    background: #FFFFFF !important;
    border: 2px solid #E2E8F0 !important;
    color: #1F2937 !important;
}

body.light-theme .form-input:focus {
    border-color: var(--primary) !important;
}

body.light-theme .header-search-bar {
    background: white !important;
    border: 1px solid #CBD5E1 !important;
}

body.light-theme .sticky-footer {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid #E2E8F0 !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05) !important;
}

body.light-theme .btn-secondary {
    background: #E2E8F0 !important;
    color: #0F172A !important;
    border: 1px solid #CBD5E1 !important;
}

body.light-theme .current-price,
body.light-theme .stat-item b,
body.light-theme .manage-card i {
    color: var(--primary) !important;
}

body.light-theme #loading-overlay,
body.light-theme #loader-overlay {
    background: #FFFFFF !important;
}

body.light-theme .manage-card p,
body.light-theme .stat-item span,
body.light-theme .store-status {
    color: var(--text-muted) !important;
}

/* Category Icons Invisibility Fix in Light Mode */
body.light-theme .sf-cat-chip,
body.light-theme .pv-cat-chip {
    background: #F1F5F9 !important;
    color: #0F172A !important;
    border: 1px solid #E2E8F0 !important;
}
body.light-theme .sf-cat-chip.active,
body.light-theme .pv-cat-chip.active {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    border-color: var(--primary) !important;
}

/* Layout adjustments for better visibility in light mode */
body.light-theme .pattern-layer {
    opacity: 0.2 !important;
}

/* Global Mobile Overrides for consistency across all pages */
@media (max-width: 768px) {
    :root {
        --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .container, .registration-container, .manage-card, .stat-item, .product-details-card, . Amazon-category-card {
        padding: 20px !important;
        border-radius: 15px !important;
    }

    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.2rem !important; }
    h3 { font-size: 1.1rem !important; }

    .form-input, select, input, textarea {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
        border-radius: 10px !important;
    }

    .btn, button:not(.close-modal):not(.close-drawer):not(.fab-edit-img):not(.cart-qty-btn) {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        border-radius: 12px !important;
    }

    /* Fixed Viewport elements */
    .navbar { height: 60px !important; padding: 0 15px !important; }
    .drawer-content { padding: 15px 0 !important; }
}

@media (max-width: 480px) {
    .container { padding: 15px 10px !important; }
    .card { padding: 15px !important; border-radius: 12px !important; }
}

/* SweetAlert Global Theming for Dark / Light Modes */
.swal2-popup {
    background: #0A0E17 !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    font-family: 'Tajawal', sans-serif !important;
}
.swal2-title, .swal2-html-container {
    color: #FFFFFF !important;
}
body.light-theme .swal2-popup {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border: 1px solid #D1D5DB !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}
body.light-theme .swal2-title,
body.light-theme .swal2-html-container {
    color: #0F172A !important;
}
