﻿* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    padding-top: 80px;
}

/* === HEADER NAV FIXED === */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 40px;
    background-color: #fff;
    border-bottom: 2px solid #fce4ec;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* === NAV LEFT === */
.nav-left ul {
    display: flex;
    list-style: none;
    margin: -15px;
    padding: 0;
}

.nav-left li {
    position: relative;
    margin: 0 20px;
    display: flex;
    align-items: center;
}

.nav-left a {
    color: #555;
    text-decoration: none;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

    .nav-left a:hover {
        color: #d63384;
    }

    .nav-left a::after {
        content: "";
        display: block;
        width: 0%;
        height: 2px;
        background-color: #d63384;
        transition: width 0.3s ease;
        position: absolute;
        bottom: 0;
        left: 0;
    }

    .nav-left a:hover::after {
        width: 100%;
    }

/* === DROPDOWN === */
.dropdown-content {
    display: none;
    position: absolute;
    top: 80%;
    left: 0;
    background-color: #fff;
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content li a {
    display: block;
    padding: 10px 20px;
    color: #444;
    transition: background 0.3s;
}

    .dropdown-content li a:hover {
        background-color: #ffe6f0;
        color: #d63384;
    }

.dropdown i.fa-caret-down {
    margin-left: 5px;
    font-size: 12px;
}

/* === NAV RIGHT === */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #d63384;
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s;
    height: 36px;
    background: #fff;
}

    .search-form .input-text {
        flex: 1; /* input tự giãn */
        border: none;
        outline: none;
        padding: 6px 12px;
        font-size: 14px;
        min-width: 160px;
    }

    .search-form button {
        border: none;
        background-color: #d63384;
        color: #fff;
        padding: 0 14px;
        height: 100%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
    }

        .search-form button:hover {
            background-color: #ad1d65;
        }


.nav-right button {
    background-color: #d63384;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

    .nav-right button:hover {
        background-color: #ad1d65;
    }

/* === ICONS: User & Cart === */
.nav-right i.fa-user,
.nav-right i.fa-cart-shopping {
    color: #d63384;
    font-size: 20px;
    cursor: pointer;
}

/* === CART SPAN === */
.span-icon-cart {
    position: relative;
}

#cart-item-number {
    position: absolute;
    top: -10px;
    right: -15px;
    color: #ad1d65;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #888;
}

/* === USER DROPDOWN === */
/* Container user dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

/* User icon - pointer chuột, màu sắc */
.user-icon {
    color: #d63384;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    /* tránh bôi đen khi nhấn */
    transition: color 0.3s ease;
}

    .user-icon:hover {
        color: #ad1d65;
    }

/* Menu dropdown user */
.user-menu {
    display: none;
    /* mặc định ẩn */
    position: absolute;
    top: 36px;
    /* cách icon user một khoảng */
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

    /* Khi menu được bật hiển thị */
    .user-menu.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Các mục trong menu */
    .user-menu li {
        padding: 10px 20px;
        border-bottom: 1px solid #eee;
    }

        .user-menu li:last-child {
            border-bottom: none;
        }

        /* Link trong menu */
        .user-menu li a {
            color: #555;
            text-decoration: none;
            display: block;
            transition: color 0.3s ease;
        }

            .user-menu li a:hover {
                color: #d63384;
            }

        /* Dòng chào hỏi không phải link */
        .user-menu li:first-child {
            font-weight: 600;
            color: #222;
            cursor: default;
            border-bottom: 1px solid #ddd;
            padding-bottom: 12px;
            user-select: none;
        }

        /* Khi hover trên từng mục */
        .user-menu li:hover {
            background-color: #fce4ec;
            cursor: pointer;
        }
