.mega-menu-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 2px solid #EBC58E;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
    z-index: 999;
}

.mega-menu-wrapper.show {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 40px;
}

/* Layout lưới: danh mục chính - danh mục phụ - ảnh */
.mega-menu-layout {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr 1fr;
    gap: 30px;
    align-items: start;
}

.menu-column-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-category-item {
    border: 1px solid rgba(235, 197, 142, 0.2);
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.menu-category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #EBC58E;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom;
}

.menu-category-item a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: #000000;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.2px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.menu-category-item.active {
    background: #4c1010;
    border-color: #EBC58E;
    box-shadow: 0 4px 15px rgba(235, 197, 142, 0.25);
}

.menu-category-item.active::before {
    transform: scaleY(1);
}

.menu-category-item.active a { 
    color: #EBC58E; 
}

.menu-category-item:hover {
    border-color: #EBC58E;
    box-shadow: 0 4px 12px rgba(235, 197, 142, 0.15);
    transform: translateX(3px);
}

.menu-category-item:hover::before {
    transform: scaleY(1);
}

.menu-category-item:hover a { 
    color: #EBC58E; 
}

.menu-category-item.active:hover a { 
    color: #EBC58E; 
}

/* Cột danh mục phụ */
.menu-column-children .child-group { 
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.menu-column-children .child-group.active { 
    display: block;
}

.menu-column-children .child-heading {
    font-weight: 700;
    font-size: 16px;
    color: #d48513;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #EBC58E;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.menu-column-children .child-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #000000;
}

.menu-column-children .child-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.menu-column-children .child-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(235, 197, 142, 0.15);
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    text-decoration: none;
}

.menu-column-children .child-item:hover {
    border-color: #EBC58E;
    box-shadow: 0 4px 12px rgba(235, 197, 142, 0.2);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    text-decoration: none;
}

.menu-column-children .child-item img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(235, 197, 142, 0.2);
    transition: all 0.3s ease;
}

.menu-column-children .child-item:hover img {
    border-color: #EBC58E;
    transform: scale(1.05);
}

.menu-column-children .child-item span {
    color: #000000;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

.menu-column-children .child-item:hover span {
    color: #EBC58E;
}

.menu-column-children .child-empty {
    color: #999;
    font-size: 14px;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Cột ảnh */
.menu-column-images {
    display: grid;
    gap: 12px;
}

.mega-img-display {
    width: 100%;
    max-height: 130px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(235, 197, 142, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.mega-img-display:hover {
    border-color: #EBC58E;
    box-shadow: 0 6px 20px rgba(235, 197, 142, 0.25);
    transform: translateY(-3px);
}

.mega-img-display.fade-out {
    opacity: 0;
    transform: translateX(10px) scale(0.95);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .mega-menu-wrapper {
        display: none !important;
    }
}
