/* ============================================================
   CLIENT — Mobile-first, vista pública
   ============================================================ */

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,242,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; gap: 8px; padding: 0 16px;
}
.site-logo {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--charcoal); display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.site-logo i { color: var(--amber); font-size: 1rem; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Toggle buttons (idioma, tema, admin) */
.header-toggle-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 9px;
  cursor: pointer; color: var(--slate); font-size: 0.85rem;
  display: flex; align-items: center; gap: 5px;
  transition: all var(--transition); white-space: nowrap;
}
.header-toggle-btn:hover { border-color: var(--amber); color: var(--amber); }
.lang-label { font-size: 0.75rem; font-weight: 700; }

/* Ocultar texto "Admin" en móvil, solo ícono */
.btn-admin-text { display: none; }

/* Modo badge — solo ícono en móvil */
.mode-indicator {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  white-space: nowrap;
}
.mode-indicator.day   { background: #fef9e7; color: #9a7d0a; }
.mode-indicator.night { background: #1a1a2e; color: #c39bd3; }
.mode-indicator .mode-text { display: none; }

/* Cart button */
.cart-btn {
  position: relative; background: var(--amber); color: #fff;
  border: none; border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition); flex-shrink: 0;
}
.cart-btn:hover { background: var(--amber-dk); }
.cart-btn-text { display: none; }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  background: var(--danger); color: #fff;
  width: 17px; height: 17px; border-radius: 50%;
  font-size: 0.65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--cream);
}

/* ── Hero ── */
.hero {
  min-height: 280px; display: flex; align-items: center;
  position: relative; overflow: hidden;
  transition: background 0.6s ease;
}
.hero.day   { background: var(--hero-bg-day); }
.hero.night { background: var(--hero-bg-night); }
.hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content {
  position: relative; z-index: 1; color: #fff;
  padding: 36px 16px; width: 100%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700;
  margin-bottom: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}
.hero h1 {
  color: #fff; margin-bottom: 10px;
  font-size: clamp(1.4rem, 5vw, 2.6rem); line-height: 1.2;
}
.hero p {
  color: rgba(255,255,255,0.8); font-size: 0.9rem;
  margin-bottom: 20px; max-width: 480px; line-height: 1.6;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn { padding: 10px 18px; font-size: 0.88rem; }
.hero-cta .btn-primary { background: var(--amber); border-color: var(--amber); }
.hero-cta .btn-white {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.hero-cta .btn-white:hover { background: rgba(255,255,255,0.22); }

/* ── Promo banner ── */
.promo-banner {
  background: linear-gradient(90deg, var(--amber-dk), var(--amber));
  color: #fff; padding: 10px 16px; text-align: center;
  font-size: 0.82rem; font-weight: 600; line-height: 1.5;
}
.promo-banner .countdown { font-weight: 800; margin-left: 6px; }

/* ── Category tabs ── */
.category-section { padding: 20px 0 0; }
.category-tabs {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 0 16px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted); font-weight: 600;
  font-size: 0.82rem; cursor: pointer; white-space: nowrap;
  transition: all var(--transition); flex-shrink: 0;
}
.cat-tab:hover  { border-color: var(--amber); color: var(--amber); }
.cat-tab.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
  box-shadow: 0 2px 8px rgba(200,135,58,0.4);
  font-weight: 700;
}

/* ── Search bar ── */
.menu-search-wrap {
  position: relative; margin: 0 16px 4px;
}
.menu-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.85rem; pointer-events: none;
}
.menu-search-input {
  width: 100%; padding: 9px 36px 9px 34px;
  border: 1.5px solid var(--border); border-radius: 20px;
  font-family: var(--font-body); font-size: 0.88rem; color: var(--charcoal);
  background: var(--surface); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.menu-search-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,135,58,0.1);
}
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.85rem; padding: 4px;
  display: flex; align-items: center;
}
.search-clear:hover { color: var(--danger); }

/* Resultados de búsqueda */
.search-results-label {
  font-size: 0.85rem; color: var(--muted); margin-bottom: 16px;
  padding: 0 16px;
}
.search-results-label strong { color: var(--charcoal); }

/* Sección "otro turno" */
.other-shift-section { margin-top: 28px; }
.other-shift-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 14px; padding: 0 16px;
}
.other-shift-label i { color: var(--warning); }

/* Cards de otro turno — atenuadas */
.card-other-shift { opacity: 0.65; filter: grayscale(20%); }
.card-other-shift:hover { opacity: 0.85; filter: none; }

/* Badge "no disponible ahora" */
.unavail-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 0.65rem; font-weight: 700; padding: 3px 7px;
  border-radius: 4px; display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}

/* ── Menu section ── */
.menu-section { padding: 16px 0 48px; }
.menu-section-title {
  font-size: 1.2rem; margin-bottom: 16px; color: var(--charcoal);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.menu-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Grid: 1 col móvil → 2 col tablet → 3 col desktop */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 16px;
}

.menu-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  /* Animación staggered */
  animation: cardIn 0.3s ease both;
}
/* Delay escalonado para las primeras 8 cards */
.menu-card:nth-child(1) { animation-delay: 0.03s; }
.menu-card:nth-child(2) { animation-delay: 0.06s; }
.menu-card:nth-child(3) { animation-delay: 0.09s; }
.menu-card:nth-child(4) { animation-delay: 0.12s; }
.menu-card:nth-child(5) { animation-delay: 0.15s; }
.menu-card:nth-child(6) { animation-delay: 0.18s; }
.menu-card:nth-child(7) { animation-delay: 0.21s; }
.menu-card:nth-child(8) { animation-delay: 0.24s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* En móvil las cards son horizontales para aprovechar espacio */
.menu-card {
  flex-direction: row; min-height: 110px;
}
.menu-card-img {
  width: 110px; min-width: 110px; height: auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; position: relative; overflow: hidden; flex-shrink: 0;
}
.menu-card-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-card-badge {
  position: absolute; top: 6px; left: 6px;
  font-size: 0.62rem; padding: 2px 5px;
}
.menu-card-body {
  padding: 12px; flex: 1; display: flex; flex-direction: column;
  min-width: 0; /* evita overflow */
}
.menu-card-title {
  font-size: 0.92rem; font-weight: 700; color: var(--charcoal);
  margin-bottom: 4px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-card-desc {
  font-size: 0.78rem; color: var(--muted); flex: 1;
  margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.menu-card-footer {
  display: flex; align-items: center;
  justify-content: space-between; gap: 6px;
}
.menu-card-prices { display: flex; flex-direction: column; }
.price-local    { font-size: 0.95rem; font-weight: 800; color: var(--amber-dk); }
.price-delivery { font-size: 0.72rem; color: var(--muted); }
.btn-add {
  background: var(--amber); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 7px 12px;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background var(--transition), transform 0.1s; white-space: nowrap; flex-shrink: 0;
}
.btn-add:hover  { background: var(--amber-dk); }
.btn-add:active { transform: scale(0.93); }
.btn-add.added  { background: var(--success); }
@keyframes btnPop { 0%{transform:scale(1)} 40%{transform:scale(1.18)} 100%{transform:scale(1)} }
.btn-add.pop { animation: btnPop 0.25s ease; }

/* ── Cart drawer ── */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 400px;
  background: var(--surface); box-shadow: var(--shadow-lg);
  z-index: 300; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(28,28,30,0.45);
  z-index: 299; display: none;
}
.cart-backdrop.open { display: block; }
.cart-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cart-header h3 { font-size: 1rem; }
.cart-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cart-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name  { font-weight: 600; font-size: 0.88rem; color: var(--charcoal); line-height: 1.3; }
.cart-item-price { font-size: 0.82rem; color: var(--amber-dk); font-weight: 700; margin-top: 2px; }
.cart-item-qty   { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--border); background: none; cursor: pointer;
  font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--amber); color: var(--amber); }
.qty-num { font-weight: 700; font-size: 0.88rem; min-width: 18px; text-align: center; }
.cart-footer { padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-service-type {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
}
.service-btn {
  padding: 9px 6px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: none; cursor: pointer; font-size: 0.8rem; font-weight: 600;
  text-align: center; transition: all var(--transition); line-height: 1.4;
}
.service-btn.active { border-color: var(--amber); background: var(--warm-50); color: var(--amber-dk); }
.cart-total {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.cart-total-label  { font-weight: 600; color: var(--slate); font-size: 0.9rem; }
.cart-total-amount { font-size: 1.2rem; font-weight: 800; color: var(--charcoal); }
.btn-whatsapp {
  width: 100%; background: #25d366; color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 13px; font-size: 0.92rem;
  font-weight: 700; cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px; transition: background var(--transition);
}
.btn-whatsapp:hover { background: #1ebe5d; }

/* ── Footer ── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  padding: 0 16px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  font-family: var(--font-display); font-size: 1.2rem;
  color: var(--footer-head); margin-bottom: 8px;
}
.footer-logo i { color: var(--amber); margin-right: 6px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; margin-bottom: 14px; color: var(--footer-text); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1rem; transition: all var(--transition);
}
.footer-social a:hover { background: var(--amber); color: #fff; }
.footer-col h4 {
  color: var(--footer-head); font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li { font-size: 0.83rem; display: flex; align-items: flex-start; gap: 8px; color: var(--footer-text); }
.footer-col ul li i { color: var(--amber); width: 14px; margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 14px 16px;
  font-size: 0.78rem; color: rgba(255,255,255,0.3);
}

/* ── Empty state ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state i { font-size: 2.2rem; opacity: 0.2; display: block; margin-bottom: 12px; }
.empty-state h3 { font-size: 0.95rem; color: var(--slate); margin-bottom: 4px; }

/* ================================================================
   TABLET  ≥ 540px
   ================================================================ */
@media (min-width: 540px) {
  .site-header .container { padding: 0 20px; height: 60px; }
  .site-logo { font-size: 1.2rem; }
  .mode-indicator .mode-text { display: inline; }
  .cart-btn-text { display: inline; }

  /* Cards vuelven a verticales en tablet */
  .menu-card { flex-direction: column; min-height: unset; }
  .menu-card-img { width: 100%; height: 150px; }
  .menu-card-title { white-space: normal; }
  .menu-card-desc  { -webkit-line-clamp: 3; }

  .menu-grid { grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 20px; }
  .menu-section-title { padding: 0 20px; }
  .category-tabs { padding: 0 20px 12px; }
  .menu-search-wrap { margin: 0 20px 4px; }

  .hero { min-height: 340px; }
  .hero-content { padding: 48px 20px; }
  .hero p { font-size: 1rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; padding: 0 20px 32px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; padding: 14px 20px; }
}

/* ================================================================
   DESKTOP  ≥ 900px
   ================================================================ */
@media (min-width: 900px) {
  .site-header .container { height: 64px; padding: 0 20px; }
  .site-logo { font-size: 1.3rem; }
  .btn-admin-text { display: inline; }
  .header-actions { gap: 10px; }

  .hero { min-height: 420px; }
  .hero-content { padding: 64px 20px; }
  .hero p { font-size: 1.05rem; }

  .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; }
  .menu-section-title { padding: 0; }
  .category-tabs { padding: 0 0 12px; }
  .menu-search-wrap { margin: 0 0 4px; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 0 0 40px; }
  .footer-bottom { padding: 16px 0; }
}

@media (min-width: 1100px) {
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
}
