/* Header CSS - Updated 2026-02-28 00:15 */

/* Font Face Declarations */
@font-face {
    font-family: 'eduma-icon';
    src: url('../fonts/eduma-icon.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove blue outline on focus for all elements */
*:focus {
    outline: none !important;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Prevent horizontal scroll globally */
html {
    overflow-x: hidden;
}

body {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #374151;
}

/* Container - High specificity to prevent override */
.top-banner .container,
.main-header .container,
.main-nav .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fallback for other containers */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Banner */
.top-banner {
    background-color: #356DF1;
    color: white;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
}

.top-banner p {
    margin: 0;
}

.top-banner a {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.top-banner a:hover {
    text-decoration: underline;
}

/* Main Header */
.main-header {
    background-color: white;
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1F2937;
}

.logo img,
.logo svg {
    height: auto;
    width: 160px;
    max-width: 160px;
    object-fit: contain;
}

/* Categories Dropdown */
.categories-dropdown {
    position: relative;
}

.categories-dropdown.active .categories-btn {
    color: #356DF1;
}

.categories-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    text-decoration: none;
}

.categories-btn:hover {
    color: #356DF1;
}

.dropdown-arrow {
    width: 10px;
    height: 6px;
    margin-left: 8px;
}

.categories-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Show categories-menu on hover */
.categories-dropdown:hover .categories-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.categories-menu a {
    display: block;
    padding: 8px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.categories-menu a:hover {
    color: #356DF1;
}

/* Categories Hierarchy - Multi-level menu */
.categories-hierarchy {
    min-width: 280px;
    padding: 10px 0;
}

.category-group {
    border-bottom: 1px solid #f3f4f6;
}

.category-group:last-child {
    border-bottom: none;
}

.category-parent {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px !important;
    font-weight: 500;
    color: #374151;
}

.category-parent .has-children {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
}

.category-children {
    background: #f9fafb;
    padding: 5px 0;
}

.category-children a {
    padding: 6px 20px 6px 35px !important;
    font-size: 13px;
    color: #6b7280;
    position: relative;
}

.category-children a::before {
    content: "—";
    position: absolute;
    left: 20px;
    color: #d1d5db;
}

.category-children a:hover {
    color: #356DF1;
    background: #f3f4f6;
}

/* Flyout Menu - Multi-level categories */
.categories-flyout {
    min-width: 260px;
    padding: 8px 0;
}

.flyout-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flyout-link {
    flex: 1;
    display: block;
    padding: 10px 16px !important;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.flyout-link:hover {
    color: #356DF1;
    background: #f3f4f6;
}

.flyout-arrow {
    display: none;
    padding: 10px 12px;
    cursor: pointer;
    color: #9ca3af;
    font-size: 12px;
    transition: all 0.2s ease;
}

.flyout-item.has-children .flyout-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flyout-arrow:hover {
    color: #356DF1;
    background: #e5e7eb;
}

/* Submenu flyout */
.flyout-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 220px;
    background: white;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.25s ease;
    z-index: 1001;
    pointer-events: none;
}

/* Show submenu on arrow hover */
.flyout-arrow:hover+.flyout-submenu,
.flyout-submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Also show when hovering the item itself but only if has children */
.flyout-item.has-children:hover>.flyout-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Indentation for deeper levels */
.flyout-submenu .flyout-link {
    font-weight: 400;
    font-size: 13px;
}

/* Categories Mega Menu (Sepay Style) */
.categories-mega-menu {
    width: 980px !important;
    left: -100px !important;
    padding: 30px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #E5E7EB !important;
}

.categories-mega-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px 40px !important;
}

.mega-column {
    display: flex !important;
    flex-direction: column !important;
}

/* Parent Category Block & Dividers */
.mega-parent-block {
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
    display: flex !important;
    flex-direction: column !important;
}

.mega-parent-block:not(:last-child) {
    border-bottom: 1px solid #E5E7EB !important;
    /* Elegant horizontal separator line between parent categories */
}

/* Parent Category Style */
.mega-parent-header {
    padding-bottom: 0 !important;
    margin-bottom: 16px !important;
}

.mega-parent-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: var(--cat-color, #4B5563) !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    display: block !important;
    padding: 0 !important;
}

.mega-parent-title:hover {
    color: #356DF1 !important;
}

/* Child Category List */
.mega-child-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.mega-child-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.mega-child-link-group {
    display: flex !important;
    align-items: flex-start !important;
    text-decoration: none !important;
}

.mega-child-info {
    display: flex !important;
    flex-direction: column !important;
}

.mega-child-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--cat-color, #1F2937) !important;
    line-height: 1.3 !important;
    transition: color 0.2s ease !important;
}

.mega-child-link-group:hover .mega-child-name {
    color: #356DF1 !important;
}

.mega-child-desc {
    font-size: 12px !important;
    color: #6B7280 !important;
    margin-top: 2px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
}

/* Grandchild Category Links (Vertical Stacked under children) */
.mega-grandchild-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding-left: 16px !important;
    /* Elegant natural indentation */
}

.mega-grandchild-link {
    font-size: 13px !important;
    color: var(--cat-color, #6B7280) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: block !important;
    padding: 2px 0 !important;
}

.mega-grandchild-link:hover {
    color: #356DF1 !important;
    padding-left: 4px !important;
}

/* Responsive Design for Mega Menu */
@media (max-width: 1200px) {
    .categories-mega-menu {
        width: 800px !important;
        left: -80px !important;
    }

    .categories-mega-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px 30px !important;
    }
}

@media (max-width: 1024px) {
    .categories-mega-menu {
        width: 100vw !important;
        max-width: 720px !important;
        left: -150px !important;
        padding: 20px !important;
    }

    .categories-mega-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .categories-mega-menu {
        width: 100vw !important;
        max-width: 480px !important;
        left: -20px !important;
        padding: 15px !important;
    }

    .categories-mega-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .mega-grandchild-list {
        padding-left: 16px !important;
    }
}

/* Brands Mega Menu */
.brands-mega-menu {
    width: 680px !important;
    left: -200px !important;
    padding: 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #E5E7EB !important;
    background: #FFFFFF !important;
}

.brands-mega-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

.brands-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.brand-mega-link {
    display: block !important;
    padding: 10px 16px !important;
    color: #4B5563 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: all 0.25s ease !important;
    line-height: 1.2 !important;
}

.brand-mega-link:hover {
    color: #356DF1 !important;
    background-color: #F3F4F6 !important;
    padding-left: 20px !important;
    /* Slide smoothly exactly matching standard dropdown */
}

.brands-empty {
    color: #9CA3AF !important;
    font-size: 13px !important;
    text-align: center !important;
    padding: 10px !important;
}

/* Responsive adjustments for Brands Mega Menu */
@media (max-width: 1024px) {
    .brands-mega-menu {
        width: 500px !important;
        left: -150px !important;
    }

    .brands-mega-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .brands-mega-menu {
        width: 280px !important;
        left: -50px !important;
        padding: 15px !important;
    }

    .brands-mega-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .brand-mega-link {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: none;
}

.search-bar form {
    display: flex;
    background-color: #E1E9FD;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    outline: none;
}

.search-bar form:focus-within {
    outline: none;
    border: none;
    box-shadow: none;
}

.search-btn {
    background: none;
    border: none;
    padding: 13px 16px;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #374151;
    outline: none;
    line-height: 1.2;
    border-left: none !important;
    box-shadow: none !important;
}

.search-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.search-input::placeholder {
    color: #000000;
    font-weight: 0;
    font-size: 15px;
}

/* Main Navigation */
.main-nav {
    background-color: white;
    position: relative;
}

.main-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1320px;
    height: 1px;
    background-color: #E5E7EB;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu>li {
    position: relative;
}

.main-menu>li>a {
    display: flex;
    align-items: center;
    padding: 22px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.main-menu>li>a svg {
    margin-left: 8px;
    flex-shrink: 0;
}

/* Dropdown button styling */
.dropdown-btn {
    display: flex;
    align-items: center;
    padding: 22px 16px;
    color: #374151;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-btn svg {
    margin-left: 8px;
    flex-shrink: 0;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    border: 1px solid #E5E7EB !important;
    padding: 10px 8px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Show dropdown on hover */
.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Ensure dropdown still works when parent has button */
.has-dropdown>a,
.has-dropdown>.dropdown-btn {
    position: relative;
}

.dropdown-menu a {
    display: block !important;
    padding: 10px 16px !important;
    color: #4B5563 !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.25s ease !important;
}

.dropdown-menu a:not(.btn-view-cart):hover {
    color: #356DF1 !important;
    background-color: #F3F4F6 !important;
    padding-left: 20px !important;
    /* Slide smoothly exactly matching brands menu */
}

.dropdown-menu hr {
    border: 0 !important;
    border-top: 1px solid #E5E7EB !important;
    margin: 8px 12px !important;
}

.new-badge {
    background: #34c759;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: 600;
}

/* Header Buttons */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Cart Icon in Header */
.header-cart-wrapper {
    position: relative;
}

.header-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-cart-icon:hover {
    background-color: #f3f4f6;
    color: #356DF1;
}

.cart-count-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    border: 2px solid white;
}

.header-cart-wrapper:hover .cart-dropdown,
.header-cart-wrapper:focus-within .cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Cart Dropdown - override .dropdown-menu to align right */
.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0 !important;
    left: auto !important;
    background: white;
    min-width: 320px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.cart-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.cart-dropdown-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.cart-dropdown-count {
    font-size: 12px;
    color: #6b7280;
}

.cart-dropdown-content {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
}

.cart-dropdown-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #6b7280;
}

.cart-dropdown-empty {
    text-align: center;
    padding: 30px 15px;
    color: #6b7280;
}

.cart-dropdown-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    color: #d1d5db;
}

.cart-dropdown-empty p {
    margin: 0 0 12px;
    font-size: 13px;
}

.cart-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.cart-dropdown-item:hover {
    background-color: #f9fafb;
}

.cart-dropdown-item-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f3f4f6;
}

.cart-dropdown-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-dropdown-item-info {
    flex: 1;
    margin-left: 10px;
    min-width: 0;
}

.cart-dropdown-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-dropdown-item-price {
    font-size: 12px;
    color: #356DF1;
    font-weight: 600;
}

.cart-dropdown-item-quantity {
    font-size: 11px;
    color: #6b7280;
}

.cart-dropdown-footer {
    padding: 14px;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.btn-view-cart,
.dropdown-menu a.btn-view-cart {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #356DF1 !important;
    color: white !important;
    text-align: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: none;
}

.btn-view-cart:hover,
.dropdown-menu a.btn-view-cart:hover {
    background-color: #000000 !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-get-started {
    background-color: #356DF1;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
    cursor: pointer;
}


.btn-get-started:hover {
    background-color: #000000;
    color: white;
    transform: translateY(-1px);
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.btn-login:hover {
    color: #356DF1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        gap: 20px;
    }

    .search-bar {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: none;
    }

    .main-menu {
        display: none;
    }

    .header-buttons {
        gap: 15px;
    }

    .btn-get-started {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .categories-dropdown {
        display: none;
    }

    .header-buttons {
        gap: 10px;
    }
}

/* Active menu styling - ensure only one active at a time */
.main-menu>li.active>a,
.main-menu>li.active>.dropdown-btn {
    color: #356DF1 !important;
}

.main-menu>li:not(.active)>a,
.main-menu>li:not(.active)>.dropdown-btn {
    color: #374151;
}

.main-menu>li:hover>a,
.main-menu>li:hover>.dropdown-btn,
.main-menu>li.active>a,
.main-menu>li.active>.dropdown-btn {
    color: #356DF1;
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER & HAMBURGER BUTTON STYLES
   ========================================================================== */

/* Mobile header elements default (hidden on desktop) */
.mobile-header-right {
    display: none;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #1f2937;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger active transformation */
.mobile-nav-drawer.open~.main-header #mobileMenuToggle span:nth-child(1),
#mobileMenuToggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-nav-drawer.open~.main-header #mobileMenuToggle span:nth-child(2),
#mobileMenuToggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-drawer.open~.main-header #mobileMenuToggle span:nth-child(3),
#mobileMenuToggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-cart-icon {
    position: relative;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f3f4f6;
    transition: all 0.2s ease;
}

.mobile-cart-icon:hover {
    color: #356df1;
    background-color: #eff6ff;
}

.mobile-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile Nav Drawer - TOP DOWN DROPDOWN (SePay style) */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-nav-drawer.open {
    transform: translateY(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 30px;
    max-height: calc(100vh - 65px);
}

.drawer-search {
    margin-bottom: 25px;
    position: relative;
}

.drawer-search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.drawer-search-input:focus {
    outline: none;
    border-color: #356df1;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(53, 109, 241, 0.1);
}

.drawer-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-menu>li {
    border-bottom: 1px solid #f9fafb;
}

.drawer-menu>li>a,
.drawer-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-menu>li>a:hover,
.drawer-submenu-toggle:hover {
    color: #356df1;
}

.drawer-submenu-toggle svg {
    transition: transform 0.3s ease;
}

/* Submenu styles (Accordion sliding) */
.drawer-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-submenu a {
    display: block;
    padding: 8px 0;
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.drawer-submenu a:hover {
    color: #356df1;
    padding-left: 5px;
}

/* Active links highlight */
.drawer-active>a,
.drawer-active>.drawer-submenu-toggle {
    color: #356df1 !important;
    font-weight: 600;
}

/* Special Auth buttons in Drawer */
.drawer-login-btn {
    margin-top: 20px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 13px 12px !important;
    border-radius: 8px;
    background-color: #356df1 !important;
    color: #ffffff !important;
    text-align: center;
    font-size: 15px !important;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 4px 6px -1px rgba(53, 109, 241, 0.2);
}

.drawer-login-btn:hover {
    background-color: #2554d1 !important;
}

.drawer-register-btn {
    margin-top: 10px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 13px 12px !important;
    border-radius: 8px;
    background-color: transparent !important;
    border: 2px solid #d1d5db !important;
    color: #374151 !important;
    text-align: center;
    font-size: 15px !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.drawer-register-btn:hover {
    background-color: #f3f4f6 !important;
    border-color: #356df1 !important;
    color: #356df1 !important;
}

.drawer-logout-btn {
    margin-top: 20px;
    color: #ef4444 !important;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .mobile-header-right {
        display: flex;
    }

    /* Hide desktop-only nav elements on mobile */
    .main-nav {
        display: none !important;
    }

    .categories-dropdown {
        display: none !important;
    }

    .header-content {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 0;
    }

    .logo {
        order: 1;
    }

    .logo img,
    .logo svg {
        width: 140px !important;
        max-width: 140px !important;
    }

    .mobile-header-right {
        order: 2;
    }

    .search-bar {
        display: none !important;
    }

    .header-buttons {
        display: none !important;
    }
}

/* CUSTOM SEPAY MOBILE MEGA MENU DROP-DOWN ACCORDION STYLES BY ANTIGRAVITY */
@media (max-width: 991px) {
    .mobile-mega-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 10px 0 10px 15px !important;
        border-left: 2px solid #e2e8f0 !important;
        margin-left: 10px !important;
        margin-top: 10px !important;
    }

    .mobile-mega-all-products-link {
        font-weight: 600 !important;
        color: #356df1 !important;
        font-size: 14px !important;
        padding: 5px 0 5px 15px !important;
        margin-bottom: 5px !important;
        display: block !important;
    }

    .drawer-parent-block {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 8px !important;
    }

    .drawer-parent-header {
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        color: #64748b !important;
        letter-spacing: 0.05em !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 0 !important;
    }

    .drawer-parent-header a {
        font-size: 11px !important;
        font-weight: 700 !important;
        color: var(--cat-color, inherit) !important;
        text-transform: uppercase !important;
        padding: 0 !important;
        display: inline !important;
    }

    .drawer-parent-icon {
        color: #356df1 !important;
        font-size: 0.95rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .drawer-child-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding-left: 5px !important;
    }

    .drawer-child-item {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .drawer-child-link-group {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        text-decoration: none !important;
        padding: 0 !important;
    }

    .drawer-child-icon {
        color: #356df1 !important;
        font-size: 1rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        margin-top: 2px !important;
        background: #eff6ff !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 6px !important;
    }

    .drawer-child-info {
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important;
    }

    .drawer-child-name {
        font-size: 13.5px !important;
        font-weight: 600 !important;
        color: var(--cat-color, #1e293b) !important;
        line-height: 1.3 !important;
        padding: 0 !important;
        display: inline-block !important;
    }

    .drawer-child-desc {
        font-size: 11px !important;
        color: #64748b !important;
        margin-top: 2px !important;
        line-height: 1.4 !important;
        font-weight: 400 !important;
        padding: 0 !important;
        display: inline-block !important;
    }

    .drawer-grandchild-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding-left: 38px !important;
        margin-top: 4px !important;
    }

    .drawer-grandchild-link {
        font-size: 12.5px !important;
        color: var(--cat-color, #64748b) !important;
        text-decoration: none !important;
        padding: 2px 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .drawer-grandchild-link:hover {
        color: #356df1 !important;
    }

    .drawer-grandchild-icon {
        color: #356df1 !important;
        font-size: 0.8rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
}

/* Hamburger → X animation when drawer is open */
#mobileMenuToggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobileMenuToggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobileMenuToggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Drawer logo sizing fix */
.drawer-logo img,
.drawer-logo svg {
    width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Fix drawer submenu (mobile-mega-menu) open state */
.drawer-has-submenu.active .mobile-mega-menu,
.drawer-has-submenu.active .drawer-submenu {
    max-height: 2000px !important;
    opacity: 1 !important;
}

/* Drawer register btn - consistent size */
.drawer-register-btn {
    font-size: 15px !important;
}

/* Fix: Sản phẩm toggle button height - match other items */
.drawer-has-submenu>.drawer-submenu-toggle {
    padding: 14px 0 !important;
    min-height: unset !important;
    height: auto !important;
    line-height: 1.5 !important;
}

/* Agent submenu icons in mobile drawer */
.drawer-submenu .drawer-agent-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 8px 0 !important;
    text-decoration: none !important;
    color: #374151 !important;
}

.drawer-submenu .drawer-agent-item:hover {
    color: #356df1 !important;
}

.drawer-agent-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    font-size: 1rem !important;
}

.drawer-agent-info {
    display: flex !important;
    flex-direction: column !important;
}

.drawer-agent-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.3 !important;
}

.drawer-agent-desc {
    font-size: 11px !important;
    color: #64748b !important;
    margin-top: 1px !important;
    line-height: 1.4 !important;
}

/* Fix slider card bleeding on mobile - ensure container clips properly */
@media (max-width: 768px) {

    .popular-courses-section,
    .latest-products-section,
    .budget-products-section,
    .sale-products-section,
    .new-release-section {
        overflow: hidden !important;
    }

    .courses-slider-wrapper {
        overflow: hidden !important;
        width: 100% !important;
    }

    .courses-slider {
        overflow: hidden !important;
    }
}