/* ============================
   GLOBAL SAFETY
============================ */
html, body {
    overflow-x: hidden;
}

/* ============================
   MAIN NAV STYLE
============================ */
.custom-navbar {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Allow flex items to shrink */
.nav-left,
.nav-right,
.nav-menu {
    min-width: 0;
}

/* LOGO */
.nav-logo {
    height: 50px;
    max-width: 100%;
}

/* ============================
   DESKTOP MENU
============================ */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    padding: 0;
}

.nav-menu .nav-link {
    text-decoration: none;
    color: #222;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* ============================
   RIGHT SIDE ICONS
============================ */
.nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px ;
}

.cart-icon {
    font-size: 15px;
    color: #d40000;
}

.cart-badge {
    background: #d40000;
    color: #fff;
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 11px;
    border-radius: 50%;
    padding: 2px 5px;
}

/* Loyalty points pill */
.points-badge {
    background-color: #DC143C !important;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* FIX CART CLICK AREA */
.nav-right .position-relative > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
}

.nav-right .cart-icon {
    pointer-events: none;
}

/* ============================
   USER DROPDOWN
============================ */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.user-dropdown-toggle {
    display: flex !important;
    align-items: center;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.user-dropdown-toggle::after {
    display: none !important;
}

/* Dropdown menu */
.nav-right .dropdown-menu {
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.nav-right .dropdown-menu .dropdown-item {
    color: #1a1a1a;
}

.nav-right .dropdown-menu .dropdown-item i {
    color: #d40000 !important;
}

.nav-right .dropdown-menu .dropdown-item:hover {
    background-color: #fff1f1;
    color: #d40000;
}

/* ============================
   BUTTONS
============================ */
.nav-right .btn.btn-primary {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #DC143C !important;
    border-color: #DC143C !important;
}

.nav-right .btn.btn-primary:hover {
    background-color: #b01030 !important;
    border-color: #b01030 !important;
}

/* ============================
   BURGER MENU
============================ */
.burger-btn {
    width: 26px;
    height: 18px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-between;
}

.burger-btn span {
    height: 3px;
    background: #000;
    width: 100%;
    border-radius: 4px;
}

/* ============================
   MOBILE MENU
============================ */
@media (max-width: 992px) {

    .nav-menu {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        gap: 20px;
        border-top: 1px solid #eee;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .burger-btn {
        display: flex !important;
    }

    .nav-logo {
        height: 42px;
    }
}

/* ============================
   TABLET / SMALL DESKTOP
============================ */
@media (max-width: 1280px) {
    .custom-navbar {
        font-size: 0.95rem;
    }

    .nav-logo {
        height: 44px;
    }

    .cart-icon {
        font-size: 19px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* ============================
   SMALL LAPTOPS
============================ */
@media (max-width: 1100px) {
    .custom-navbar {
        font-size: 0.9rem;
    }

    .nav-menu {
        gap: 0.6rem;
    }

    .nav-logo {
        height: 38px;
    }

    .points-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ============================
   DESKTOP ONLY
============================ */
@media (min-width: 993px) {
    .burger-btn {
        display: none !important;
    }
}

/* ============================
   CLEAN LIST STYLES
============================ */
.nav-right li,
.user-dropdown {
    list-style: none !important;
}
@media (max-width: 472px) {
    /* Hide the username text inside the user dropdown */
    .dropdown-toggle > span {
        display: none !important;
    }

    /* Make sure avatar remains visible */
    .dropdown-toggle img {
        display: inline-block !important;
    }
}
