/* Menu mobile lateral — Luzago Alimentos */

/* Oculto no desktop — o CSS customizado carrega depois do Tailwind e sobrescrevia md:hidden */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
    max-width: 100%;
    contain: layout style paint;
}

.mobile-menu.is-open {
    pointer-events: auto;
    visibility: visible;
}

.mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__overlay {
    opacity: 1;
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(88vw, 320px);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    background: #fff;
    box-shadow: -8px 0 32px rgb(0 0 0 / 0.18);
    display: flex;
    flex-direction: column;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: transform;
}

.mobile-menu.is-open .mobile-menu__panel {
    transform: translate3d(0, 0, 0);
}

.mobile-menu:not(.is-open) .mobile-menu__panel {
    visibility: hidden;
}

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #0f4c2c;
    flex-shrink: 0;
}

.mobile-menu__header img {
    height: 2.75rem;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mobile-menu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    color: #fff;
    font-size: 1.25rem;
    transition: background-color 0.2s ease;
}

.mobile-menu__close:hover,
.mobile-menu__close:focus-visible {
    background: rgb(255 255 255 / 0.15);
    outline: none;
}

.mobile-menu__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0 1rem;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c2a29;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu__link:hover,
.mobile-menu__link.is-active {
    background: #f0fdf4;
    color: #0f4c2c;
}

.mobile-menu__accordion-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c2a29;
    text-align: left;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-menu__accordion-btn:hover,
.mobile-menu__accordion-btn[aria-expanded="true"] {
    background: #f0fdf4;
    color: #0f4c2c;
}

.mobile-menu__accordion-btn i {
    transition: transform 0.25s ease;
    font-size: 0.75rem;
    color: #6b7280;
}

.mobile-menu__accordion-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.mobile-menu__sub {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f9fafb;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-menu__sub.is-open {
    max-height: 480px;
}

.mobile-menu__sub a {
    display: block;
    padding: 0.75rem 1.25rem 0.75rem 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu__sub a:hover,
.mobile-menu__sub a.is-active {
    background: #0f4c2c;
    color: #fff;
}

.mobile-menu__sub a.mobile-menu__sub--highlight {
    color: #fbb034;
    font-weight: 700;
}

.mobile-menu__sub a.mobile-menu__sub--highlight:hover,
.mobile-menu__sub a.mobile-menu__sub--highlight.is-active {
    color: #fbb034;
}

.mobile-menu__actions {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.mobile-menu__actions .btn {
    width: 100%;
    justify-content: center;
}

.mobile-menu__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #0f4c2c;
    color: #fff;
    flex-shrink: 0;
}

.mobile-menu__phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.mobile-menu__social {
    display: flex;
    gap: 0.5rem;
}

.mobile-menu__social a {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.15);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.mobile-menu__social a:hover {
    background: #fbb034;
    color: #2c2a29;
    transform: scale(1.08);
}

body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 0.375rem;
        color: #2c2a29;
        font-size: 1.35rem;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus-visible {
        background-color: #f3f4f6;
        color: #0f4c2c;
        outline: none;
    }
}

@media (min-width: 768px) {
    .mobile-menu,
    .mobile-menu-toggle {
        display: none !important;
    }
}
