/* ============================================
   DESKTOP: Horizontal Dropdown Menu
   ============================================ */

.ag-dropdown-menu-container .ag-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.ag-dropdown-menu .menu-item {
    position: relative;
}

.ag-dropdown-menu .menu-item a {
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    padding: 10px 0;
    white-space: nowrap;
    flex-wrap: nowrap;
}

/* The Arrow */
.ag-dropdown-menu .menu-item-has-children>a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: transform 0.3s ease;
}

/* Hover effect on arrow */
.ag-dropdown-menu .menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

/* Dropdown menu styling */
.ag-dropdown-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    list-style: none;
    padding: 15px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border-radius: 4px;
}

.ag-dropdown-menu .menu-item:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ag-dropdown-menu .sub-menu .menu-item a {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 400;
}

.ag-dropdown-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -15px;
}

/* ============================================
   MOBILE BURGER BUTTON (hidden on desktop)
   ============================================ */

.ag-mobile-burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    outline: none;
    z-index: 10;
    position: relative;
    transition: transform 0.3s ease;
}

.ag-mobile-burger-btn:hover {
    transform: scale(1.05);
}

.ag-mobile-burger-icon {
    position: relative;
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ag-mobile-burger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #192b4b;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Burger → X animation */
.ag-mobile-burger-btn.active .ag-mobile-burger-icon span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.ag-mobile-burger-btn.active .ag-mobile-burger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.ag-mobile-burger-btn.active .ag-mobile-burger-icon span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ============================================
   MOBILE OVERLAY (appended to body via JS)
   ============================================ */

.ag-mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: none;
}

.ag-mobile-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   MOBILE SLIDE-IN SIDEBAR (appended to body via JS)
   ============================================ */

.ag-mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 90vw !important;
    max-width: 90vw !important;
    height: 100%;
    height: 100dvh;
    background: #192b4b;
    z-index: 999999;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: none;
}

.ag-mobile-sidebar.open {
    transform: translateX(0);
    pointer-events: auto;
}

/* Close button in sidebar */
.ag-mobile-sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.ag-mobile-sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Sidebar content */
.ag-mobile-sidebar-content {
    padding: 70px 25px 40px 25px;
}

.ag-sidebar-section {
    margin-bottom: 35px;
}

.ag-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ag-mobile-submenu-toggle {
    background: none;
    border: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

.ag-mobile-submenu-toggle svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    transition: transform 0.3s ease;
}

.ag-mobile-submenu-toggle svg.rotate {
    transform: rotate(180deg);
}

.ag-category-list,
.ag-brand-list,
.ag-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ag-category-list li,
.ag-brand-list li,
.ag-filter-list li {
    margin-bottom: 12px;
}

.ag-category-list li a,
.ag-brand-list li a,
.ag-filter-list li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: block;
}

.ag-category-list li a:hover,
.ag-brand-list li a:hover,
.ag-filter-list li a:hover {
    color: #fff;
    padding-left: 5px;
}

.ag-category-list li,
.ag-brand-list li {
    margin-bottom: 12px;
}

.ag-category-list li a,
.ag-brand-list li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: block;
}

.ag-category-list li a:hover,
.ag-brand-list li a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Body no-scroll when sidebar is open */
body.ag-sidebar-open {
    overflow: hidden !important;
}

/* ============================================
   RESPONSIVE: MOBILE (<= 1024px)
   ============================================ */

@media (max-width: 1024px) {

    /* Hide the desktop dropdown menu */
    .ag-dropdown-menu-container .ag-dropdown-menu {
        display: none !important;
    }

    /* Show burger button */
    .ag-mobile-burger-btn {
        display: block;
    }
}

/* On desktop, ensure sidebar is always hidden */
@media (min-width: 1025px) {

    .ag-mobile-sidebar,
    .ag-mobile-sidebar-overlay {
        display: none !important;
    }
}

/* Mobile Sidebar Menu (Walker) Styling */
.ag-mobile-nav-container .ag-mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 35px 0;
}

.ag-mobile-nav-container .ag-mobile-menu-list li {
    margin-bottom: 12px;
}

.ag-mobile-nav-container .ag-mobile-menu-list li>a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ag-mobile-nav-container .sub-menu {
    list-style: none;
    padding: 10px 0 0 20px;
    margin: 0;
    display: none;
}

.ag-mobile-nav-container .sub-menu.open {
    display: block;
}

.ag-mobile-nav-container .ag-mobile-submenu-toggle {
    display: inline-block;
    padding: 0 5px;
    background: none;
    border: none;
}

.ag-mobile-nav-container .ag-mobile-submenu-toggle svg {
    fill: #fff;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.ag-mobile-nav-container .ag-mobile-submenu-toggle.open svg {
    transform: rotate(180deg);
}