/* =========================================================================
   TOAST & TALE | Mobile Navigation — Premium Redesign
   ========================================================================= */

/* Hide mobile elements by default (desktop) */
.mobile-header,
.mobile-menu-backdrop,
.mobile-menu-panel,
.mobile-fab-whatsapp { display: none; }

/* =========================================================================
   MOBILE STYLES (≤ 768px)
   ========================================================================= */
@media (max-width: 768px) {

    /* Hide desktop nav on mobile */
    .desktop-nav { display: none !important; }

    /* ── MOBILE HEADER BAR ────────────────────────────────────────────── */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0; left: 0; width: 100%;
        z-index: 1100;
        height: 62px;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        background: rgba(61, 43, 31, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-header.scrolled {
        background: rgba(61, 43, 31, 0.98);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    /* Call Button */
    .mobile-header__call {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 0.95rem;
        text-decoration: none;
        transition: all 0.3s ease;
        flex-shrink: 0;
        position: relative;
    }

    .mobile-header__call::after {
        content: '';
        position: absolute;
        inset: -3px;
        border-radius: 50%;
        border: 1.5px solid rgba(255, 255, 255, 0.15);
        animation: callPulse 2.5s ease-in-out infinite;
    }

    @keyframes callPulse {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.15); opacity: 0; }
    }

    .mobile-header__call:active {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(0.92);
    }

    /* Brand / Logo */
    .mobile-header__brand {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
    }

    .mobile-header__logo-img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .mobile-header__brand-text {
        font-family: 'Playfair Display', 'Georgia', serif;
        font-size: 1.15rem;
        font-weight: 700;
        color: #fff;
        letter-spacing: 0.3px;
    }

    /* Hamburger Button */
    .mobile-header__menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
    }

    .mobile-header__hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 22px;
        height: 18px;
        position: relative;
    }

    .mobile-header__hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        position: absolute;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-header__hamburger span:nth-child(1) { top: 0; }
    .mobile-header__hamburger span:nth-child(2) { top: 8px; }
    .mobile-header__hamburger span:nth-child(3) { top: 16px; }

    /* Hamburger → X animation */
    .mobile-header__hamburger.active span:nth-child(1) {
        top: 8px;
        transform: rotate(45deg);
    }
    .mobile-header__hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .mobile-header__hamburger.active span:nth-child(3) {
        top: 8px;
        transform: rotate(-45deg);
    }

    /* Body offset for fixed header */
    body {
        padding-top: 62px !important;
        padding-bottom: 0 !important;
    }

    .hero {
        min-height: calc(100vh - 62px) !important;
        min-height: calc(100dvh - 62px) !important;
        padding-top: 0 !important;
    }

    /* ── MENU BACKDROP ────────────────────────────────────────────────── */
    .mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1098;
        background: rgba(0, 0, 0, 0);
        pointer-events: none;
        transition: background 0.35s ease;
    }

    .mobile-menu-backdrop.active {
        background: rgba(0, 0, 0, 0.45);
        pointer-events: all;
    }

    /* ── SLIDE-OVER MENU PANEL ────────────────────────────────────────── */
    .mobile-menu-panel {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0;
        width: 82%;
        max-width: 360px;
        height: 100vh;
        height: 100dvh;
        z-index: 1099;
        background: linear-gradient(180deg, #faf6ec 0%, #f4ecd8 100%);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    }

    .mobile-menu-panel.active {
        transform: translateX(0);
    }

    .mobile-menu-panel__inner {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding: 82px 0 24px;
    }

    /* ── NAVIGATION LINKS ─────────────────────────────────────────────── */
    .mobile-menu-nav {
        padding: 0 20px;
        margin-bottom: 8px;
    }

    .mobile-menu-nav__label {
        display: block;
        font-family: 'Lato', sans-serif;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 2.5px;
        text-transform: uppercase;
        color: #9a8878;
        padding: 12px 16px 8px;
    }

    .mobile-menu-nav__item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 15px 16px;
        text-decoration: none;
        color: #3D2B1F;
        border-radius: 12px;
        transition: all 0.2s ease;
        position: relative;
    }

    .mobile-menu-nav__item:active {
        background: rgba(139, 94, 60, 0.08);
        transform: scale(0.98);
    }

    .mobile-menu-nav__item i {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(139, 94, 60, 0.08);
        color: #8B5E3C;
        font-size: 0.95rem;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

    .mobile-menu-nav__item:active i {
        background: rgba(139, 94, 60, 0.15);
    }

    .mobile-menu-nav__item span {
        font-family: 'Lato', sans-serif;
        font-weight: 700;
        font-size: 0.95rem;
        letter-spacing: 0.3px;
    }

    /* Separator between nav and actions */
    .mobile-menu-actions {
        padding: 0 20px;
        margin-bottom: 16px;
        border-top: 1px solid rgba(61, 43, 31, 0.08);
    }

    /* ── ORDER NOW CTA ────────────────────────────────────────────────── */
    .mobile-menu-cta {
        padding: 8px 20px 16px;
    }

    .mobile-menu-cta__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: linear-gradient(135deg, #1e3932 0%, #2d5c4a 100%);
        color: #fff;
        font-family: 'Lato', sans-serif;
        font-weight: 700;
        font-size: 1rem;
        letter-spacing: 0.5px;
        border-radius: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(30, 57, 50, 0.25);
    }

    .mobile-menu-cta__btn:active {
        transform: scale(0.97);
        box-shadow: 0 2px 8px rgba(30, 57, 50, 0.2);
    }

    .mobile-menu-cta__btn i {
        font-size: 1rem;
    }

    /* ── MENU FOOTER ──────────────────────────────────────────────────── */
    .mobile-menu-footer {
        margin-top: auto;
        padding: 20px 20px 16px;
        text-align: center;
        border-top: 1px solid rgba(61, 43, 31, 0.08);
    }

    .mobile-menu-footer__phone {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: #3D2B1F;
        font-family: 'Lato', sans-serif;
        font-weight: 700;
        font-size: 0.9rem;
        padding: 8px 16px;
        border-radius: 20px;
        background: rgba(139, 94, 60, 0.06);
        transition: all 0.2s ease;
        margin-bottom: 16px;
    }

    .mobile-menu-footer__phone i {
        color: #8B5E3C;
        font-size: 0.85rem;
    }

    .mobile-menu-footer__phone:active {
        background: rgba(139, 94, 60, 0.12);
    }

    .mobile-menu-footer__socials {
        display: flex;
        justify-content: center;
        gap: 12px;
    }

    .mobile-menu-footer__socials a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(61, 43, 31, 0.06);
        color: #3D2B1F;
        font-size: 1.1rem;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-menu-footer__socials a:active {
        background: rgba(139, 94, 60, 0.15);
        color: #8B5E3C;
        transform: scale(0.92);
    }

    /* ── FLOATING WHATSAPP FAB ────────────────────────────────────────── */
    .mobile-fab-whatsapp {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 16px;
        z-index: 1050;
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: #25D366;
        color: #fff;
        font-size: 1.6rem;
        text-decoration: none;
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
        opacity: 0;
        transform: scale(0.5) translateY(20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-fab-whatsapp.visible {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    .mobile-fab-whatsapp:active {
        transform: scale(0.9);
    }

    /* Pulse ring on the FAB */
    .mobile-fab-whatsapp::after {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        border: 2px solid rgba(37, 211, 102, 0.4);
        animation: fabPulse 2s ease-in-out infinite;
    }

    @keyframes fabPulse {
        0%, 100% { transform: scale(1); opacity: 0.6; }
        50% { transform: scale(1.2); opacity: 0; }
    }

    /* Hide FAB when menu is open */
    .mobile-menu-backdrop.active ~ .mobile-fab-whatsapp {
        opacity: 0;
        pointer-events: none;
    }
}
