/* ============================================================
   EAZYMART - GLOBAL MOBILE SYNC (Final Polish)
   Applies fixes to Index, Shopping, Order, and all sub-pages.
============================================================ */

/* 1. HEADER & LOGO CONSISTENCY */
:root {
    --header-height: 60px;
    --bottom-nav-height: 70px;
    --primary-blue: #042853;
    --primary-gold: #DDCD5C;
}

/* Force uniform header size across all pages */
.navbar, .custom-navbar {
    min-height: var(--header-height);
    height: var(--header-height);
    padding: 0 16px !important; /* Consistent horizontal padding */
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

/* LOGO VISIBILITY FIX (The "MA" Glow) */
.navbar-brand img, .mobile-logo {
    height: 36px !important; /* Standardized size */
    width: auto !important;
    object-fit: contain;
    /* Adds a white glow outline to separate Blue text from Blue/Dark backgrounds */
    filter: drop-shadow(0px 0px 1px #ffffff) drop-shadow(0px 0px 3px rgba(255, 255, 255, 0.8));
    display: block;
}

/* 2. ELIMINATE LAYOUT GAPS */
body {
    padding-top: var(--header-height) !important;
    padding-bottom: var(--bottom-nav-height) !important;
    overflow-x: hidden;
    background-color: #f5f7fd; /* Unified background color */
}

/* Remove default Bootstrap margins that cause white bars */
.container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.row {
    margin-left: -6px !important;
    margin-right: -6px !important;
}

.col-*, [class^="col-"] {
    padding-left: 6px !important;
    padding-right: 6px !important;
}

/* Fix Hero Banner & Section spacing on Home Page */
.hero-banner, .carousel-item {
    margin-top: 10px !important;
    border-radius: 16px !important;
    overflow: hidden;
}

h5.fw-bold, h6.fw-bold {
    margin-top: 20px !important;
    margin-bottom: 12px !important;
}

/* 3. MOBILE NAVIGATION SYNCHRONIZATION (Light Mode Visibility) */
.bottom-nav {
    background-color: #ffffff !important;
    height: var(--bottom-nav-height);
    border-top: 1px solid #eeeeee;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 10px); /* iPhone Home Bar Safe Area */
}

/* Default State (Inactive) - High Contrast Grey */
.bottom-nav a {
    color: #64748b !important; 
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 1 !important; /* Force visible */
}

.bottom-nav a i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    color: #64748b !important;
}

/* Active State - Brand Blue */
.bottom-nav a.nav-item-active,
.bottom-nav a.active {
    color: var(--primary-blue) !important;
}

.bottom-nav a.nav-item-active i,
.bottom-nav a.active i {
    color: var(--primary-blue) !important;
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Badge Logic */
.bottom-nav .badge {
    top: 5px !important;
    right: 20% !important;
    background-color: #dc3545 !important;
    border: 2px solid #ffffff;
}

/* 4. DARK MODE OVERRIDES (Only if system dark mode is active) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212 !important;
    }
    .navbar, .custom-navbar, .bottom-nav, .mobile-control-panel {
        background-color: #1e1e1e !important;
        border-color: #333 !important;
    }
    .bottom-nav a {
        color: #a0a0a0 !important;
    }
    .bottom-nav a.nav-item-active {
        color: var(--primary-gold) !important;
    }
    .bottom-nav a.nav-item-active i {
        color: var(--primary-gold) !important;
    }
    /* In dark mode, remove the white glow from logo, maybe add a subtle light one */
    .navbar-brand img {
        filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
    }
}