/**
 * Mobile Mega Menu Styles
 * 
 * Stack-based mobile navigation with smooth transitions
 */

/* ==========================================
   MOBILE MEGA MENU WRAPPER
   ========================================== */

.mobile-mega-menu-wrapper {
    position: relative;
    width: 100%;
    background-color: #fff;
}

/* ==========================================
   BACK BUTTON
   ========================================== */

.back-button {
    display: none;
    cursor: pointer;
    z-index: 2;
    font-size: 16px;
    align-items: center;
    padding: 15px 0px;
}

.back-button .back-text {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
}

.back-button svg {
    flex-shrink: 0;
}

/* ==========================================
   MAIN MOBILE MENU
   ========================================== */

.main-mobile-menu {
    display: block;
    background-color: #fff;
    padding: 20px 0px;
    margin-top: 0px;
    list-style: none;
    width: 100%;
}

.main-mobile-menu ul {
    list-style-type: none;
    padding: 35px 0px;
    margin: 0;
    gap: 10px;
    display: grid;
}

.main-mobile-menu li {
    margin: 10px 0;
}

.main-mobile-menu a {
    text-decoration: none;
    color: #000000 !important;
    line-height: 1.2em !important;
    font-size: 26px;
    font-weight: 500;
}

/* ==========================================
   MEGA MENU MOBILE CONTAINER
   ========================================== */

.mega-menu-mobile {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #fff;
    z-index: 9999;
    margin-top: 0px;
    padding: 20px 0px;
}

.mega-menu-mobile ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    gap: 25px;
    display: grid;
    font-size: 16px;
    font-weight: 500;
}

/* ==========================================
   MOBILE CATEGORY COLUMNS
   ========================================== */

.mobile-category {
    position: relative;
    top: 0;
    width: 100%;
    background-color: #fff;
    overflow-y: hidden;
    transition: transform 0.3s ease;
    z-index: 1;
    padding-top: 20px;
}

#mobile-column1 {
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-category.visible {
    transform: translateX(0);
    padding: 20px;
    margin-top: 0px;
}

/* ==========================================
   CATEGORY LINKS AND ARROWS
   ========================================== */

.category-link {
    color: black !important;
    text-decoration: none;
}

.category-arrow {
    float: right;
    font-size: 18px;
    color: #000;
    padding-left: 10px;
    cursor: pointer;
}

.category-arrow svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease-in-out;
}

.category-arrow.reverse svg {
    transform: rotate(180deg);
}

[data-has-children="false"] .category-arrow {
    display: none;
}

/* ==========================================
   WORDPRESS MENU INTEGRATION
   ========================================== */

.wp-menu-separator {
    margin: 30px 0px;
}

.mobile-category ul:nth-of-type(2) li a {
    color: black !important;
    text-decoration: none;
}

.mobile-category ul:nth-of-type(2) li a:hover {
    color: #333333;
    text-decoration: none;
}

/* ==========================================
   HORIZONTAL RULE
   ========================================== */

.hr100 {
    width: 100%;
    margin: 30px 0;
}

/* ==========================================
   LIST STYLING
   ========================================== */

.mobile-category ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-category ul li a {
    flex: 1;
    color: #000;
    text-decoration: none;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media screen and (max-width: 480px) {
    .main-mobile-menu a {
        font-size: 22px;
    }
    
    .mega-menu-mobile {
        padding: 20px 0px;
    }
    
    .mobile-category {
        padding-top: 15px;
    }
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

.mobile-category::-webkit-scrollbar {
    width: 6px;
}

.mobile-category::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.mobile-category::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.mobile-category::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ==========================================
   SMOOTH TRANSITIONS
   ========================================== */

.mobile-category,
.main-mobile-menu,
.mega-menu-mobile {
    transition: all 0.3s ease-in-out;
}

.back-button {
    transition: opacity 0.2s ease;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.category-link:focus,
.menu-item:focus,
.back-button:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.category-arrow:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
    border-radius: 4px;
}
