/* =========================================================================
   HOJA DE ESTILOS PRINCIPAL
   Sitio de catálogo · Artículos para el hogar
   Paleta: tinta + acero + cobre sobre crema
   ========================================================================= */

:root {
  /* Tema azul: azul profundo contra azul claro.
     Todos los valores salen de assets/js/config.js (window.CONFIG.color). */
  --tinta:    #1A2838;   /* azul profundo */
  --acero:    #5A7286;   /* azul medio   */
  --acero-2:  #8AA0B2;
  --cobre:    #AD6B37;   /* acento cálido */
  --cobre-2:  #8F5527;
  --crema:    #F2F7FB;   /* azul muy claro */
  --papel:    #E4EDF5;   /* azul claro */
  --blanco:   #FFFFFF;
  --linea:    #D3E0EA;
  --azul:     #2E5C8A;
  --azul-2:   #24507C;
  --azul-claro: #DEE9F2;
  --wa:       #25D366;
  --wa-dark:  #1EB855;
  --ok:       #2E7D5B;
  --warn:     #C9821B;
  --error:    #C0392B;

  --radio:    14px;
  --radio-s:  8px;
  --sombra:   0 1px 2px rgba(26,40,56,.06), 0 4px 16px rgba(26,40,56,.07);
  --sombra-h: 0 4px 8px rgba(26,40,56,.09), 0 14px 34px rgba(26,40,56,.14);

  --fuente: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --fuente-titulo: "Playfair Display", Georgia, "Times New Roman", serif;

  --max: 1200px;
  --header-h: 72px;
}

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--fuente);
  color: var(--tinta);
  background: var(--crema);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--fuente-titulo); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.centrado { text-align: center; }
.oculto { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- Tipografía */
.etiqueta {
  display: inline-block;
  font-family: var(--fuente);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cobre);
  margin-bottom: .75rem;
}
.subtitulo { color: var(--acero); font-size: 1.05rem; max-width: 60ch; margin-inline: auto; }

/* ------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--cobre); outline-offset: 2px; }
.btn-primario { background: var(--azul); color: var(--blanco); }
.btn-primario:hover { background: var(--azul-2); box-shadow: var(--sombra); }
.btn-cobre { background: var(--cobre); color: var(--blanco); }
.btn-cobre:hover { background: var(--cobre-2); box-shadow: var(--sombra); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); box-shadow: 0 8px 20px rgba(37,211,102,.32); }
.btn-linea { background: transparent; color: var(--tinta); border-color: var(--linea); }
.btn-linea:hover { border-color: var(--tinta); background: var(--blanco); }
.btn-bloque { width: 100%; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-icono {
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  background: var(--blanco); border: 1px solid var(--linea); color: var(--acero);
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icono:hover { color: var(--tinta); border-color: var(--tinta); }
.btn-icono.peligro:hover { color: var(--error); border-color: var(--error); background: #FDF3F2; }

/* ------------------------------------------------------------- Franja aviso */
.franja {
  background: var(--tinta); color: var(--azul-claro);
  font-size: .8rem; letter-spacing: .04em;
  padding: 8px 0; text-align: center;
}

/* ------------------------------------------------------------- Encabezado */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242,247,251,.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linea);
}
.header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; min-width: 0; }
.logo__img { height: 42px; width: auto; flex-shrink: 0; }
.logo__texto { min-width: 0; }
.logo__texto strong {
  display: block; font-family: var(--fuente-titulo);
  font-size: 1.25rem; line-height: 1.1; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.logo__texto span {
  display: block; font-size: .68rem; color: var(--acero);
  letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.75rem; }
.nav a {
  font-size: .92rem; font-weight: 500; color: var(--acero);
  position: relative; padding: .25rem 0;
}
/* Los enlaces-botón del menú mantienen su color propio (.nav a es más
   específico que .btn-wa, así que hay que restaurarlo explícitamente). */
.nav a.btn { color: var(--blanco); padding: .8rem 1.5rem; }
.nav a.btn-linea { color: var(--tinta); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0; background: var(--cobre);
  transition: width .2s ease;
}
.nav a:hover { color: var(--tinta); }
.nav a:hover::after { width: 100%; }
.nav__cta { display: flex; align-items: center; gap: .6rem; }
.menu-btn {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--linea); border-radius: var(--radio-s);
  width: 42px; height: 42px; font-size: 1.2rem; color: var(--tinta);
}

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--blanco); border-bottom: 1px solid var(--linea);
    padding: .5rem 20px 1.25rem; margin: 0;
    transform: translateY(-130%); transition: transform .28s ease;
    box-shadow: var(--sombra-h); max-height: 80vh; overflow-y: auto;
  }
  .nav.activo { transform: translateY(0); }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--papel); }
  .nav a::after { display: none; }
  .nav__cta { margin-top: 1rem; flex-direction: column; align-items: stretch; }
}

/* En pantallas angostas el descriptor se oculta para que el nombre
   no empuje el botón de menú fuera de la pantalla. */
@media (max-width: 620px) {
  :root { --header-h: 64px; }
  .logo__texto span { display: none; }
  .logo__texto strong { font-size: 1.1rem; }
  .logo__img { height: 34px; }
  .header__inner { gap: .75rem; }
}

/* ------------------------------------------------------------- Hero */
.hero {
  background:
    radial-gradient(1100px 520px at 88% -14%, rgba(46,92,138,.14), transparent 62%),
    radial-gradient(700px 400px at 6% 110%, rgba(173,107,55,.08), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, var(--crema) 55%, var(--azul-claro) 100%);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--linea);
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--cobre); }
.hero__texto { font-size: 1.08rem; color: var(--acero); max-width: 52ch; margin-bottom: 2rem; }
.hero__acciones { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__cifras {
  display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.5rem;
  padding-top: 1.75rem; border-top: 1px solid var(--linea);
}
.cifra strong { display: block; font-family: var(--fuente-titulo); font-size: 1.6rem; line-height: 1; }
.cifra span { font-size: .78rem; color: var(--acero); letter-spacing: .06em; text-transform: uppercase; }

.hero__arte {
  position: relative; aspect-ratio: 5/4; border-radius: 24px; overflow: hidden;
  background: linear-gradient(150deg, #F4F8FB, #DCE8F2);
  box-shadow: var(--sombra-h);
}
.hero__arte img { width: 100%; height: 100%; object-fit: cover; }
.hero__sello {
  position: absolute; left: -14px; bottom: -18px;
  background: var(--blanco); border-radius: var(--radio);
  padding: 1rem 1.25rem; box-shadow: var(--sombra-h); max-width: 240px;
}
.hero__sello strong { display: block; font-size: .9rem; margin-bottom: .15rem; }
.hero__sello span { font-size: .78rem; color: var(--acero); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__arte { aspect-ratio: 16/10; }
  .hero__sello { left: 12px; bottom: 12px; }
}

/* ------------------------------------------------------------- Materiales */
.materiales { padding: clamp(2rem, 5vw, 3rem) 0; background: var(--azul-claro); border-bottom: 1px solid var(--linea); }
.materiales__fila { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.material-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; border: 1px solid var(--linea); border-radius: 999px;
  font-size: .88rem; font-weight: 500; color: var(--acero);
  background: rgba(255,255,255,.72);
  transition: all .18s ease;
}
.material-chip:hover { border-color: var(--cobre); color: var(--tinta); transform: translateY(-2px); }

/* ------------------------------------------------------------- Secciones */
.seccion { padding: clamp(3rem, 7vw, 5rem) 0; }
.seccion--blanca { background: var(--blanco); }
.seccion__cabecera { text-align: center; margin-bottom: 2.5rem; }

/* ------------------------------------------------------------- Filtros */
.filtros {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  margin-bottom: 2rem; padding: 1rem;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
}
.filtros__buscador { position: relative; flex: 1 1 280px; }
.filtros__buscador input {
  width: 100%; padding: .75rem 1rem .75rem 2.6rem;
  border: 1px solid var(--linea); border-radius: 999px; font-size: .92rem;
  font-family: inherit; background: var(--azul-claro); color: var(--tinta);
}
.filtros__buscador input:focus { outline: 2px solid var(--cobre); outline-offset: -1px; background: var(--blanco); }
.filtros__buscador::before {
  content: "🔍"; position: absolute; left: .95rem; top: 50%;
  transform: translateY(-50%); font-size: .9rem; opacity: .6; pointer-events: none;
}
.filtros__select {
  padding: .75rem 1rem; border: 1px solid var(--linea); border-radius: 999px;
  font-size: .88rem; font-family: inherit; background: var(--azul-claro); color: var(--tinta);
  cursor: pointer;
}
.filtros__select:focus { outline: 2px solid var(--cobre); outline-offset: -1px; }
.filtros__conteo { margin-left: auto; font-size: .85rem; color: var(--acero); white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip {
  padding: .45rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 500;
  border: 1px solid var(--linea); background: var(--blanco); color: var(--acero);
  transition: all .16s ease; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
}
.chip:hover { border-color: var(--acero); color: var(--tinta); }
.chip.activo { background: var(--azul); border-color: var(--azul); color: var(--blanco); }

/* ------------------------------------------------------------- Grid de productos */
.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--radio); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sombra-h); border-color: #B9CFE2; }
.card__media { position: relative; aspect-ratio: 1/1; background: #FFFFFF; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__flags { position: absolute; top: .65rem; left: .65rem; display: flex; flex-direction: column; gap: .35rem; }
.flag {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .28rem .6rem; border-radius: 999px; color: var(--blanco); background: var(--cobre);
}
.flag--agotado { background: var(--acero); }
.card__cuerpo { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card__cat { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--acero-2); margin-bottom: .35rem; }
.card__nombre { font-size: 1.02rem; font-family: var(--fuente); font-weight: 600; margin: 0 0 .45rem; line-height: 1.35; }
.card__nombre a:hover { color: var(--cobre); }
.card__desc {
  font-size: .85rem; color: var(--acero); margin-bottom: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__precio { font-family: var(--fuente-titulo); font-size: 1.3rem; font-weight: 700; margin-top: auto; }
.card__precio small { font-family: var(--fuente); font-size: .8rem; font-weight: 400; color: var(--acero); }
.card__precio.sin-precio { font-family: var(--fuente); font-size: 1rem; font-weight: 600; color: var(--azul); }
.card__acciones { display: grid; gap: .5rem; margin-top: 1rem; }
.card__acciones .btn { width: 100%; }

/* ------------------------------------------------------------- Estado vacío */
.vacio {
  grid-column: 1 / -1; text-align: center; padding: 4rem 1rem; color: var(--acero);
  background: var(--blanco); border: 1px dashed var(--linea); border-radius: var(--radio);
}
.vacio strong { display: block; font-size: 1.1rem; color: var(--tinta); margin-bottom: .4rem; }

/* ------------------------------------------------------------- Paginación / ver más */
.mas-wrapper { text-align: center; margin-top: 2.5rem; }

/* ------------------------------------------------------------- Nosotros */
.nosotros__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.mision { background: var(--azul-claro); border-left: 3px solid var(--azul); border-radius: 0 var(--radio) var(--radio) 0; padding: 1.75rem; }
.mision p:last-child { margin-bottom: 0; }
.vision { background: linear-gradient(150deg, var(--azul-2), var(--tinta)); color: var(--blanco); border-radius: var(--radio); padding: 1.75rem; }
.vision .etiqueta { color: #E8B98A; }
.vision p:last-child { margin-bottom: 0; opacity: .92; }
@media (max-width: 800px) { .nosotros__grid { grid-template-columns: 1fr; } }

.valores { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.valor { background: var(--blanco); border: 1px solid var(--linea); border-top: 3px solid var(--azul-claro); border-radius: var(--radio); padding: 1.5rem; }
.valor__icono { font-size: 1.6rem; margin-bottom: .6rem; display: block; }
.valor h3 { font-family: var(--fuente); font-size: 1rem; font-weight: 700; margin-bottom: .35rem; }
.valor p { font-size: .88rem; color: var(--acero); margin: 0; }

/* ------------------------------------------------------------- Contacto */
.contacto { background: var(--azul-claro); border-top: 1px solid var(--linea); }
.contacto__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.info-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.info-item__icono {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; background: var(--blanco); color: var(--azul);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.info-item h3 { font-family: var(--fuente); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acero-2); margin: 0 0 .2rem; }
.info-item p { margin: 0; font-size: .98rem; }
.info-item a:hover { color: var(--cobre); }
.mapa { border-radius: var(--radio); overflow: hidden; border: 1px solid var(--linea); line-height: 0; }
.mapa iframe { width: 100%; height: 380px; border: 0; display: block; }
@media (max-width: 800px) { .contacto__grid { grid-template-columns: 1fr; } .mapa iframe { height: 300px; } }

/* ------------------------------------------------------------- Footer */
.footer { background: linear-gradient(180deg, var(--tinta), #101B27); color: rgba(255,255,255,.70); padding: 3rem 0 1.5rem; font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer h4 { color: var(--blanco); font-family: var(--fuente); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer a:hover { color: #9FC4E4; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5rem; }
.footer__marca {
  width: min(290px, 100%); height: auto;
  border-radius: 14px;
  background: #F2F7FB;
  padding: 13px 18px;
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem;
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ------------------------------------------------------------- Botón flotante WhatsApp */
.wa-flotante {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-flotante:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(37,211,102,.6); }
.wa-flotante svg { width: 30px; height: 30px; fill: currentColor; }
.wa-flotante::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa); animation: pulso 2.4s ease-out infinite;
}
@keyframes pulso { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }

/* ==========================================================================
   DETALLE DE PRODUCTO
   ========================================================================== */
.miga { font-size: .85rem; color: var(--acero); margin-bottom: 1.5rem; }
.miga a:hover { color: var(--cobre); }
.miga span { margin: 0 .5rem; opacity: .5; }

.detalle { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.detalle__galeria { position: sticky; top: calc(var(--header-h) + 20px); }
.detalle__principal {
  aspect-ratio: 1/1; border-radius: var(--radio); overflow: hidden;
  background: var(--papel); border: 1px solid var(--linea);
}
.detalle__principal img { width: 100%; height: 100%; object-fit: cover; }
.detalle__miniaturas { display: flex; gap: .6rem; margin-top: .75rem; flex-wrap: wrap; }
.miniatura {
  width: 72px; height: 72px; border-radius: var(--radio-s); overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: var(--papel); padding: 0;
}
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.miniatura.activa { border-color: var(--cobre); }

.detalle__cat { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cobre); font-weight: 700; }
.detalle__nombre { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .4rem 0 .75rem; }
.detalle__sku { font-size: .8rem; color: var(--acero-2); letter-spacing: .06em; margin-bottom: 1rem; }
.detalle__precio { font-family: var(--fuente-titulo); font-size: 2.2rem; font-weight: 700; margin: 1rem 0; }
.detalle__precio.sin-precio { font-family: var(--fuente); font-size: 1.2rem; color: var(--cobre); }
.detalle__desc { color: var(--acero); font-size: 1rem; margin-bottom: 1.5rem; }

.specs { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--linea); }
.specs li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--linea); font-size: .92rem;
}
.specs dt, .specs .k { color: var(--acero); }
.specs .v { font-weight: 500; text-align: right; }

.detalle__acciones { display: grid; gap: .65rem; margin-bottom: 1rem; }
.detalle__acciones .btn { padding: .95rem 1.5rem; font-size: 1rem; }
.nota-compra {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .84rem; color: var(--acero);
  background: var(--azul-claro); border-radius: var(--radio-s); padding: .85rem 1rem;
}
@media (max-width: 860px) { .detalle { grid-template-columns: 1fr; } .detalle__galeria { position: static; } }

.relacionados { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 2.5rem; border-top: 1px solid var(--linea); }

/* ==========================================================================
   PANEL ADMINISTRATIVO
   ========================================================================== */
body.admin { background: #F5F6F8; color: #1B2430; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.sidebar {
  background: #1B2430; color: rgba(255,255,255,.75);
  padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: .6rem; padding: 0 .5rem; }
.sidebar__brand strong { color: #fff; font-family: var(--fuente-titulo); font-size: 1.1rem; }
.sidebar__brand span { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; }
.sidebar nav button {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .7rem .85rem; border: none; border-radius: var(--radio-s);
  background: transparent; color: inherit; font-size: .9rem; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.sidebar nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav button.activo { background: var(--cobre); color: #fff; font-weight: 600; }
.sidebar__pie { margin-top: auto; font-size: .76rem; color: rgba(255,255,255,.45); line-height: 1.5; }
.sidebar__pie .btn {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.85);
}
.sidebar__pie .btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }

.admin-main { padding: 1.75rem 2rem 3rem; overflow-x: hidden; }
.admin-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
}
.admin-top h1 { font-family: var(--fuente); font-size: 1.5rem; font-weight: 700; margin: 0; }
.admin-top p { margin: .2rem 0 0; font-size: .88rem; color: #6B7684; }
.admin-top__acciones { display: flex; gap: .6rem; flex-wrap: wrap; }

.p-stat {
  background: #fff; border: 1px solid #E2E6EB; border-radius: var(--radio);
  padding: 1.1rem 1.25rem;
}
.p-stat strong { display: block; font-size: 1.8rem; font-family: var(--fuente-titulo); line-height: 1; }
.p-stat span { font-size: .78rem; color: #6B7684; letter-spacing: .04em; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }

.panel-card { background: #fff; border: 1px solid #E2E6EB; border-radius: var(--radio); overflow: hidden; }
.panel-card__cab {
  padding: 1rem 1.25rem; border-bottom: 1px solid #E9ECF0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.panel-card__cab h2 { font-family: var(--fuente); font-size: 1rem; font-weight: 700; margin: 0; }
.panel-card__body { padding: 1.25rem; }

.tabla-wrap { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.tabla th {
  text-align: left; padding: .7rem 1rem; background: #F7F8FA;
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: #6B7684; font-weight: 700; white-space: nowrap;
  border-bottom: 1px solid #E2E6EB; position: sticky; top: 0;
}
table.tabla td { padding: .7rem 1rem; border-bottom: 1px solid #F0F2F5; vertical-align: middle; }
table.tabla tr:hover td { background: #FAFBFC; }
.tabla__img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; background: #F0F2F5; flex-shrink: 0; }
.tabla__prod { display: flex; align-items: center; gap: .75rem; min-width: 240px; }
.tabla__prod strong { display: block; font-weight: 600; line-height: 1.3; }
.tabla__prod span { font-size: .76rem; color: #8A94A0; }
.tabla__acciones { display: flex; gap: .35rem; justify-content: flex-end; }

.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; padding: .22rem .55rem;
  border-radius: 999px; letter-spacing: .03em;
}
.badge--si { background: #E7F5EC; color: #1E7A47; }
.badge--no { background: #F0F2F5; color: #77808C; }
.badge--dest { background: #FBF0E3; color: #A55F22; }

/* Barra de herramientas */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.input, .textarea, .select {
  width: 100%; padding: .65rem .85rem;
  border: 1px solid #DDE2E8; border-radius: var(--radio-s);
  font-size: .9rem; font-family: inherit; background: #fff; color: #1B2430;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--cobre); box-shadow: 0 0 0 3px rgba(180,116,60,.12);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.toolbar .input, .toolbar .select { width: auto; flex: 1 1 200px; }
.campo { margin-bottom: 1.1rem; }
.campo label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .35rem; color: #3D4957; }
.campo .ayuda { font-size: .76rem; color: #8A94A0; margin-top: .3rem; }
.campo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--cobre); cursor: pointer; }
@media (max-width: 600px) { .campo-fila { grid-template-columns: 1fr; } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,20,26,.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 2rem 1rem; overflow-y: auto; backdrop-filter: blur(3px);
}
.modal {
  background: #fff; border-radius: var(--radio); width: 100%; max-width: 720px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: subir .2s ease;
}
.modal--chico { max-width: 440px; }
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.modal__cab {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid #E9ECF0;
  position: sticky; top: 0; background: #fff; border-radius: var(--radio) var(--radio) 0 0; z-index: 1;
}
.modal__cab h2 { font-family: var(--fuente); font-size: 1.05rem; font-weight: 700; margin: 0; }
.modal__body { padding: 1.5rem; }
.modal__pie {
  padding: 1rem 1.5rem; border-top: 1px solid #E9ECF0; display: flex;
  justify-content: flex-end; gap: .6rem; position: sticky; bottom: 0; background: #fff;
}
.x-btn { background: none; border: none; font-size: 1.5rem; line-height: 1; color: #8A94A0; padding: 0 .25rem; }
.x-btn:hover { color: var(--tinta); }

/* Zona de imagen */
.img-drop {
  border: 2px dashed #DDE2E8; border-radius: var(--radio); padding: 1.25rem;
  text-align: center; background: #FAFBFC; transition: all .18s ease;
}
.img-drop:hover, .img-drop.arrastrando { border-color: var(--cobre); background: #FDFAF7; }
.img-drop input[type=file] { display: none; }
.img-drop p { margin: 0 0 .5rem; font-size: .86rem; color: #6B7684; }
.img-previa {
  max-width: 100%; max-height: 220px; border-radius: var(--radio-s);
  border: 1px solid #E2E6EB; margin-bottom: .75rem; object-fit: contain; background: #fff;
}
.img-peso { font-size: .74rem; color: #8A94A0; }
.img-peso.alerta { color: var(--warn); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: #1B2430; }
.login-box { background: #fff; border-radius: 18px; padding: 2.25rem; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-box h1 { font-family: var(--fuente); font-size: 1.3rem; font-weight: 700; margin-bottom: .35rem; }
.login-box p { font-size: .88rem; color: #6B7684; margin-bottom: 1.5rem; }
.login-error { background: #FDF3F2; color: var(--error); border: 1px solid #F5D6D2; border-radius: var(--radio-s); padding: .6rem .85rem; font-size: .85rem; margin-bottom: 1rem; }

/* Avisos */
.aviso {
  padding: .8rem 1rem; border-radius: var(--radio-s); font-size: .88rem;
  margin-bottom: 1.25rem; border: 1px solid;
}
.aviso--ok { background: #E7F5EC; color: #1E7A47; border-color: #BFE3CE; }
.aviso--info { background: #EAF2FB; color: #1A5A96; border-color: #C3DAF2; }
.aviso--warn { background: #FDF6E8; color: #8A5E10; border-color: #F0DFB4; }
.aviso code { background: rgba(0,0,0,.06); padding: .1rem .35rem; border-radius: 4px; font-size: .84em; }

.pasos { counter-reset: paso; list-style: none; padding: 0; margin: 0; }
.pasos li {
  counter-increment: paso; position: relative; padding: 0 0 1.1rem 2.5rem;
  border-left: 2px solid #E2E6EB; margin-left: .9rem;
}
.pasos li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pasos li::before {
  content: counter(paso); position: absolute; left: -15px; top: -2px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--cobre); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700;
}
.pasos strong { display: block; font-size: .95rem; margin-bottom: .15rem; }
.pasos p { font-size: .87rem; color: #6B7684; margin: 0; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 1rem; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar nav button { padding: .5rem .7rem; font-size: .84rem; }
  .sidebar__pie { display: none; }
  .admin-main { padding: 1.25rem 1rem 2.5rem; }
}

/* Impresión */
@media print {
  .header, .footer, .wa-flotante, .filtros, .chips, .sidebar { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}

/* ==========================================================================
   BANNER PROMOCIONAL ANIMADO
   Diapositivas a pantalla completa que se desvanecen unas en otras.
   ========================================================================== */
.banner {
  position: relative;
  overflow: hidden;
  background: var(--azul);
  border-bottom: 1px solid var(--linea);
  isolation: isolate;
}
.banner__pista {
  position: relative;
  min-height: clamp(440px, 46vw, 580px);
}

.banner__slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 5rem);
  opacity: 0; visibility: hidden;
  transition: opacity 1.05s ease, visibility 1.05s;
  pointer-events: none;
}
.banner__slide.activa { opacity: 1; visibility: visible; pointer-events: auto; }

/* imagen de fondo a pantalla completa con desplazamiento lento (efecto Ken Burns) */
.banner__fondo {
  position: absolute; inset: -3%;
  background-size: cover; background-position: center bottom;
  transform: scale(1.02);
  transition: transform 9s linear;
  will-change: transform;
}
.banner__slide.activa .banner__fondo { transform: scale(1.11); }

/* velo para que el texto se lea siempre, sin importar la imagen */
.banner__velo {
  position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(242,247,251,.98) 0%, rgba(242,247,251,.94) 28%,
                    rgba(242,247,251,.72) 42%, rgba(242,247,251,.30) 55%,
                    rgba(242,247,251,.06) 68%, rgba(242,247,251,0) 80%),
    linear-gradient(0deg, rgba(26,40,56,.14) 0%, rgba(26,40,56,0) 40%);
}
.banner__slide.activa .banner__velo { animation: subeVel 9s linear; }
@keyframes subeVel { from { opacity: .96; } to { opacity: 1; } }

.banner__info { position: relative; z-index: 2; max-width: 620px; }
.banner__etiqueta {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 1rem; padding: .42rem 1rem; border-radius: 999px;
  background: var(--azul); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(46,92,138,.28);
}
.banner__etiqueta::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9FC4E4;
}
.banner__titulo {
  font-size: clamp(1.9rem, 4.4vw, 3.3rem);
  margin-bottom: .9rem; color: var(--tinta);
  text-wrap: balance;
}
.banner__texto {
  color: #40566B; font-size: clamp(.95rem, 1.3vw, 1.08rem);
  max-width: 50ch; margin-bottom: 1.75rem;
}
.banner__acciones { display: flex; flex-wrap: wrap; gap: .7rem; }

/* entrada escalonada del texto en cada diapositiva */
.banner__slide.activa .banner__etiqueta { animation: entra .7s .12s both; }
.banner__slide.activa .banner__titulo    { animation: entra .7s .22s both; }
.banner__slide.activa .banner__texto     { animation: entra .7s .34s both; }
.banner__slide.activa .banner__acciones  { animation: entra .7s .46s both; }
@keyframes entra { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* rótulo del producto en la esquina inferior derecha */
.banner__rotulo {
  position: absolute; right: clamp(1rem, 4vw, 4rem); bottom: clamp(2.2rem, 5vw, 3.4rem);
  z-index: 2; display: flex; align-items: center; gap: .8rem;
  background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border: 1px solid var(--linea); border-radius: 999px;
  padding: .55rem .55rem .55rem 1.1rem;
  box-shadow: var(--sombra-h);
}
.banner__rotulo b { font-size: .95rem; }
.banner__rotulo span { font-size: .74rem; color: var(--acero); display: block; letter-spacing: .04em; }
.banner__rotulo img { width: 46px; height: 46px; border-radius: 50%; background: #EAF1F7; }

/* flechas */
.banner__flecha {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 4; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 1px solid var(--linea);
  color: var(--azul); font-size: 1.6rem; line-height: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sombra); transition: all .2s ease;
}
.banner__flecha:hover { background: var(--azul); color: #fff; border-color: var(--azul); transform: translateY(-50%) scale(1.08); }
.banner__flecha--prev { left: clamp(.4rem, 1.6vw, 1.4rem); }
.banner__flecha--next { right: clamp(.4rem, 1.6vw, 1.4rem); }

/* indicadores con barra de progreso */
.banner__indicadores {
  position: absolute; left: 0; right: 0; bottom: 1.4rem;
  display: flex; justify-content: center; gap: .5rem; z-index: 4;
}
.banner__punto {
  position: relative; width: 34px; height: 5px; padding: 0;
  border: none; border-radius: 999px; overflow: hidden;
  background: rgba(26,40,56,.16);
  transition: background .25s ease, width .25s ease;
}
.banner__punto:hover { background: rgba(26,40,56,.32); }
.banner__punto.activo { background: rgba(46,92,138,.24); }
.banner__punto.activo::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: var(--azul); transform-origin: left;
  animation: progreso var(--banner-dur, 7s) linear forwards;
}
.banner.pausado .banner__punto.activo::after { animation-play-state: paused; }
@keyframes progreso { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 860px) {
  .banner__pista { min-height: 0; }
  .banner__slide {
    position: relative; inset: auto;
    display: none; flex-direction: column; align-items: flex-start;
    padding: 2.5rem 1.15rem 4rem; min-height: 480px;
  }
  .banner__slide.activa { display: flex; }
  .banner__fondo { inset: -4%; }
  .banner__velo {
    background: linear-gradient(180deg, rgba(242,247,251,.97) 0%, rgba(242,247,251,.90) 55%, rgba(242,247,251,.55) 100%);
  }
  .banner__info { max-width: 100%; }
  .banner__rotulo { right: 1rem; bottom: 2.6rem; padding: .45rem .45rem .45rem .9rem; }
  .banner__rotulo b { font-size: .85rem; }
  .banner__flecha { width: 38px; height: 38px; font-size: 1.25rem; }
  .banner__indicadores { bottom: 1rem; }
  .banner__titulo { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .banner__slide { transition: none; }
  .banner__fondo { transition: none; transform: none !important; }
  .banner__slide.activa .banner__velo { animation: none; }
  .banner__slide.activa .banner__etiqueta,
  .banner__slide.activa .banner__titulo,
  .banner__slide.activa .banner__texto,
  .banner__slide.activa .banner__acciones { animation: none; }
  .banner__punto.activo::after { animation: none; transform: scaleX(1); }
}

/* El logo real ya trae el nombre: en pantallas chicas se muestra solo el ícono. */
@media (max-width: 620px) {
  .logo__texto { display: none; }
  .logo__img { height: 42px; width: auto; }
}

/* crédito del desarrollador */
.credito {
  display: inline-flex; align-items: center; gap: .45rem;
  color: rgba(255,255,255,.5); font-size: .82rem;
}
.credito a {
  color: #9FC4E4; font-weight: 600; letter-spacing: .02em;
  border-bottom: 1px solid rgba(159,196,228,.35);
}
.credito a:hover { color: #fff; }

/* ==========================================================================
   PANEL ADMINISTRATIVO — identidad de ZayFex
   ========================================================================== */

/* El logo de ZayFex es blanco: vive FUERA del cuadro blanco, sobre el
   fondo oscuro de la pantalla de acceso. */
.login-wrap { flex-direction: column; gap: 1.5rem; }
.login-stack { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; width: 100%; max-width: 400px; }
.login-brand { text-align: center; }
.login-brand img { width: 260px; height: auto; display: inline-block; }
.login-sub {
  margin: -.6rem 0 1.5rem; font-size: .84rem; color: #6B7684;
  letter-spacing: .02em;
}
.login-box { width: 100%; padding-top: 2rem; }
.login-box h1 { margin-bottom: .2rem; }

/* La barra era flex: hay que forzar columna para que el título baje */
.sidebar__brand { display: block; text-align: left; }
.sidebar__marca {
  width: 100%; max-width: 176px; height: auto; display: block;
  margin-bottom: .8rem;
}
.sidebar__titulo {
  margin: 0; color: #fff; font-weight: 600; font-size: .92rem;
  letter-spacing: .01em; line-height: 1.25;
}
.sidebar__negocio {
  margin: .15rem 0 0; font-size: .68rem; letter-spacing: .13em;
  text-transform: uppercase; color: rgba(255,255,255,.42);
}
/* En pantallas chicas el logo se reduce para que no empuje el menú */
@media (max-width: 900px) {
  .sidebar__marca { width: 132px; margin-bottom: .5rem; }
  .sidebar__titulo { font-size: .82rem; }
}

.sidebar__nivel {
  margin: .7rem 0 0; font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase;
}
.sidebar__nivel span {
  display: inline-block; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(173,107,55,.22); color: #E0A972;
}

/* El formulario de cambio de clave necesita un poco de aire */
#form-clave { max-width: 520px; }

/* Aviso de "estás en la computadora" dentro del panel */
.modo-local {
  margin: 0 0 1.5rem;
  border-left: 4px solid var(--warn);
}

/* ==========================================================================
   CATEGORÍAS — selector con botón "Nueva" y pantalla de administración
   ========================================================================== */
.con-boton { display: flex; gap: .5rem; align-items: stretch; }
.con-boton .select { flex: 1; min-width: 0; }
.con-boton .btn { white-space: nowrap; }

.lista-cats { display: flex; flex-direction: column; gap: .6rem; }
.cat-fila {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem;
  border: 1px solid #E2E6EB; border-radius: var(--radio-s);
  background: #FCFDFE;
}
.cat-fila:hover { border-color: var(--azul); background: #F5F9FD; }
.cat-fila.cat-huerfana { border-color: var(--warn); background: #FDF9F0; }
.cat-emoji { font-size: 1.25rem; width: 28px; text-align: center; flex-shrink: 0; }
.cat-datos { flex: 1; min-width: 0; }
.cat-nombre { font-weight: 600; }
.cat-id {
  display: block; font-size: .74rem; color: #8A94A0;
  margin-top: .2rem; font-family: ui-monospace, Menlo, Consolas, monospace;
}
@media (max-width: 600px) {
  .con-boton { flex-direction: column; }
  .cat-fila { flex-wrap: wrap; }
  .cat-datos { flex-basis: 100%; order: -1; }
}
