/* ══ BTN-GROUP (botones agrupados) ══ */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  background: var(--s2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border);
}
.btn-group .g-btn {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  transition: background .15s, color .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.btn-group .g-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  border-radius: 8px;
}
.btn-group .g-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Grillas móvil / tablet
   ══════════════════════════════════════════════ */

/* ── Tablet (481-768px): 3 columnas en grillas principales ── */
@media (max-width: 768px) {
  /* Home grid */
  .home-cat-scroll {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
  }
  /* Portal Odín grid (negocios) */
  .odin-cards-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px;
  }
  /* Sidebar: cards más compactas */
  .hc-img-wrap { height: 100px }
  .home-card { border-radius: 12px }
}

/* ── Móvil (≤480px): 2 columnas en grillas principales ── */
@media (max-width: 480px) {
  /* Home grid */
  .home-cat-scroll {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    padding: .4rem 0 .6rem;
  }
  /* Portal Odín grid */
  .odin-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  /* Cards más compactas */
  .home-card { border-radius: 12px }
  .hc-img-wrap { height: 90px }
  .hc-body { padding: 6px 8px 8px }
  .hc-name { font-size: 12px; -webkit-line-clamp: 2 }
  .hc-price { font-size: 11.5px }
  .hc-add { width: 24px; height: 24px; top: 5px; right: 5px }

  /* Sidebar (panel derecho cuando abierto en móvil) */
  .menu-grid { grid-template-columns: 1fr 1fr; gap: 5px }
  .mc-img-wrap { height: 70px }

  /* Hero más compacto */
  .home-hero { padding: 1.2rem 1rem .7rem }
  .home-title { font-size: 19px }
  .home-sub { font-size: 12px; margin-bottom: .7rem }

  /* Section labels más finos */
  .home-section-label { padding: .45rem 0 .35rem; font-size: 12px }
  .home-grid { padding: 0 .6rem 1rem }
}

/* ── Móvil pequeño (≤360px): mantener 2 pero más ajustado ── */
@media (max-width: 360px) {
  .home-cat-scroll, .odin-cards-grid {
    gap: 6px;
  }
  .hc-img-wrap { height: 80px }
  .hc-name { font-size: 11.5px }
}

/* ══════════════════════════════════════════════
   MODAL DE PRODUCTO — adaptable al alto de pantalla (#6)
   Raiz del fix: scrollea TODO el cuerpo (no solo la descripcion),
   con dvh para contar la barra del navegador en movil. Footer fijo.
   ══════════════════════════════════════════════ */

/* El modal nunca excede la pantalla; columna flex con header(img)+body+footer */
.prod-overlay .prod-modal {
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}

/* La imagen no se encoge */
.prod-overlay .prod-img-wrap { flex-shrink: 0; }

/* EL CUERPO COMPLETO es lo que scrollea (cat, nombre, precio, bebidas, ingredientes) */
.prod-overlay .prod-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.prod-overlay .prod-body::-webkit-scrollbar { width: 4px }
.prod-overlay .prod-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px }

/* La descripcion ya NO recorta sola: fluye dentro del cuerpo scrolleable */
.prod-overlay .prod-desc { overflow: visible; max-height: none; }

/* Footer (cantidad + agregar) SIEMPRE visible, pegado abajo dentro del cuerpo */
.prod-overlay .prod-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 10px;
  background: var(--surface);
  position: sticky;
  bottom: 0;
}

/* ── LANDSCAPE BAJO (movil apaisado): imagen a la izquierda, texto a la derecha ── */
@media (orientation: landscape) and (max-height: 520px) {
  .prod-overlay .prod-modal {
    flex-direction: row;
    max-width: min(760px, 96vw);
    width: 96vw;
    max-height: 94vh;
    max-height: 94dvh;
    gap: 14px;
    padding: 14px;
  }
  /* Imagen: columna izquierda ~38%, alto completo del modal */
  .prod-overlay .prod-img-wrap {
    flex: 0 0 38%;
    max-width: 38%;
    height: auto;
    align-self: stretch;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; overflow: hidden;
  }
  .prod-overlay .prod-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
  }
  /* Cuerpo: columna derecha, scrollea completo (incluye footer sticky) */
  .prod-overlay .prod-body {
    flex: 1 1 auto;
    padding: 2px 2px 2px 0;
    min-width: 0;
  }
  .prod-overlay .prod-name { font-size: 17px; line-height: 1.2; }
  .prod-overlay .prod-close { top: 8px; right: 8px; z-index: 10; }
}

/* ══════════════════════════════════════════════
   BORDE BRILLANTE — categorías con productos en carrito
   Aplica a: .home-cat-row, .acc-section, botones del rail
   ══════════════════════════════════════════════ */

