/* =====================================================
   MOBILE MENU ONLY
   (Desktop is intentionally untouched)
   ===================================================== */

/* =====================================================
   MOBILE ONLY RULES
   ===================================================== */
@media (max-width: 991px) {

    /* =========================
       BASE MOBILE MENU LAYOUT
       ========================= */
    .main-nav li > a {
        display: flex;
        align-items: center;
        gap: 10px;
        line-height: 1.4;
        padding: 14px 16px;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
    }
    .main-nav li > a i {
        width: 18px;
        min-width: 18px;
        text-align: center;
        font-size: 16px;
    }

    /* =========================
       MOBILE SECTION DIVIDERS
       ========================= */

    .main-nav > li:not(:last-child) {
        border-bottom: 1px solid #f3f3f3;
    }

    /* =========================
       SUBMENU TOGGLE ICON (+)
       ========================= */

    .submenu-arrow {
        margin-left: auto;
        font-size: 20px;
        font-weight: 600;
        padding: 10px 12px;
        background-color: #f1f3f5;
        border-radius: 50%;
        line-height: 1;
        opacity: 0.85;
        pointer-events: none; /* entire row is clickable */
        transition: transform 0.25s ease, background-color 0.25s ease;
    }

    /* Rotate when open */
    .main-nav .has-submenu.open > a .submenu-arrow {
        transform: rotate(180deg);
        background-color: #e7f1ff;
        color: #0d6efd;
    }

    /* =========================
       SUBMENU STRUCTURE
       ========================= */

    .main-nav .has-submenu .submenu {
        display: none;
        padding-left: 12px;
        margin-left: 8px;
        border-left: 2px solid #f0f0f0;
    }

    .main-nav .has-submenu.open > .submenu {
        display: block;
    }

    /* Highlight active parent */
    .main-nav .has-submenu.open > a {
        background-color: #f8f9fa;
    }

    /* =========================
       SUBMENU LINKS
       ========================= */

    .main-nav .submenu a {
        font-size: 14px;
        font-weight: 400;
        padding: 10px 16px;
        border-radius: 6px;
        opacity: 0.95;
    }

    .main-nav .submenu li {
        margin-bottom: 6px;
    }

    .main-nav .submenu li:last-child {
        margin-bottom: 0;
    }

    .main-nav .submenu li a:hover {
        background-color: #f6f8fa;
    }

    /* Nested submenu indent (Awaiting Pickup etc.) */
    .main-nav .submenu .ps-3 {
        padding-left: 10px !important;
    }

    /* =========================
       MEGAMENU HEADINGS
       ========================= */

    .megamenu-wrapper h6 {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        color: #6c757d;
        margin-bottom: 8px;
        padding-left: 6px;
        letter-spacing: 0.04em;
    }

    /* =========================
       ACTIVE LINK STATE
       ========================= */

    .main-nav li.active > a {
        color: #0d6efd;
        font-weight: 600;
    }

    .main-nav li.active > a i {
        color: #0d6efd;
    }

    /* =========================
       MOBILE CLEANUP
       ========================= */

    /* Hide desktop-only images */
    .menu-img {
        display: none;
    }
}
