
.wrapmenu .main-header { 
    background: #ffffff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 10px 30px rgba(0,0,0, 0.05);
    border-bottom: 1px solid #f1f5f9;
}

.wrapmenu .main-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 600; 
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0,0,0, 0.08);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.wrapmenu .logo img { width: 200px; }

.wrapmenu .category-btn {
    background: var(--theme-color); border: none; color: #ffffff; padding: 10px 24px;
    border-radius: 50px; font-weight: 700; font-size: 14px; display: flex;
    align-items: center; gap: 10px; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer; box-shadow: 0 4px 15px var(--theme-color5);
    position: relative; z-index: 1210;
}

.wrapmenu .category-btn:hover, .wrapmenu .category-btn.active {
    background: var(--theme-color2); transform: translateY(-2px); box-shadow: 0 8px 20px var(--theme-color5);
}

.wrapmenu .search-container { position: relative; max-width: 550px; width: 100%; z-index: 1210; }

.wrapmenu .search-input {
    border-radius: 50px; border: 1.5px solid #f1f5f9; padding: 12px 20px 12px 50px;
    font-size: 14px; font-weight: 500; background: #f8fafc; transition: all 0.3s ease; width: 100%;
}

.wrapmenu .search-input:focus {
    background: #ffffff; border-color: var(--theme-color); box-shadow: 0 0 0 4px var(--theme-color5); outline: none;
}

.wrapmenu .search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--theme-color); font-size: 16px; }
        
.wrapmenu .ajax-search-results {
    position: absolute; top: calc(100% + 15px); left: 0; right: 0; background: #ffffff;
    border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.12); z-index: 1300;
    max-height: 450px; overflow-y: auto; display: none; padding: 15px; border: 1px solid #f1f5f9;
}

.wrapmenu .search-item {
    display: flex; align-items: center; padding: 12px; gap: 15px; text-decoration: none;
    color: #1e293b; border-radius: 12px; transition: all 0.2s; border: 1px solid transparent;
}

.wrapmenu .search-item:hover { background: var(--theme-color5); border-color: #fce7f3; }
.wrapmenu .search-item img { width: 55px; height: 55px; border-radius: 10px; object-fit: cover; background: #f8fafc; border: 1px solid #f1f5f9; }
.wrapmenu .search-item-info .title { font-size: 14px; font-weight: 700; display: block; margin-bottom: 2px; }
.wrapmenu .search-item-info .price { font-size: 13px; color: var(--theme-color); font-weight: 800; }

.wrapmenu .header-right { display: flex; align-items: center; gap: 30px; position: relative; z-index: 1210; }
.wrapmenu .hotline-box { line-height: 1.2; }
.wrapmenu .hotline-label { font-size: 11px; font-weight: 800; color: #64748b; letter-spacing: 1px; text-transform: uppercase; }
.wrapmenu .hotline-number { font-size: 18px; font-weight: 800; color: var(--theme-color); }
        
.wrapmenu .cart-box-wrapper { position: relative; padding: 10px 0; }
.wrapmenu .cart-box {
    position: relative; text-decoration: none; display: flex; align-items: center;
    padding: 8px; border-radius: 50%; background: var(--theme-color5); color: var(--theme-color); transition: all 0.3s; cursor: pointer;
}

.wrapmenu .cart-box:hover { background: var(--theme-color); color: #fff; transform: scale(1.05); }
.wrapmenu .cart-bag-icon { font-size: 22px; }
.wrapmenu .cart-count {
    position: absolute; top: -5px; right: -5px; background: #0f172a; color: white;
    font-size: 10px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; border: 2px solid white;
}

.wrapmenu .cart-dropdown {
    position: absolute; top: 100%; right: 0; width: 360px; background: #ffffff;
    border-radius: 20px; box-shadow: 0 15px 50px rgba(0,0,0,0.15); border: 1px solid #f1f5f9;
    padding: 20px; opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); z-index: 1300;
}

.wrapmenu .cart-box-wrapper:hover .cart-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.wrapmenu .cart-dropdown-title { font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; display: block; }
.wrapmenu .cart-items-list { max-height: 320px; overflow: hidden; margin-bottom: 20px; }
.wrapmenu .cart-item .wrap-img { width: 78px; height: 60px; overflow: hidden; border-radius: 5px; }
.wrapmenu .cart-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #f1f5f9; text-decoration: none; transition: all 0.2s; }
.wrapmenu .cart-item:last-child { border-bottom: none; }
.wrapmenu .cart-item:hover { transform: translateX(5px); }
.wrapmenu .cart-item img { max-width: 100%; height: auto; background: #f8fafc; }
.wrapmenu .cart-item-info { flex: 1; }
.wrapmenu .cart-item-name { display: block; font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 2px; line-height: 1.3; }
.wrapmenu .cart-item-variant { display: block; font-size: 11px; color: #64748b; margin-bottom: 4px; }
.wrapmenu .cart-item-bottom { display: flex; justify-content: space-between; align-items: center; }
.wrapmenu .cart-item-price { font-size: 13px; font-weight: 800; color: var(--theme-color); }
.wrapmenu .cart-item-qty { font-size: 11px; font-weight: 600; color: #94a3b8; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; }
.wrapmenu .cart-footer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wrapmenu .btn-cart { padding: 12px; border-radius: 12px; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; transition: all 0.3s; }
        
.wrapmenu .btn-view-cart { background: #fff; color: var(--theme-color); border: 1.5px solid var(--theme-color); }
.wrapmenu .btn-view-cart:hover { background: var(--theme-color5); }
        
.wrapmenu .btn-checkout { background: var(--theme-color); color: #ffffff; border: 1.5px solid var(--theme-color); }
.wrapmenu .btn-checkout:hover { background: var(--theme-color2); box-shadow: 0 5px 15px var(--theme-color5); }

#headerMenuPlaceholder {
    position: absolute;
    top: calc(100% + 26px);
    left: calc(var(--bs-gutter-x) * 0.5); 
    width: 280px; 
    z-index: 1300;
}

#headerMenuPlaceholder .sidebar-menu {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); 
}

.wrapmenu .content-wrapper { padding: 10px 0; position: relative; }
        
.wrapmenu .sidebar-container { 
    position: relative; z-index: 500;
    min-height: 480px; 
}

.wrapmenu .sidebar-menu {
    background: #ffffff; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    padding: 15px 10px; border: 1px solid #f1f5f9; transition: all 0.3s ease; position: relative;
}

.wrapmenu .sidebar-menu.is-highlighted {
    border-color: var(--theme-color5);
    box-shadow: 0 0 0 5px var(--theme-color5), 0 20px 50px rgba(0,0,0,0.1);
    z-index: 1060; 
}

.wrapmenu .menu-item {
    display: flex; align-items: center; justify-content: space-between; padding: 10px 15px;
    color: #475569; text-decoration: none; font-size: 14px; font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); margin-bottom: 4px; border-radius: 14px; border: 1px solid transparent;
}

.wrapmenu .menu-item-left { display: flex; align-items: center; gap: 12px; }
        
.wrapmenu .cat-icon-wrap {
    width: 34px;
    height: 34px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 5px;
}

.wrapmenu .cat-icon-wrap img {
    max-width: 100%;
    height: auto;
    opacity: 0.6;
    transition: all 0.3s;
}

.wrapmenu .menu-item:hover, .wrapmenu .menu-item.active {
    background-color: var(--theme-color5); border-color: #fce7f3; color: var(--theme-color); transform: translateX(4px);
}

.wrapmenu .menu-item:hover .cat-icon-wrap, .wrapmenu .menu-item.active .cat-icon-wrap {
    background-color: var(--theme-color); box-shadow: 0 4px 10px var(--theme-color5);
}

.wrapmenu .menu-item:hover .cat-icon-wrap img, 
.wrapmenu .menu-item.active .cat-icon-wrap img {
    filter: brightness(0) invert(1); opacity: 1;
}

.wrapmenu .mega-menu {
    position: absolute; top: 0; left: 100%; width: 980px; min-height: 100%;
    background: #ffffff; border-radius: 20px; box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9; padding: 35px; visibility: hidden; opacity: 0;
    transform: translateX(15px); transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none; z-index: 1070; margin-left: 15px;
}
        
.wrapmenu .mega-menu::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -15px; width: 15px; background: transparent;
}

.wrapmenu .mega-menu.active { visibility: visible; opacity: 1; transform: translateX(0); pointer-events: auto; }

.wrapmenu .mega-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 17px; }

.wrapmenu .mega-col-title {
    font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 15px;
    display: block; text-decoration: none; border-bottom: 2px solid #fce7f3; padding-bottom: 8px;
}

.wrapmenu .mega-col-title:hover { color: var(--theme-color); }
.wrapmenu .mega-list { list-style: none; padding: 0; margin: 0 0 5px 0; }
.wrapmenu .mega-list a { font-size: 13.5px; color: #64748b; text-decoration: none; display: block; padding: 6px 0; transition: all 0.2s; }
.wrapmenu .mega-list a:hover { color: var(--theme-color); transform: translateX(5px); }

.wrapmenu .mega-promo-banner {
    background: #f8fafc; border-radius: 16px; padding: 25px; text-align: center;
    height: 100%; border: 1px solid #f1f5f9; display: flex; flex-direction: column;
    justify-content: space-between; overflow: hidden; position: relative;
}

.wrapmenu .promo-text { font-weight: 800; color: #0f172a; font-size: 16px; text-transform: uppercase; }
.wrapmenu .promo-price span { font-size: 28px; color: var(--theme-color); font-weight: 900; }
.wrapmenu .promo-img-wrap img { width: 100%; height: auto; transition: transform 0.5s; }
.wrapmenu .mega-promo-banner:hover img { transform: scale(1.1) rotate(2deg); }

.wrapmenu .mega-content { display: none; }
.wrapmenu .mega-content.active { display: block; animation: megaFade 0.3s ease-out; }
@keyframes megaFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.wrapmenu .promo-item { text-align: center; transition: all 0.4s ease; padding: 15px 10px; border-radius: 12px; display: block; text-decoration: none;}
.wrapmenu .promo-item:hover { background: #f8fafc; transform: translateY(-5px); }
        
.wrapmenu .promo-icon { 
    width: 64px; height: 64px; margin: 0 auto 12px; background: #fff; border-radius: 16px; 
    display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 15px rgba(0,0,0,0.05); transition: 0.3s; 
}

.wrapmenu .promo-icon img { width: 32px; height: 32px; object-fit: contain; transition: 0.3s; opacity: 0.8; }
.wrapmenu .promo-item:hover .promo-icon { background: var(--theme-color); box-shadow: 0 10px 20px var(--theme-color5); }
.wrapmenu .promo-item:hover .promo-icon img { filter: brightness(0) invert(1); opacity: 1; }
.wrapmenu .promo-label { display: block; font-size: 0.85rem; font-weight: 600; color: #334155; }

.wrapmenu .menu-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(5px); z-index: 400; 
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}

.wrapmenu .menu-backdrop.show { opacity: 1; visibility: visible; }

.wrapmenu.is-detail .sidebar-container {
    position: absolute; width: 300px; opacity: 0; visibility: hidden; 
    transform: translateY(15px); pointer-events: none; transition: all 0.3s ease;
}

.wrapmenu.is-detail .sidebar-container.show { 
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; z-index: 1060;
}

@media (max-width: 1200px) {
    .wrapmenu .mega-menu { width: 650px; }
    .wrapmenu .hotline-box { display: none; }
}

@media (max-width: 992px) {
    .wrapmenu .mega-menu { display: none !important; }
    #headerMenuPlaceholder { width: 300px; }
    .wrapmenu .search-container { max-width: 100%; }
    .wrapmenu .sidebar-container { min-height: auto; }
}

@media (max-width: 768px) {
    .wrapmenu .logo-text { font-size: 22px; }
    .wrapmenu .category-btn span { display: none; }
    .wrapmenu .category-btn { padding: 10px 14px; }
    .wrapmenu .search-container { display: none; }
    .wrapmenu h2 { font-size: 1.8rem !important; }
}

@media (max-width: 576px) {
    #headerMenuPlaceholder { width: calc(100% - 30px); left: 15px; }
}

.wrapmenu .demo-badge {
    position: fixed; bottom: 30px; left: 30px; background: #0f172a; color: #fff; padding: 14px 28px;
    border-radius: 50px; z-index: 9999; cursor: pointer; font-size: 13px; font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25); transition: all 0.3s ease; border: 2px solid rgba(255,255,255,0.1);
}

.wrapmenu .demo-badge:hover { transform: translateY(-5px) scale(1.05); background: var(--theme-color); }


/* login nhanh menu */
.user-hover-wrapper {
    position: relative;
    display: inline-block;
}

.user-hover-wrapper .icon-trigger {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 6px var(--theme-color5), 0 4px 10px rgba(255, 77, 141, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

.user-hover-wrapper:hover .icon-trigger {
    background: var(--theme-color);
    color: #ffffff;
    box-shadow: 0 0 0 6px var(--theme-color5), 0 6px 15px rgba(255, 77, 141, 0.25);
    transform: translateY(-2px);
}

.user-hover-wrapper .hover-dropdown-panel {
    position: absolute;
    top: calc(100% + 25px);
    right: -10px;
    width: 360px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #f8fafc;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1100;
}

.user-hover-wrapper .hover-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -25px;
    right: 0;
    width: 100%;
    height: 25px;
    background: transparent;
}

.user-hover-wrapper:hover .hover-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-hover-wrapper .panel-header h2 {
    font-weight: 800;
    font-size: 20px;
    color: #0f172a;
    margin-bottom: 4px;
}

.user-hover-wrapper .panel-header p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 24px;
}

.user-hover-wrapper .form-label {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 8px;
    display: block;
}

.user-hover-wrapper .forgot-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--theme-color);
    text-decoration: none;
    transition: color 0.2s;
}

.user-hover-wrapper .forgot-link:hover {
    color: var(--theme-color2);
}

.user-hover-wrapper .form-control {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    font-size: 14px;
    transition: all 0.3s;
    color: #0f172a;
    width: 100%;
}

.user-hover-wrapper .form-control:focus {
    box-shadow: 0 0 0 4px var(--theme-color5);
    border-color: var(--theme-color);
    background: #ffffff;
    outline: none;
}

.user-hover-wrapper .password-input-wrapper {
    position: relative;
}

.user-hover-wrapper .password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.3s;
}

.user-hover-wrapper .password-toggle-btn:hover {
    color: var(--theme-color);
}

.user-hover-wrapper .btn-primary-action {
    background: var(--theme-color);
    color: #ffffff;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    margin-top: 10px;
    cursor: pointer;
}

.user-hover-wrapper .btn-primary-action:hover {
    background: var(--theme-color2);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px var(--theme-color5);
}

.user-hover-wrapper .divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-hover-wrapper .divider::before, 
.user-hover-wrapper .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #f1f5f9;
}

.user-hover-wrapper .divider span {
    padding: 0 12px;
}

.user-hover-wrapper .btn-social {
    width: 100%;
    border: 1.5px solid #f1f5f9;
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.3s;
}

.user-hover-wrapper .btn-social:hover {
    background: #f8fafc;
}

.user-hover-wrapper .register-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}

.user-hover-wrapper .register-hint a {
    color: var(--theme-color);
    font-weight: 800;
    text-decoration: none;
}

.user-hover-wrapper .user-profile-card {
    background: var(--theme-color5);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.user-hover-wrapper .user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.user-hover-wrapper .user-info h4 {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 2px 0;
    color: var(--theme-color2);
}

.user-hover-wrapper .user-info p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.user-hover-wrapper .menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-hover-wrapper .menu-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s;
}

.user-hover-wrapper .menu-links li a:hover {
    background: #f8fafc;
    color: var(--theme-color);
    padding-left: 20px;
}

.user-hover-wrapper .menu-links li a i {
    width: 20px;
    font-size: 15px;
}

.user-hover-wrapper .menu-links .logout-item {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.user-hover-wrapper .menu-links .logout-item a {
    color: #ef4444;
}

.user-hover-wrapper .menu-links .logout-item a:hover {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 768px) {
    .user-hover-wrapper .hover-dropdown-panel {
        position: fixed;
        top: 80px;
        right: 15px;
        width: calc(100vw - 30px);
    }
}