/* ====================================================================
   NAVIGATION & DROPDOWN MENU STYLES
   File: css/navigation.css
   Description: Styles cho header navigation và dropdown menus
   ==================================================================== */

/* ===== Navigation Base ===== */
.nav-item {
    position: relative;
}

.navbar__title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Arrow Icon cho menu có dropdown */
.navbar__title .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.nav-item:hover .navbar__title .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== Dropdown Menu (Cấp 2) ===== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: white;
    border: 1px solid #E9E9E9;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.nav-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== Dropdown Items ===== */
.dropdown-item {
    position: relative;
}

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    color: #434343;
    text-decoration: none;
    text-transform: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F5F5F5;
}

.dropdown-link:hover {
    background-color: #FDF1DE;
    color: #BA0C2F;
    padding-left: 1.5rem;
}

.dropdown-item:last-child .dropdown-link {
    border-bottom: none;
}

/* Arrow cho submenu */
.dropdown-link .arrow-right {
    font-size: 12px;
    opacity: 0.5;
    margin-left: auto;
}

/* ===== Submenu (Cấp 3) ===== */
.submenu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 260px;
    background: white;
    border: 1px solid #E9E9E9;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ===== Submenu Links ===== */
.submenu-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #555555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F5F5F5;
}

.submenu-link:hover {
    background-color: #FEEBF0;
    color: #BA0C2F;
    padding-left: 1.5rem;
}

.submenu-link:last-child {
    border-bottom: none;
}

/* ===== Badge/Label ===== */
.menu-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background-color: #BA0C2F;
    border-radius: 12px;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.menu-badge.new {
    background-color: #EF4444;
}

.menu-badge.hot {
    background-color: #F59E0B;
}

/* ===== Divider & Header ===== */
.dropdown-divider {
    height: 1px;
    background-color: #E9E9E9;
    margin: 0.5rem 0;
}

.dropdown-header {
    padding: 0.75rem 1.25rem;
    font-size: 12px;
    font-weight: 700;
    color: #9D9D9D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item:hover > .dropdown-menu {
    animation: fadeInDown 0.3s ease;
}

.dropdown-item:hover > .submenu {
    animation: fadeInRight 0.3s ease;
}

/* ===== Accessibility ===== */
.navbar__title:focus,
.dropdown-link:focus,
.submenu-link:focus {
    outline: 2px solid #BA0C2F;
    outline-offset: 2px;
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 1023px) {
    .dropdown-menu,
    .submenu {
        display: none;
    }
}
</style>