/* ===== Global Navbar ===== */
.nav {
    background-color: #1D1616;
    color: #FFECB3;
    padding: 10px;
    font-family: 'Poppins', sans-serif;
    height: auto;
    z-index: 2000;
}
.nav .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    height: auto;
}
.nav .col-md-4,
.nav .col-4,
.nav .col-6,
.nav .col-2 {
    display: flex;
    justify-content: center;
    align-items: center;
}
.WelcomeUser {
    font-size: 0.7rem;
    color: #FFFFFF;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding-left: 5px;
}
.userName {
    color: #FFFFFF;
    font-weight: bold;
}
.loginBtn {
    font-size: 0.9rem;
    font-weight: bold;
    color: #FFECB3;
    background-color: #C75B12;
    padding: 8px 11px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
#main-cart-total,
#total-savings,
.fa-coins,
.fa-piggy-bank {
    font-weight: bold;
    font-size: 1rem;
    color: #FFFFFF;
}

/* ===== Center wrap (totals + free-delivery alert) ===== */
.nav-center-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-width: 0;
}
.nav-totals-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Default: hide free-delivery alert on all pages */
#alert-container {
    display: none;
    width: 100%;
    max-width: 100%;
    text-align: center;
    line-height: 1.35;
    font-size: 0.78rem;
    font-weight: 600;
    box-sizing: border-box;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 4px;
    color: #FFFFFF;
}
#alert-container .fd-line {
    color: #FFFFFF;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}
/* Amount + "Free Delivery" */
#alert-container .fd-gold {
    color: #FFECB3;
    font-weight: 800;
}

/* Checkout only */
.nav-center-wrap.is-checkout .nav-totals-row {
    display: none !important;
}
.nav-center-wrap.is-checkout #alert-container.is-visible {
    display: block !important;
    background: transparent !important;
}
/* Body text white */
.nav-center-wrap.is-checkout #alert-container,
.nav-center-wrap.is-checkout #alert-container .fd-line {
    color: #FFFFFF !important;
}
/* Amount + Free Delivery cream (NOT white) */
.nav-center-wrap.is-checkout #alert-container .fd-gold {
    color: #FFECB3 !important;
}

/* ===== Search bar row ===== */
.searchBar {
    padding: 5px 10px;
    border-bottom: 1px solid #2C2525;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    gap: 5px;
    background: #FFFFFF;
}
.searchBar .col-2,
.searchBar .col-5,
.searchBar .col-6,
.searchBar .col-7,
.searchBar .col-4,
.searchBar .col-sm-2,
.searchBar .col-sm-6,
.searchBar .col-sm-4,
.searchBar .col-md-2,
.searchBar .col-md-7,
.searchBar .col-md-3,
.searchBar .col-lg-2,
.searchBar .col-lg-8 {
    float: none;
    padding: 0;
    display: flex;
    align-items: center;
}
.search-bar-container {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
}
.search-bar-container .form-control {
    border-radius: 20px;
    border: 1.5px solid #8E1616;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    height: 35px;
    padding: 8px 30px 8px 12px;
    box-sizing: border-box;
    color: #1D1616;
}
.search-bar-container .form-control:focus {
    box-shadow: 0 4px 12px rgba(142, 22, 22, 0.3);
    outline: none;
    border-color: #8E1616;
}
.search-bar-container .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #8E1616;
    pointer-events: none;
}
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #2C2525;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-height: 150px;
    overflow-y: auto;
    z-index: 1120;
    display: none;
    background-color: #FFECB3;
}
.suggestions div {
    padding: 6px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #1D1616;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.suggestions div:hover {
    background-color: #8E1616;
    color: #FFECB3;
}

/* ===== Veg toggle (if used) ===== */
.veg-toggle-btn {
    background-color: #FFECB3;
    border: 1px solid #8E1616;
    padding: 4px 8px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 35px;
    box-sizing: border-box;
    white-space: nowrap;
    margin-right: 20px;
    min-width: 95px;
    flex-shrink: 0;
}
.veg-toggle-btn i {
    font-size: 1rem;
    color: #8E1616;
}
.veg-toggle-btn .veg-text {
    color: #8E1616;
    font-size: 0.9rem;
    font-weight: 600;
}
.veg-toggle-btn .toggle-switch {
    position: relative;
    width: 35px;
    height: 18px;
    background-color: #FFECB3;
    border: 2px solid #8E1616;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}
.veg-toggle-btn .toggle-switch input {
    display: none;
}
.veg-toggle-btn .toggle-switch .slider {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #8E1616;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* ===== Responsive ===== */
@media (max-width: 360px) {
    .nav { padding: 6px; }
    .WelcomeUser { font-size: 0.45rem; gap: 4px; }
    .loginBtn { font-size: 0.5rem; padding: 6px 8px; }
    #main-cart-total, #total-savings, .fa-coins, .fa-piggy-bank { font-size: 0.7rem; }
    #alert-container { font-size: 0.6rem; }
    .searchBar { padding: 2px 4px; gap: 3px; }
    .search-bar-container .form-control { font-size: 0.65rem; height: 28px; padding: 4px 22px 4px 8px; margin-right: 5px;}
    .search-bar-container .search-icon { font-size: 0.75rem; right: 8px; }
    .suggestions div { font-size: 0.6rem; padding: 3px 6px; }
    .veg-toggle-btn { padding: 2px 5px; height: 28px; margin-right: 8px; min-width: 40px; }
    .veg-toggle-btn i { font-size: 0.75rem; }
    .veg-toggle-btn .veg-text { font-size: 0.55rem; }
    .veg-toggle-btn .toggle-switch { width: 20px; height: 12px; }
    .veg-toggle-btn .toggle-switch .slider { width: 9px; height: 9px; }
    .veg-toggle-btn .toggle-switch input:checked + .slider { transform: translateX(8px); }
}
@media (min-width: 361px) and (max-width: 480px) {
    .nav { padding: 8px; }
    .WelcomeUser { font-size: 0.55rem; gap: 5px; }
    .loginBtn { font-size: 0.65rem; }
    #main-cart-total, #total-savings, .fa-coins, .fa-piggy-bank { font-size: 0.75rem; }
    #alert-container { font-size: 0.65rem; }
    .searchBar { padding: 3px 6px; gap: 4px; }
    .search-bar-container .form-control { font-size: 0.72rem; height: 30px; padding: 5px 24px 5px 9px; margin-right: 5px;}
    .search-bar-container .search-icon { font-size: 0.8rem; }
    .suggestions div { font-size: 0.68rem; padding: 4px 8px; }
    .veg-toggle-btn { height: 30px; min-width: 70px; margin-right: 12px; }
    .veg-toggle-btn .veg-text { font-size: 0.7rem; }
    .veg-toggle-btn .toggle-switch { width: 28px; height: 14px; }
    .veg-toggle-btn .toggle-switch .slider { width: 11px; height: 11px; }
    .veg-toggle-btn .toggle-switch input:checked + .slider { transform: translateX(13px); }
}
@media (min-width: 481px) and (max-width: 720px) {
    .WelcomeUser { font-size: 0.72rem; }
    .loginBtn { font-size: 0.75rem; }
    #main-cart-total, #total-savings, .fa-coins, .fa-piggy-bank { font-size: 0.85rem; }
    #alert-container { font-size: 0.75rem; }
    .search-bar-container .form-control { font-size: 0.82rem; height: 32px; }
}
@media (min-width: 721px) {
    .WelcomeUser { font-size: 0.85rem; }
    #alert-container { font-size: 0.85rem; }
    .search-bar-container .form-control { font-size: 0.9rem; height: 35px; }
}