/* ─── Tienda Chat Global CSS ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }

/* ── PUBLIC MENU STYLES ─────────────────────────────── */
:root {
  --menu-brand: #2563EB;
  --menu-bg:    #F8FAFC;
  --menu-card:  #FFFFFF;
  --menu-text:  #1E293B;
  --menu-muted: #64748B;
  --menu-border:#E2E8F0;
}

/* App shell for PWA */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--menu-bg);
  position: relative;
}

/* Sticky header for public menu */
.menu-header {
  position: sticky; top: 0; z-index: 50;
  background: white;
  border-bottom: 1px solid var(--menu-border);
}

.menu-hero {
  height: 180px;
  background: linear-gradient(135deg, var(--menu-brand), #7C3AED);
  position: relative; overflow: hidden;
}
.menu-hero img { width: 100%; height: 100%; object-fit: cover; }
.menu-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.menu-brand-info {
  position: absolute; bottom: 1rem; left: 1rem; color: white;
}
.menu-brand-info h1 { font-size: 1.375rem; font-weight: 800; margin: 0; }
.menu-brand-info p  { font-size: .8125rem; opacity: .9; margin: .125rem 0 0; }
.menu-logo {
  position: absolute; top: 1rem; left: 1rem;
  width: 52px; height: 52px; border-radius: 12px; border: 3px solid rgba(255,255,255,.5);
  object-fit: cover; background: white;
}

/* Category tabs */
.category-tabs {
  display: flex; gap: .375rem; overflow-x: auto; padding: .75rem 1rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: .4375rem .875rem; border-radius: 20px; font-size: .8125rem;
  font-weight: 600; cursor: pointer; border: 1.5px solid var(--menu-border);
  background: white; color: var(--menu-muted); transition: all .15s; white-space: nowrap;
}
.cat-tab.active { background: var(--menu-brand); color: white; border-color: var(--menu-brand); }

/* Search bar */
.menu-search {
  padding: .625rem 1rem; border-bottom: 1px solid var(--menu-border);
}
.menu-search input {
  width: 100%; padding: .5625rem 1rem; border-radius: 20px; border: 1.5px solid var(--menu-border);
  font-size: .9rem; outline: none; background: var(--menu-bg);
}
.menu-search input:focus { border-color: var(--menu-brand); }

/* Menu items */
.menu-section { padding: 0 1rem; }
.menu-section-title {
  font-size: 1.125rem; font-weight: 800; padding: 1.25rem 0 .625rem;
  position: sticky; top: 108px; background: var(--menu-bg); z-index: 10;
}

.menu-item {
  display: flex; gap: .875rem; padding: .875rem 0;
  border-bottom: 1px solid #F1F5F9; cursor: pointer; align-items: center;
}
.menu-item-img {
  width: 80px; height: 80px; border-radius: 10px; object-fit: cover;
  flex-shrink: 0; background: #F1F5F9;
}
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name { font-weight: 700; font-size: .9375rem; margin-bottom: .25rem; }
.menu-item-desc { font-size: .8125rem; color: var(--menu-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item-price { font-weight: 800; color: var(--menu-brand); font-size: 1rem; margin-top: .375rem; }
.menu-item-old-price { text-decoration: line-through; color: var(--menu-muted); font-size: .8rem; margin-left: .25rem; font-weight: 400; }
.menu-item-tags { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .25rem; }
.menu-item-tag { font-size: .65rem; padding: .125rem .375rem; border-radius: 9999px; background: #F0FDF4; color: #15803D; font-weight: 600; }
.menu-item-tag.allergen { background: #FFF7ED; color: #C2410C; }
.menu-item-badge { background: #EFF6FF; color: #1D4ED8; }
.menu-item-add-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--menu-brand); color: white;
  border: none; font-size: 1.25rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; transition: transform .1s;
}
.menu-item-add-btn:active { transform: scale(.92); }
.featured-badge { font-size: .65rem; background: #FEF9C3; color: #854D0E; padding: .125rem .375rem; border-radius: 4px; font-weight: 700; }

/* Cart FAB */
.cart-fab {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  max-width: 440px; width: calc(100% - 2rem);
  background: var(--menu-brand); color: white; border: none; border-radius: 14px;
  padding: .9375rem 1.25rem; font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 8px 24px rgba(37,99,235,.4); z-index: 99;
  transition: transform .15s;
}
.cart-fab:active { transform: translateX(-50%) scale(.97); }
.cart-fab-count { background: rgba(255,255,255,.25); border-radius: 9999px; padding: .125rem .5rem; font-size: .875rem; }

/* Item detail sheet */
.item-sheet {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.item-sheet.open { pointer-events: all; opacity: 1; }
.item-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.item-sheet-content {
  position: relative; z-index: 1; background: white; border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; margin: 0 auto; max-height: 90vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .25s;
}
.item-sheet.open .item-sheet-content { transform: translateY(0); }
.item-sheet-img { width: 100%; height: 220px; object-fit: cover; }
.item-sheet-body { padding: 1.25rem; }
.item-sheet-name { font-size: 1.375rem; font-weight: 800; }
.item-sheet-price { font-size: 1.25rem; font-weight: 800; color: var(--menu-brand); margin-top: .375rem; }
.item-sheet-desc { color: var(--menu-muted); font-size: .9rem; line-height: 1.6; margin-top: .625rem; }

/* Variation & Addon selectors */
.option-group { margin-top: 1.25rem; }
.option-group-title { font-weight: 700; font-size: .9375rem; margin-bottom: .625rem; }
.option-group-hint  { font-size: .75rem; color: var(--menu-muted); }
.option-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .625rem .875rem; border: 1.5px solid var(--menu-border); border-radius: 8px;
  margin-bottom: .375rem; cursor: pointer; transition: border .1s;
}
.option-item.selected { border-color: var(--menu-brand); background: #EFF6FF; }
.option-item-name { font-size: .9rem; font-weight: 500; }
.option-item-price { font-size: .875rem; color: var(--menu-muted); }

/* Qty selector */
.qty-selector { display: flex; align-items: center; gap: 1rem; }
.qty-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--menu-border);
  background: white; font-size: 1.125rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all .1s;
}
.qty-btn:hover { border-color: var(--menu-brand); color: var(--menu-brand); }
.qty-num { font-size: 1.125rem; font-weight: 700; min-width: 24px; text-align: center; }

/* Cart page */
.cart-item { display: flex; gap: .875rem; padding: .875rem 0; border-bottom: 1px solid #F1F5F9; }
.cart-item-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #F1F5F9; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: .9375rem; }
.cart-item-addons { font-size: .78rem; color: var(--menu-muted); margin-top: .125rem; }
.cart-item-price { font-weight: 800; color: var(--menu-brand); margin-top: .25rem; }
.cart-remove { background: none; border: none; color: #CBD5E1; cursor: pointer; font-size: 1rem; }
.cart-remove:hover { color: var(--danger); }

/* Checkout steps */
.checkout-steps { display: flex; gap: 0; }
.ck-step { flex: 1; text-align: center; padding: .75rem .5rem; font-size: .8rem; border-bottom: 3px solid var(--menu-border); color: var(--menu-muted); font-weight: 500; }
.ck-step.active { border-color: var(--menu-brand); color: var(--menu-brand); font-weight: 700; }
.ck-step.done   { border-color: var(--success); color: var(--success); }

/* Order tracker */
.tracker { padding: 1.5rem; }
.tracker-status { display: flex; gap: 0; margin: 1.5rem 0; }
.track-step { flex: 1; text-align: center; }
.track-dot {
  width: 28px; height: 28px; border-radius: 50%; margin: 0 auto .5rem;
  background: var(--menu-border); display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: white;
}
.track-dot.done    { background: var(--success); }
.track-dot.current { background: var(--menu-brand); }
.track-label { font-size: .7rem; color: var(--menu-muted); }
.tracker-line { height: 2px; background: var(--menu-border); flex: 1; margin-top: 14px; }
.tracker-line.done { background: var(--success); }

/* Waiter call button */
.waiter-call-btn {
  position: fixed; bottom: 80px; right: 1rem; width: 52px; height: 52px;
  border-radius: 50%; background: #F59E0B; color: white; border: none; font-size: 1.5rem;
  cursor: pointer; box-shadow: 0 4px 12px rgba(245,158,11,.4); z-index: 98;
  display: flex; align-items: center; justify-content: center;
}

/* Payment method cards */
.payment-card {
  border: 2px solid var(--menu-border); border-radius: 12px; padding: .875rem;
  cursor: pointer; margin-bottom: .625rem; transition: border .15s;
}
.payment-card.selected { border-color: var(--menu-brand); background: #EFF6FF; }
.payment-card-name { font-weight: 700; font-size: .9375rem; }
.payment-card-info { font-size: .8125rem; color: var(--menu-muted); margin-top: .25rem; }

/* ── LANDING PAGE ────────────────────────────────────── */
.landing-nav {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--menu-border);
  padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.landing-logo { font-size: 1.25rem; font-weight: 800; color: var(--menu-brand); }
.landing-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
  padding: 5rem 2rem; text-align: center;
}
.hero-title { font-size: 3rem; font-weight: 900; line-height: 1.1; max-width: 700px; margin: 0 auto 1.5rem; }
.hero-subtitle { font-size: 1.25rem; color: var(--menu-muted); max-width: 560px; margin: 0 auto 2rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.pricing-card {
  background: white; border-radius: 16px; padding: 2rem; border: 2px solid var(--menu-border);
  position: relative; transition: transform .2s, box-shadow .2s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); }
.pricing-card.popular { border-color: var(--menu-brand); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--menu-brand); color: white; padding: .25rem 1rem; border-radius: 9999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pricing-name  { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; }
.pricing-price { font-size: 2.5rem; font-weight: 900; color: var(--menu-brand); }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--menu-muted); }
.pricing-features { list-style: none; padding: 0; margin: 1.5rem 0; }
.pricing-features li { padding: .4rem 0; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; }
.pricing-features li.no { color: var(--menu-muted); }
.pricing-features li.no::before { content: '✗'; color: #CBD5E1; }
.pricing-cta { display: block; width: 100%; padding: .875rem; border-radius: 10px; font-size: 1rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; border: none; }
.pricing-cta-primary { background: var(--menu-brand); color: white; }
.pricing-cta-secondary { background: var(--menu-bg); color: var(--menu-text); border: 2px solid var(--menu-border); }
