/* =====================================================
   WATERALL HEADER
===================================================== */

:root {
    --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --navy: #061527;
    --navy-dark: #04101f;
    --navy-light: #081f39;
    --blue: #10b9f5;
    --white: #ffffff;
}

body {
    font-family: var(--ui);
}


/* =====================================================
   DESKTOP TOP BAR
===================================================== */

.waterall-topbar {
    position: relative;
    z-index: 1040;
    background: var(--navy-dark);
    color: var(--white);
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.waterall-topbar a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.waterall-topbar a:hover {
    color: var(--blue);
}

.topbar-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.topbar-info span,
.topbar-info a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.topbar-info i {
    width: 15px;
    color: var(--blue);
    text-align: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.topbar-admin-link {
    color: var(--blue) !important;
    font-weight: 700;
}


/* =====================================================
   MAIN HEADER
===================================================== */

.waterall-main-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--navy);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.waterall-main-header,
#mainNav {
    min-height: 95px !important;
    padding: 0 !important;
    background: var(--navy) !important;
}

#mainNav .container-fluid {
    min-height: 95px;
    display: flex;
    align-items: center;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.waterall-logo {
    display: block;
    width: auto !important;
    height: 65px !important;
    max-height: none !important;
    object-fit: contain;
}


/* =====================================================
   DESKTOP NAVIGATION
===================================================== */

#mainNav .navbar-nav {
    gap: 18px;
}

#mainNav .nav-link {
    position: relative;
    display: inline-block;
    margin: 0 !important;
    padding: 10px 0 !important;
    color: var(--white) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--blue) !important;
    background: transparent !important;
}

#mainNav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 38px;
    height: 2.5px;
    background: var(--blue);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(16, 185, 245, 0.9);
    transform: translateX(-50%);
}


/* =====================================================
   DESKTOP HEADER ACTIONS
===================================================== */

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
}

.header-actions form {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-action {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px !important;
    color: var(--white) !important;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.header-action:hover,
.header-action:focus {
    color: var(--blue) !important;
    background: rgba(255, 255, 255, 0.05);
}

.header-action i {
    font-size: 19px !important;
}


/* =====================================================
   CART BADGE
===================================================== */

.cart-badge {
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    color: var(--white);
    background: var(--blue);
    border: 2px solid var(--navy);
    border-radius: 50px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.desktop-cart-badge {
    margin-left: 1px;
}


/* =====================================================
   REQUEST SERVICE BUTTON
===================================================== */

.request-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 22px !important;
    color: var(--white) !important;
    background: var(--blue) !important;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(16, 185, 245, 0.17);
    font-size: 14px !important;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.request-btn:hover {
    color: var(--white) !important;
    box-shadow: 0 11px 25px rgba(16, 185, 245, 0.25);
    transform: translateY(-1px);
}


/* =====================================================
   DESKTOP USER DROPDOWN
===================================================== */

.desktop-user-dropdown {
    position: relative;
}

.desktop-user-trigger {
    background: transparent;
    border: 0;
}

.desktop-user-trigger::after {
    margin-left: 4px;
    vertical-align: middle;
    border-top-width: 4px;
    border-right-width: 4px;
    border-left-width: 4px;
}

.user-dropdown-menu {
    min-width: 240px;
    margin-top: 14px !important;
    padding: 9px;
    background: #ffffff;
    border: 1px solid rgba(6, 21, 39, 0.1);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(3, 14, 28, 0.2);
}

.user-dropdown-name {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 10px 13px;
}

.user-avatar {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: rgba(16, 185, 245, 0.1);
    border-radius: 50%;
    font-size: 17px;
}

.user-dropdown-name > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-dropdown-name strong {
    max-width: 160px;
    overflow: hidden;
    color: var(--navy);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-name small {
    margin-top: 2px;
    color: #748092;
    font-size: 11px;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    color: var(--navy);
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.user-dropdown-menu .dropdown-item i {
    width: 18px;
    color: var(--blue);
    text-align: center;
}

.user-dropdown-menu .dropdown-item:hover,
.user-dropdown-menu .dropdown-item:focus {
    color: var(--navy);
    background: rgba(16, 185, 245, 0.09);
}

.user-dropdown-menu form {
    width: 100%;
}

.user-dropdown-menu form .dropdown-item {
    width: 100%;
    cursor: pointer;
}

.user-dropdown-menu .dropdown-logout:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.07);
}

.user-dropdown-menu .dropdown-logout:hover i {
    color: #dc3545;
}

.user-dropdown-menu .dropdown-divider {
    margin: 5px 3px;
    border-color: rgba(6, 21, 39, 0.1);
}


/* =====================================================
   MOBILE HEADER CONTROLS
===================================================== */

.mobile-header-controls {
    display: none;
    align-items: center;
    margin-left: auto;
    gap: 9px;
}

.mobile-cart {
    position: relative;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.mobile-cart:hover {
    color: var(--blue);
    background: rgba(16, 185, 245, 0.06);
    border-color: rgba(16, 185, 245, 0.55);
}

.mobile-cart i {
    font-size: 20px;
}

.mobile-cart .cart-badge {
    position: absolute;
    top: -5px;
    right: -4px;
}


/* =====================================================
   MOBILE HAMBURGER
===================================================== */

.navbar-toggler.mobile-menu-toggle {
    position: relative;
    width: 48px;
    height: 46px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 9px;
    box-shadow: none !important;
}

.navbar-toggler.mobile-menu-toggle:hover {
    border-color: rgba(16, 185, 245, 0.8);
}

.navbar-toggler.mobile-menu-toggle:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 245, 0.15) !important;
}

.mobile-menu-toggle .menu-line {
    width: 25px;
    height: 2px;
    display: block;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    transform-origin: center;
    transition:
        transform 0.25s ease,
        opacity 0.18s ease,
        background 0.2s ease;
}

.mobile-menu-toggle:hover .menu-line {
    background: var(--blue);
}

.mobile-menu-toggle[aria-expanded="true"] {
    background: rgba(16, 185, 245, 0.07);
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(16, 185, 245, 0.1) !important;
}

.mobile-menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* =====================================================
   MOBILE ACCOUNT AND CONTACT
===================================================== */

.mobile-account-area,
.mobile-contact-area {
    display: none;
}

.mobile-divider {
    width: 100%;
    height: 1px;
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-account-title {
    margin-bottom: 13px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.mobile-user-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-user-name {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 3px 3px 8px;
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
}

.mobile-user-name i {
    width: 20px;
    color: var(--blue);
    text-align: center;
}

.mobile-account-link,
.mobile-logout-btn {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.mobile-account-link:hover,
.mobile-logout-btn:hover {
    color: var(--blue);
    background: rgba(16, 185, 245, 0.07);
    border-color: rgba(16, 185, 245, 0.35);
}

.mobile-account-link i,
.mobile-logout-btn i {
    width: 20px;
    color: var(--blue);
    text-align: center;
}

.mobile-account-area form {
    width: 100%;
    margin: 0;
}

.mobile-contact-area {
    flex-direction: column;
    gap: 14px;
}

.mobile-contact-item {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
}

.mobile-contact-item:hover {
    color: var(--white);
}

.mobile-contact-item i {
    width: 21px;
    flex: 0 0 21px;
    color: var(--blue);
    font-size: 16px;
    text-align: center;
}


/* =====================================================
   TABLET AND MOBILE
===================================================== */

@media (max-width: 991.98px) {

    .waterall-topbar {
        display: none !important;
    }

    .waterall-main-header,
    #mainNav {
        min-height: 86px !important;
    }

    #mainNav .container-fluid {
        min-height: 86px;
        padding-right: 18px !important;
        padding-left: 18px !important;
        flex-wrap: wrap;
    }

    .navbar-brand {
        margin-right: 10px;
    }

    .waterall-logo {
        width: auto !important;
        height: 58px !important;
        max-width: 225px;
        max-height: 58px !important;
    }

    .mobile-header-controls {
        display: flex;
    }

    .desktop-header-actions {
        display: none !important;
    }

    #navbarSupportedContent {
        flex-basis: 100%;
        width: 100%;
        max-height: calc(100vh - 86px);
        overflow-y: auto;
        padding: 18px 0 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        scrollbar-width: thin;
    }

    #mainNav .navbar-nav {
        width: 100%;
        align-items: stretch !important;
        gap: 3px;
        margin: 0 !important;
    }

    #mainNav .nav-item {
        width: 100%;
    }

    #mainNav .nav-link {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 12px 13px !important;
        border-radius: 8px;
        font-size: 15px !important;
    }

    #mainNav .nav-link:hover {
        padding-left: 17px !important;
        background: rgba(16, 185, 245, 0.07) !important;
    }

    #mainNav .nav-link.active {
        padding-left: 14px !important;
        color: var(--blue) !important;
        background: rgba(16, 185, 245, 0.1) !important;
        border-left: 3px solid var(--blue);
    }

    #mainNav .nav-link.active::after {
        display: none;
    }

    .mobile-account-area {
        display: block;
    }

    .mobile-contact-area {
        display: flex;
    }

    .mobile-request-btn {
        width: 100%;
        min-height: 52px;
        margin-top: 17px;
        border-radius: 9px;
        font-size: 15px !important;
    }
}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {

    .waterall-main-header,
    #mainNav {
        min-height: 80px !important;
    }

    #mainNav .container-fluid {
        min-height: 80px;
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    .waterall-logo {
        width: auto !important;
        height: 52px !important;
        max-width: 190px;
        max-height: 52px !important;
    }

    .mobile-header-controls {
        gap: 7px;
    }

    .mobile-cart {
        width: 43px;
        height: 43px;
    }

    .navbar-toggler.mobile-menu-toggle {
        width: 45px;
        height: 43px;
    }

    .mobile-menu-toggle .menu-line {
        width: 23px;
    }

    #navbarSupportedContent {
        max-height: calc(100vh - 80px);
    }
}


/* =====================================================
   VERY NARROW MOBILE
===================================================== */

@media (max-width: 360px) {

    #mainNav .container-fluid {
        padding-right: 11px !important;
        padding-left: 11px !important;
    }

    .waterall-logo {
        height: 47px !important;
        max-width: 158px;
        max-height: 47px !important;
    }

    .mobile-cart,
    .navbar-toggler.mobile-menu-toggle {
        width: 41px;
        height: 41px;
    }

    .mobile-header-controls {
        gap: 5px;
    }

    .mobile-contact-item {
        font-size: 14px;
    }
}