/**
 * base-menu.css - Estilos base para menús AR
 * 
 * Este archivo contiene los estilos fundamentales que se comparten
 * entre todos los restaurantes. Los estilos específicos de cada
 * restaurante se definen en archivos separados (ej: oceanbistro.css)
 * 
 * @version 2.0.0
 */

/* ========================================
   RESET & BASE
   ======================================== */
   * { 
    box-sizing: border-box; 
  }
  
  body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #f8f5f0;
    color: #2b2b2b;
  }
  
  /* Previene scroll cuando el sheet está abierto */
  body.no-scroll {
    overflow: hidden;
  }
  
  /* ========================================
     LAYOUT
     ======================================== */
  
  /* Wrapper con safe-area para notch/home indicator */
  .menu-wrapper {
    max-width: 520px;
    margin: 0 auto;
    padding:
      calc(16px + env(safe-area-inset-top))
      14px
      calc(22px + env(safe-area-inset-bottom));
  }
  
  /* Card principal del menú */
  .menu-card {
    background: #fff;
    border-radius: 22px;
    padding: 1.6rem 1.2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
  }
  
  /* ========================================
     HEADER
     ======================================== */
  .menu-header {
    text-align: center;
    margin-bottom: 1.0rem;
  }
  
  .menu-header img {
    max-width: 120px;
    margin-bottom: 0.8rem;
  }
  
  .menu-header h1 {
    font-size: 2rem;
    margin: 0;
  }
  
  /* ========================================
     INFO BAR (Pills)
     ======================================== */
  .menu-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0.2rem 0 0.9rem;
  }
  
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 0.98rem;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.9);
  }
  
  /* ========================================
     FILTERS
     ======================================== */
  .filters-wrap {
    margin: 0.8rem 0 1.2rem;
  }
  
  .filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .filters::-webkit-scrollbar { 
    display: none; 
  }
  
  .filter-btn {
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.9);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  
  .filter-btn.active {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
  }
  
  .menu-meta {
    display: flex;
    justify-content: flex-start;
    padding: 0 2px;
  }
  
  .counter {
    font-size: 0.95rem;
    opacity: 0.75;
  }
  
  /* ========================================
     CATEGORIES
     ======================================== */
  .category {
    margin-bottom: 1.7rem;
    scroll-margin-top: 92px;
  }
  
  .category h2 {
    font-size: 1.3rem;
    margin: 0 0 0.9rem;
  }
  
  /* ========================================
     MENU ITEMS
     ======================================== */
  .menu-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background 0.15s ease;
  }
  
  .menu-item:last-child {
    border-bottom: none;
  }
  
  .menu-item:active {
    background: rgba(0,0,0,0.02);
  }
  
  .menu-item__left {
    min-width: 0;
    flex: 1;
  }
  
  .menu-item__name {
    font-weight: 700;
  }
  
  .menu-item__desc {
    margin-top: 4px;
    opacity: 0.78;
    line-height: 1.25rem;
  }
  
  .menu-item__hint {
    margin-top: 6px;
    font-size: 0.9rem;
    opacity: 0.72;
  }
  
  .menu-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
  }
  
  .menu-item__price {
    font-weight: 800;
    white-space: nowrap;
  }
  
  /* ========================================
     WHATSAPP BUTTON
     ======================================== */
  .wa-btn {
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: transform 0.1s ease;
  }
  
  .wa-btn:active { 
    transform: translateY(1px); 
  }
  
  /* ========================================
     BOTTOM SHEET (WhatsApp modal)
     ======================================== */
  .wa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 9998;
  }
  
  .wa-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  
  .wa-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(110%);
    transition: transform .22s ease;
    z-index: 9999;
    padding:
      10px 14px
      calc(14px + env(safe-area-inset-bottom));
    pointer-events: none;
  }
  
  .wa-sheet.is-open {
    transform: translateY(0);
    pointer-events: auto;
  }
  
  .wa-sheet__content {
    max-width: 520px;
    margin: 0 auto;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.20);
    padding: 14px 14px 16px;
    position: relative;
  }
  
  .wa-sheet__grab {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    margin: 0 auto 10px;
    background: rgba(0,0,0,0.18);
  }
  
  .wa-sheet__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    font-size: 18px;
    line-height: 38px;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease;
  }
  
  .wa-sheet__close:active { 
    transform: translateY(1px); 
  }
  
  .wa-sheet__title {
    font-weight: 800;
    font-size: 1.25rem;
    margin: 2px 0 4px;
  }
  
  .wa-sheet__subtitle {
    opacity: 0.78;
    font-size: 0.98rem;
    margin-bottom: 10px;
  }
  
  .wa-sheet__item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    background: rgba(0,0,0,0.02);
    margin-bottom: 12px;
  }
  
  .wa-sheet__itemName {
    font-weight: 800;
  }
  
  .wa-sheet__itemPrice {
    font-weight: 900;
    white-space: nowrap;
  }
  
  .wa-sheet__actions {
    display: flex;
    gap: 10px;
  }
  
  .wa-choice {
    flex: 1;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    padding: 12px 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    background: rgba(255,255,255,0.95);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease;
  }
  
  .wa-choice:active { 
    transform: translateY(1px); 
  }
  
  .wa-sheet__fineprint {
    margin-top: 10px;
    font-size: 0.92rem;
    opacity: 0.72;
  }