/* =============================================================
   BASE COMPARTIDA (tienda y panel)
   El color principal se toma de la Configuración del panel.
   ============================================================= */
:root {
  --primario: #1b2a5c;
  --primario-osc: color-mix(in srgb, var(--primario) 78%, #000);
  --primario-suave: color-mix(in srgb, var(--primario) 8%, #fff);
  --oferta: #d71920;
  --comprar: #15934a;
  --comprar-osc: #107a3c;
  --whatsapp: #25d366;
  --texto: #222222;
  --texto-2: #6b6b6b;
  --borde: #e2e2e2;
  --fondo: #ffffff;
  --suave: #f4f4f4;
  --radio: 4px;
  --sombra: 0 6px 24px rgba(0, 0, 0, .1);

  /* Nombres usados por el panel */
  --color-marca: var(--primario);
  --color-acento: var(--oferta);
  --color-suave: var(--suave);
  --color-borde: var(--borde);
  --color-texto: var(--texto);
  --color-texto-2: var(--texto-2);
  --color-ok: var(--comprar);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 14px;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.sin-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
.ico { width: 22px; height: 22px; flex: none; }

.contenedor { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Mostrar solo en celular / solo en computadora */
.solo-movil { display: none !important; }
@media (max-width: 820px) {
  .solo-compu { display: none !important; }
  .solo-movil { display: revert !important; }
  /* Campos de 16px: evita que el iPhone haga zoom al tocar un campo */
  input, select, textarea { font-size: 16px !important; }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--radio);
  background: var(--primario); color: #fff; border: 1px solid transparent;
  font-weight: 700; font-size: .9rem; text-decoration: none; text-transform: uppercase; letter-spacing: .02em;
  transition: background-color .15s, border-color .15s, color .15s;
}
.boton:hover { background: var(--primario-osc); }
.boton:disabled { opacity: .5; cursor: not-allowed; }
.boton .ico { width: 18px; height: 18px; }
.boton--comprar { background: var(--comprar); }
.boton--comprar:hover { background: var(--comprar-osc); }
.boton--borde { background: #fff; color: var(--texto); border-color: var(--borde); }
.boton--borde:hover { background: #fff; border-color: var(--texto); }
.boton--whatsapp { background: #fff; color: #128c4a; border-color: #128c4a; }
.boton--whatsapp:hover { background: #128c4a; color: #fff; }
.boton--bloque { width: 100%; }

/* ---------- Capas y cajones ---------- */
.capa {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .45);
  display: grid; place-items: center; padding: 16px;
  opacity: 0; transition: opacity .2s;
}
.capa--abierta { opacity: 1; }
.capa--lateral { place-items: stretch end; padding: 0; }
.capa--izquierda { place-items: stretch start; padding: 0; }
/* El panel ocupa exactamente el alto de la pantalla: el contenido se desplaza adentro y los botones quedan fijos abajo */
.capa--lateral, .capa--izquierda { grid-template-rows: minmax(0, 1fr); height: 100%; height: 100dvh; }
.capa--lateral > *, .capa--izquierda > * { min-height: 0; max-height: 100%; }
.cerrar {
  width: 36px; height: 36px; border-radius: var(--radio);
  display: grid; place-items: center; color: var(--texto-2); font-size: 1.5rem; line-height: 1;
}
.cerrar:hover { background: var(--suave); color: var(--texto); }

/* ---------- Aviso flotante ---------- */
.aviso {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: #222; color: #fff; padding: 12px 20px; border-radius: var(--radio);
  font-weight: 500; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.aviso--visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Chips (filtros del panel) ---------- */
.categorias { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip {
  padding: 7px 14px; border-radius: var(--radio); white-space: nowrap;
  border: 1px solid var(--borde); background: #fff; font-weight: 500; font-size: .85rem;
}
.chip:hover { border-color: var(--texto); }
.chip--activo { background: var(--primario); color: #fff; border-color: var(--primario); }

/* ---------- Buscador del panel ---------- */
.buscador { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 0 12px; }
.buscador svg { width: 18px; height: 18px; color: var(--texto-2); flex: none; }
.buscador input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; outline: none; }

/* ---------- Cargando / guardando ---------- */
.cargando { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 120px 16px; color: var(--texto-2); font-weight: 500; }
.cargando__rueda { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--borde); border-top-color: var(--primario); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
/* Barrita arriba mientras se guarda en Google */
html.guardando::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, transparent, var(--primario), transparent); background-size: 50% 100%;
  background-repeat: no-repeat; animation: barra-guardando 1s linear infinite;
}
@keyframes barra-guardando { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- Imagen de reemplazo ---------- */
.marcador { display: grid; place-items: center; width: 100%; height: 100%; background: var(--suave); color: #c4c4c4; }
.marcador .ico { width: 42%; height: 42%; stroke-width: 1; }
