/* ============================================================ */
/* GLOBAL CSS - Áp dụng cho toàn bộ website */
/* ============================================================ */

/* ---------- HEADER ---------- */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 0;
    height: auto;
}

.navbar-brand img.logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.navbar-brand img.brand-text {
    height: 40px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 576px) {
    .navbar-brand img.logo {
        width: 32px;
        height: 32px;
    }

    .navbar-brand img.brand-text {
        height: 28px;
    }
}

/* ✅ CSS CHUNG - KHÔNG ÉP background-color */
.nav-link,
.nav-link:focus,
.nav-link:active,
.nav-link.active,
.navbar-nav .nav-link,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:active,
.navbar-nav .nav-link.active {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

.nav-link:hover,
.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

/* 🔧 THÀNH PHẦN ĐẶC BIỆT: Admin Link */
.nav-link.admin-link {
    background: #e3f2fd;
    color: #0d47a1;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 20px;
}

.nav-link.admin-link:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.nav-link.admin-link i {
    margin-right: 8px;
    color: #0d47a1;
}

/* ---------- CART BADGE ---------- */
.cart-link,
.cart-link:focus,
.cart-link:active,
.cart-link.active {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    height: 40px;
    padding: 0 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
}

.cart-link:hover {
    color: #0d6efd;
}

.cart-icon {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: contain;
    display: block;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff2d55;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
}

.cart-badge:empty {
    display: none;
}

/* ---------- PROFILE LINK ---------- */
.profile-link,
.profile-link:focus,
.profile-link:active,
.profile-link.active {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    font-weight: 500;
}

.profile-link:hover {
    color: #0d6efd;
}

.profile-link .username {
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
}

.profile-link .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

/* ---------- SCROLL EFFECT ---------- */
.sticky-top.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* ---------- DROPDOWN ---------- */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #0d6efd;
    color: white;
}

/* ---------- ROOT VARIABLES ---------- */
:root {
    --bs-nav-link-font-weight: 500;
    --bs-navbar-color: rgba(0, 0, 0, 0.8);
    --bs-navbar-active-color: rgba(0, 0, 0, 0.8);
    --bs-navbar-hover-color: #0d6efd;
}