/* ============================================
   AMARI HEAD SPA - MOBILE NAVIGATION
   Hamburger Menu Styles
   ============================================ */

/* ===== HIDE OLD TAB BAR (if present) ===== */
.mobile-tab-bar {
  display: none !important;
}

/* ===== GLOBAL OVERFLOW FIX ===== */
html {
  overflow-x: hidden !important;
}

body {
  overflow-x: hidden !important;
  position: relative !important;
}

/* ===== MOBILE MENU - ALWAYS DEFINED ===== */
.mobile-menu {
  position: fixed !important;
  top: 0 !important;
  right: -100% !important;
  width: 85% !important;
  max-width: 320px !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #ffffff !important;
  z-index: 99999 !important;
  transition: right 0.3s ease !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  box-shadow: -5px 0 25px rgba(0,0,0,0.2) !important;
  visibility: hidden;
}

.mobile-menu.active {
  right: 0 !important;
  visibility: visible !important;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(0,0,0,0.6) !important;
  z-index: 99998 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.mobile-menu-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  html, body {
    max-width: 100vw !important;
    width: 100% !important;
  }

  /* Remove footer bottom padding that was for tab bar */
  .footer {
    padding-bottom: 1.5rem !important;
  }

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

  /* Show hamburger button on mobile */
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #f8f6f4;
    border: 2px solid #8D6F62;
    cursor: pointer;
    padding: 0.625rem;
    border-radius: 8px;
    z-index: 1000;
    position: relative;
  }

  .mobile-menu-btn:hover {
    background: #8D6F62;
  }

  .mobile-menu-btn:hover .hamburger,
  .mobile-menu-btn:hover .hamburger::before,
  .mobile-menu-btn:hover .hamburger::after {
    background: white;
  }

  .hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: #8D6F62;
    position: relative;
    transition: all 0.3s;
  }

  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: #8D6F62;
    transition: all 0.3s;
  }

  .hamburger::before {
    top: -6px;
  }

  .hamburger::after {
    top: 6px;
  }

  .mobile-menu-btn.active {
    background: #8D6F62;
  }

  .mobile-menu-btn.active .hamburger {
    background: transparent;
  }

  .mobile-menu-btn.active .hamburger::before,
  .mobile-menu-btn.active .hamburger::after {
    background: white;
  }

  .mobile-menu-btn.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
  }

  .mobile-menu-btn.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
  }

  /* Mobile Menu Header */
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #f8f6f4;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .mobile-menu-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #333;
    font-weight: 700;
  }

  .mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: #666;
    line-height: 1;
  }

  .mobile-menu-close:hover {
    color: #333;
  }

  /* Mobile Menu Nav */
  .mobile-menu-nav {
    padding: 1rem 0;
  }

  .mobile-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
  }

  .mobile-menu-link:hover,
  .mobile-menu-link:active {
    background: #f8f6f4;
    color: #8D6F62;
  }

  /* Quick Treatments Grid */
  .mobile-quick-treatments {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #faf8f6;
  }

  .mobile-quick-treatment {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
  }

  .mobile-quick-treatment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .mobile-quick-treatment-icon {
    width: 40px;
    height: 40px;
    background: #f8f6f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .mobile-quick-treatment-icon svg {
    width: 20px;
    height: 20px;
    fill: #8D6F62;
  }

  .mobile-quick-treatment-name {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.25rem;
  }

  .mobile-quick-treatment-price {
    font-size: 0.75rem;
    color: #8D6F62;
    font-weight: 700;
  }

  /* View All Treatments Section */
  .mobile-menu-section {
    border-bottom: 1px solid #f0f0f0;
  }

  .mobile-menu-section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #8D6F62;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .mobile-menu-section-toggle:hover {
    background: #7a5f54;
  }

  .mobile-menu-section-toggle .toggle-icon {
    transition: transform 0.3s ease;
  }

  .mobile-menu-section-toggle.active .toggle-icon {
    transform: rotate(180deg);
  }

  /* Subsection (collapsed by default) */
  .mobile-menu-subsection {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #faf8f6;
  }

  .mobile-menu-subsection.active {
    max-height: 2000px;
  }

  .mobile-menu-category {
    padding: 1rem 1.5rem 0.5rem;
  }

  .mobile-menu-category .category-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8D6F62;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
  }

  .mobile-submenu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: #333;
    text-decoration: none;
    font-size: 0.9375rem;
    border-bottom: 1px solid #eee;
  }

  .mobile-submenu-link:last-child {
    border-bottom: none;
  }

  .mobile-submenu-link .treatment-price {
    color: #8D6F62;
    font-weight: 600;
    font-size: 0.875rem;
  }

  .mobile-view-all-link {
    display: block;
    padding: 1rem 1.5rem;
    text-align: center;
    color: #8D6F62;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid #eee;
  }

  /* Mobile Menu Footer */
  .mobile-menu-footer {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid #eee;
    background: #f8f6f4;
  }

  .mobile-menu-footer .btn {
    display: block;
    text-align: center;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9375rem;
  }

  .mobile-menu-footer .btn-primary {
    background: linear-gradient(135deg, #9a8a7b, #8D6F62);
    color: white;
  }

  .mobile-menu-footer .btn-secondary {
    background: #25D366;
    color: white;
  }

  /* Position WhatsApp button properly */
  .floating-whatsapp-btn {
    bottom: 20px !important;
    right: 20px !important;
    z-index: 998 !important;
  }

  /* Header adjustments */
  .header {
    position: sticky;
    top: 0;
    z-index: 500;
  }

  .nav {
    padding: 0.75rem 1rem;
  }

  .logo {
    height: 40px;
    width: auto;
  }

  /* Hide any old tab bar styles */
  .mobile-app-menu,
  .mobile-app-overlay,
  .tab-bar-inner,
  .tab-item {
    display: none !important;
  }
}

/* ===== HIDE MOBILE ELEMENTS ON DESKTOP ===== */
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none !important;
  }

  .mobile-menu,
  .mobile-menu-overlay,
  .mobile-tab-bar {
    display: none !important;
  }
}
