/* ============================================================
   COLORES DINÁMICOS POR RESTAURANTE (desde app.js)
   ============================================================ */

:root {
  /* Valores por defecto (se reemplazan con JS según restaurante) */
  --ro-primary: #00c853;         /* color acento principal */
  --ro-secondary: #050508;       /* fondo general */
  --ro-card-bg: #111218;         /* fondo de tarjetas */
  --accent-color: #ff7a00;       /* acento secundario (naranja) */

  /* Colores estáticos */
  --text-main: #ffffff;
  --text-muted: #a4a7b5;
  --border-soft: #262938;
}

/* ============================================================
   GLOBAL
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fondo dinámico usando --ro-secondary */
  background: radial-gradient(
      circle at top,
      #171b2b 0%,
      var(--ro-secondary) 55%
    );
  color: var(--text-main);
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
  padding: 16px 14px 18px;
  border-radius: 18px;

  /* fondo dinámico */
  background: linear-gradient(135deg, var(--ro-card-bg), #0c0d14);
  border: 1px solid #292c3d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

  margin-top: 12px;
  margin-bottom: 18px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #ced4ff 40%, #6c63ff 100%);
  color: #111218;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
}

.header h1 {
  font-size: 20px;
  margin: 0 0 3px;
}

.tagline {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Badges */

.header-info {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;

  /* borde y fondo usando color dinámico */
  border: 1px solid var(--ro-primary);
  background: color-mix(in srgb, var(--ro-primary) 20%, transparent);
  color: color-mix(in srgb, var(--ro-primary) 80%, white);
}

.badge-light {
  border-color: #3a3d52;
  background: #191b2b;
  color: var(--text-muted);
}

/* ============================================================
   PORTADA (COVER DEL RESTAURANTE)
   ============================================================ */

.cover-wrapper {
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.cover-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* ============================================================
   MENÚ
   ============================================================ */

.menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tarjeta de categoría */
.category-card {
  background: var(--ro-card-bg);
  border-radius: 16px;
  padding: 12px 14px 8px;
  border: 1px solid var(--border-soft);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;

  /* ahora usa el color secundario dinámico */
  background: var(--accent-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color) 25%, transparent);
}

/* ============================================================
   ITEMS
   ============================================================ */

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  gap: 10px;
}

.item-main {
  max-width: 70%;
}

.item-name {
  font-size: 14px;
}

.item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-price {
  font-weight: 600;
  font-size: 14px;
}

.item-thumb-wrap {
  flex-shrink: 0;
}

.item-thumb {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   BOTÓN WHATSAPP
   ============================================================ */

.wa-button {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: min(520px, 100% - 24px);

  padding: 14px;
  border-radius: 999px;
  border: none;

  background: var(--ro-primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;

  box-shadow: 0 18px 35px color-mix(in srgb, var(--ro-primary) 45%, transparent);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wa-button::before {
  content: "💬";
  font-size: 18px;
}

.wa-button:active {
  transform: translateX(-50%) translateY(1px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 700px) {
  body {
    padding-top: 10px;
  }
}
