﻿/* ============================================================
   Двухстрочный navbar — светло-синяя тема
   ============================================================ */

.navbar {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%) !important;
    padding: 0 !important;
    box-shadow: 0 4px 22px rgba(15, 45, 120, 0.35), 0 1px 0 rgba(255, 255, 255, 0.12) inset !important;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    transition: none !important;
}

.navbar > .container {
    flex-direction: column !important;
    padding: 0 20px !important;
    max-width: 100% !important;
    gap: 0;
}

.navbar-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.navbar-bottom-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    overflow: visible;
    padding: 4px 0 6px;
    gap: 8px;
}

/* Глобальный поиск (GET /search?q=) */
.nav-global-search {
    flex: 0 0 auto;
}
.nav-global-search .form-control {
    min-width: 100px;
    max-width: 200px;
    border-radius: 8px 0 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.95);
    font-size: 13px;
}
.nav-global-search .form-control::placeholder {
    color: #64748b;
}
.nav-global-search .btn-outline-light {
    border-radius: 0 8px 8px 0;
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    padding-inline: 10px;
}
.nav-global-search .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.65);
}

.navbar-bottom-row .navbar-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.navbar-bottom-row .dropdown {
    position: relative;
}

.navbar-bottom-row .dropdown-menu {
    z-index: 1100;
}

.navbar-brand {
    color: #fff !important;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.45);
    text-decoration: none;
}
.navbar-brand img {
    height: 36px;
    width: auto;
}
.navbar-brand .brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0f2fe;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.85);
    display: inline-block;
    margin-left: 2px;
}

.navbar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    margin: 0 !important;
    padding: 0 !important;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.96) !important;
    white-space: nowrap;
    font-size: 13px;
    padding: 6px 11px !important;
    font-weight: 500;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    gap: 5px;
    transition: none !important;
    border: 1px solid transparent;
}
.navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
}
.navbar .nav-link i {
    font-size: 12px;
    width: 1em;
    text-align: center;
}

.navbar .nav-link.nav-highlight {
    color: #fff9e6 !important;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
}
.navbar .nav-link.nav-highlight:hover {
    background: rgba(255, 255, 255, 0.28);
}

.navbar .dropdown-toggle { color: rgba(255, 255, 255, 0.96) !important; }
.navbar .dropdown-toggle::after { color: rgba(255, 255, 255, 0.55); }

.navbar .dropdown-menu {
    background: #1e40af;
    border: 1px solid rgba(147, 197, 253, 0.35);
    border-radius: 12px;
    box-shadow: 0 10px 36px rgba(30, 58, 138, 0.35);
    padding: 8px;
    min-width: 200px;
}
.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.navbar .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 4px 0;
}

.mobile-main-menu-list .list-group-item {
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 2px;
}
.mobile-main-menu-list .list-group-item:hover,
.mobile-main-menu-list .list-group-item:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.btn-nav-login {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
}

.btn-nav-login:hover {
    filter: brightness(1.05);
    color: #fff !important;
}

.btn-nav-ghost {
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    background: rgba(255, 255, 255, 0.12) !important;
}
.btn-nav-ghost:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #fff !important;
}

.nav-user-icon {
    font-size: 18px !important;
    color: #e0f2fe !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 8px !important;
    padding: 5px 9px !important;
}
.navbar-toggler-icon { filter: brightness(0) invert(1); }

.header-search-bar {
    background: rgba(29, 78, 216, 0.96) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 7px 0 !important;
}
.header-search-bar .btn-success {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 6px 16px !important;
}
.header-search-bar .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
}

@media (max-width: 992px) {
    .navbar-bottom-row {
        display: none !important;
    }
    .nav-global-search {
        width: 100%;
        margin-bottom: 4px;
    }
    .nav-global-search .input-group {
        width: 100%;
    }
    .nav-global-search .form-control {
        max-width: none;
        flex: 1 1 auto;
    }
    .navbar-bottom-row .navbar-nav {
        flex-direction: column !important;
        width: 100%;
        gap: 2px;
    }
    .navbar-bottom-row .nav-link {
        width: 100%;
        padding: 10px 12px !important;
        border-radius: 8px;
    }
    .navbar-top-row { padding: 8px 0; }
    .offcanvas.offcanvas-start {
        width: min(86vw, 360px);
        background: linear-gradient(180deg, #173ea5 0%, #1e40af 100%);
    }
}

@media (max-width: 1200px) {
    .navbar .nav-link { font-size: 12px; padding: 5px 8px !important; }
}

.namaz-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    padding: 0 16px;
}
.namaz-city-select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #fff9c4;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
}
.namaz-city-select option { background: #1e40af; color: #fff; }
.namaz-times-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}
.ni {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 52px;
}
.ni-active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 215, 0, 0.45);
}
.ni-n {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
.ni-t {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
}
.ni-active .ni-t { color: #fff9c4; }
.ni-active .ni-n { color: rgba(255, 249, 196, 0.85); }
.namaz-loading { color: rgba(255, 255, 255, 0.55); font-size: 12px; }

@media (max-width: 1200px) {
    .ni { min-width: 44px; padding: 2px 5px; }
    .ni-t { font-size: 11px; }
    .namaz-city-select { font-size: 10px; padding: 2px 6px; }
}
@media (max-width: 992px) {
    .namaz-inline { display: none; }
}

.namaz-bar { display: none !important; }

/* Navbar: сават ва танланганлар счётчики (барча саҳифаларда) */
.shop-nav-cart,
.favorites-nav-link {
    position: relative;
}

.shop-cart-badge,
.favorites-nav-badge {
    position: absolute;
    top: 2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.85);
}

.shop-cart-badge {
    background: #f97316;
}

.favorites-nav-badge {
    background: #eab308;
}

.navbar-toggler .favorites-nav-badge {
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 0.6rem;
}
