/* Borde brillante animado para categorías con productos */
@keyframes catGlowPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px var(--red),
      0 0 8px 2px color-mix(in srgb, var(--red) 40%, transparent),
      0 0 16px 4px color-mix(in srgb, var(--red) 18%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 1.5px var(--red),
      0 0 14px 4px color-mix(in srgb, var(--red) 55%, transparent),
      0 0 24px 8px color-mix(in srgb, var(--red) 28%, transparent);
  }
}

/* Home — acordeón con productos seleccionados */
.home-cat-row.cat-active {
  position: relative;
  border-radius: 14px;
  padding: 4px 6px;
  margin: 6px -6px;
  animation: catGlowPulse 2.4s ease-in-out infinite;
  transition: box-shadow .4s ease;
}
.home-cat-row.cat-active .home-section-label {
  color: var(--red);
}

/* Sidebar — acordeón con productos */
.acc-section.cat-active {
  position: relative;
  border-radius: 10px;
  margin: 4px 6px;
  animation: catGlowPulse 2.4s ease-in-out infinite;
  transition: box-shadow .4s ease;
}
.acc-section.cat-active .acc-name {
  color: var(--red);
  font-weight: 700;
}

/* Rail — botón con productos seleccionados */
.rail-btn.rail-cat-active {
  position: relative;
  animation: catGlowPulse 2.4s ease-in-out infinite;
  background: color-mix(in srgb, var(--red) 12%, transparent) !important;
  border-radius: 10px;
  transition: box-shadow .4s ease, background .3s ease;
}

/* Apagar suave (cuando se quita el último producto) */
.home-cat-row, .acc-section, .rail-btn.rail-cat-btn {
  transition: box-shadow .4s ease;
}

/* Movimiento suave de subida — se aplica via JS pero base aquí */
.home-cat-row, .acc-section, .rail-btn.rail-cat-btn {
  will-change: transform;
}

/* ══════════════════════════════════════════════
   SCROLL FABS — botones flotantes arriba/abajo
   ══════════════════════════════════════════════ */
.scroll-fabs {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 6500;
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.scroll-fabs.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.scroll-fab {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--red) 18%, transparent);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 16px rgba(0,0,0,.12),
    0 2px 6px rgba(0,0,0,.06),
    0 0 0 0 color-mix(in srgb, var(--red) 30%, transparent);
  transition:
    transform .25s var(--spring),
    background .15s,
    box-shadow .25s ease,
    opacity .25s ease;
}
.scroll-fab svg {
  width: 20px;
  height: 20px;
}
.scroll-fab:hover {
  background: #fff;
  transform: translateY(-2px) scale(1.08);
  box-shadow:
    0 8px 24px rgba(0,0,0,.16),
    0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent);
}
.scroll-fab:active {
  transform: translateY(0) scale(.94);
}
.scroll-fab.hidden {
  opacity: 0;
  transform: scale(.5);
  pointer-events: none;
  width: 0;
  margin: 0;
  padding: 0;
  border-width: 0;
  overflow: hidden;
}

/* En móvil — más compacto */
@media (max-width: 480px) {
  .scroll-fabs {
    bottom: 16px;
    gap: 8px;
  }
  .scroll-fab {
    width: 38px;
    height: 38px;
  }
  .scroll-fab svg {
    width: 18px;
    height: 18px;
  }
}

/* ══════════════════════════════════════════════
   FIX: scroll rápido en móvil mostraba blanco entre frames.
   Aplica solo cuando hay un negocio activo (body.modo-negocio).
   El portal Odín mantiene su fondo claro.
   ══════════════════════════════════════════════ */

/* HTML+Body con fondo oscuro inmediato (el script inline ya lo aplicó como inline-style, esto es respaldo) */
html.modo-negocio,
body.modo-negocio {
  background-color: #141414;
}

/* Carta y home-screen TRANSPARENTES para que se vea el color del body */
body.modo-negocio .carta-main {
  background-color: transparent !important;
}
body.modo-negocio .home-screen {
  background-color: transparent;
}

/* ══════════════════════════════════════════════
   CHIPS CARRUSEL — categorías del home con flechas + badges
   Usa el mismo .btn-group del portal Odín, solo añade:
   carrusel scrolleable, flechas, badge y glow al activo
   ══════════════════════════════════════════════ */
.chip-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  width: 100%;
  max-width: 100%;
}

.chip-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all .2s var(--spring);
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.chip-arrow svg { width: 14px; height: 14px }
.chip-arrow:hover {
  background: var(--s2);
  color: var(--red);
  border-color: var(--red);
  transform: scale(1.06);
}
.chip-arrow:active { transform: scale(.92) }
.chip-arrow.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(.4);
  width: 0;
  margin: 0;
  border-width: 0;
  overflow: hidden;
}

.chip-track {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  min-width: 0;
  padding: 0;
}
.chip-track::-webkit-scrollbar { display: none }

