/* basau bags - header & navigation styles */

.rowHeader {
    background-color: #f4f4f5;
    border-bottom: 1px solid #e4e4e7;
    padding: 8px 16px;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.rowHeader a {
    color: #52525b;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rowHeader a:hover {
    color: #18181b;
}

.tienich {
    display: inline-block;
}

/* main navigation bar */
.rowMenu {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 1020;
    border-bottom: 1px solid #e4e4e7;
    transition: box-shadow 0.2s ease;
}

.menu {
    gap: 36px;
}

.menu-link {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 8px 0;
    position: relative;
    display: inline-block;
    color: #18181b !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.menu-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #18181b;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.menu-link:hover::after,
.menu-link.active::after {
    transform: scaleX(1);
}

.menu-link.text-danger {
    color: #b91c1c !important;
}

.menu-link.text-danger::after {
    background-color: #b91c1c;
}

/* dropdown & mega menu */
.dropdown {
    position: static;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #121214;
    color: #ffffff;
    z-index: 1000;
    border-top: 1px solid #27272a;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    padding: 2.5rem 0;
}

.mega-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown:hover .mega-menu,
.dropdown:focus-within .mega-menu {
    display: block;
}

/* Giới hạn chiều cao nội dung mega menu khi danh sách động dài, không cắt cầu hover ::before */
.mega-menu > .container {
    max-height: 70vh;
    overflow-y: auto;
}

.mega-menu h6 {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #a1a1aa;
    margin-bottom: 1rem;
}

.mega-menu a {
    color: #d4d4d8;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    display: block;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mega-menu a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* search bar */
.custom-search {
    width: 240px;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid #e4e4e7;
    background-color: #f4f4f5;
    transition: all 0.2s ease;
}

.custom-search:focus {
    width: 280px;
    background-color: #ffffff;
    border-color: #18181b;
    box-shadow: none;
    outline: none;
}

/* mobile menu toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 22px;
    height: 2px;
    background-color: #18181b;
    transition: all 0.2s ease;
}

/* Responsive menu trên màn hình nhỏ (< lg) */
@media (max-width: 991.98px) {
    .rowMenu > .container {
        flex-wrap: wrap;
    }

    .rowMenu .menu {
        flex: 0 0 100% !important;
        gap: 12px;
    }

    .rowMenu .dropdown {
        width: 100%;
        text-align: center;
    }

    .rowMenu .mega-menu {
        position: static;
        padding: 1rem 0.5rem;
        margin-top: 0.5rem;
        box-shadow: none;
    }

    .rowMenu .mega-menu::before {
        display: none;
    }
}