/* ============================================================
   TWISTER SOUND — Hoja de estilos (PHP)
   Paleta de marca: navy #061224→#1a4480 · teal #0d9488/#14b8a6 · WhatsApp #25d366
   Tipografías: Montserrat (títulos) + Inter (texto)
   ============================================================ */

:root {
  --navy-950: #061224; --navy-900: #081a33; --navy-800: #0b2447;
  --navy-700: #123361; --navy-600: #1a4480;
  --navy-100: #dbe4f0; --navy-50: #eef2f8;
  --teal-600: #0d9488; --teal-500: #14b8a6; --teal-50: #e6fffa;
  --wa-500: #25d366; --wa-600: #1eb857;
  --bg: #ffffff; --fg: #0f172a;
  --muted: #f1f5f9; --muted-fg: #64748b;
  --border: #e2e8f0; --input: #cbd5e1;
  --danger: #dc2626; --warn: #d97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(6,18,36,.08), 0 8px 24px -12px rgba(6,18,36,.18);
  --font-titulos: "Montserrat", system-ui, sans-serif;
  --font-texto: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-texto); color: var(--fg); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .titulo { font-family: var(--font-titulos); letter-spacing: -0.02em; color: var(--navy-800); }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.oculto { display: none !important; }

/* ============================ BOTONES ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-texto); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; text-decoration: none !important;
  line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-teal { background: var(--teal-600); color: #fff; }
.btn-teal:hover { background: var(--teal-500); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-wa { background: var(--wa-500); color: #fff; }
.btn-wa:hover { background: var(--wa-600); }
.btn-outline { background: #fff; color: var(--navy-800); border-color: var(--border); }
.btn-outline:hover { border-color: var(--navy-800); background: var(--navy-50); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }

/* ============================ ENCABEZADO ============================ */
.topbar { background: var(--teal-600); color: #fff; font-size: 13.5px; text-align: center; padding: 7px 14px; }
.topbar b { font-weight: 700; }
.header {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,.07);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.header .logo { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.header .logo img { height: 42px; width: auto; }
.header .logo b { color: #fff; font-family: var(--font-titulos); font-size: 17px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #c7d4e8; font-weight: 500; font-size: 14.5px; padding: 9px 13px;
  border-radius: 8px; text-decoration: none !important;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a.activo { color: #fff; background: rgba(255,255,255,.12); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: #fff; }
@media (max-width: 880px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy-900); flex-direction: column; align-items: stretch;
    padding: 12px 16px 18px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav.abierto { display: flex; }
  .nav .btn { margin: 8px 0 0; }
  .nav-toggle { display: block; }
}

/* ============================ HERO ============================ */
.hero { position: relative; overflow: hidden; background: var(--navy-950); color: #fff; }
.hero-fondo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center right;
  opacity: .45;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--navy-950) 8%, rgba(6,18,36,.85) 45%, rgba(6,18,36,.25) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 84px 20px 96px; max-width: 640px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(20,184,166,.15); color: #5eead4; border: 1px solid rgba(20,184,166,.35);
  font-size: 13.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 50px); line-height: 1.12; margin-bottom: 18px; }
.hero h1 span { color: #2dd4bf; }
.hero p { color: #cbd8ea; font-size: 17px; max-width: 540px; margin-bottom: 30px; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-outline { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.hero .btn-outline:hover { background: rgba(255,255,255,.16); }

/* ============================ SECCIONES ============================ */
.seccion { padding: 68px 0; }
.seccion-alt { background: var(--navy-50); }
.seccion-cab { max-width: 680px; margin-bottom: 36px; }
.seccion-cab .etiqueta {
  color: var(--teal-600); font-weight: 700; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 8px;
}
.seccion-cab h2 { font-size: clamp(24px, 3.2vw, 34px); }
.seccion-cab p { color: var(--muted-fg); margin-top: 10px; }
.seccion-centro { text-align: center; margin-inline: auto; }

/* ============================ GRILLAS Y TARJETAS ============================ */
.grid-categorias { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  transition: all .18s ease; box-shadow: var(--shadow); text-decoration: none !important; color: inherit;
}
.cat-card:hover { border-color: var(--teal-500); transform: translateY(-2px); }
.cat-icono {
  width: 46px; height: 46px; border-radius: 12px; background: var(--teal-50);
  display: flex; align-items: center; justify-content: center; color: var(--teal-600);
}
.cat-icono svg { width: 24px; height: 24px; }
.cat-card b { font-family: var(--font-titulos); color: var(--navy-800); font-size: 15.5px; }
.cat-card span { color: var(--muted-fg); font-size: 13px; }

.grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.prod-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: all .18s ease;
  box-shadow: var(--shadow); position: relative; text-decoration: none !important; color: inherit;
}
.prod-card:hover { border-color: var(--teal-500); transform: translateY(-3px); }
.prod-foto { position: relative; aspect-ratio: 4 / 3; background: var(--navy-50); overflow: hidden; }
.prod-foto img { width: 100%; height: 100%; object-fit: cover; }
.prod-destacado {
  position: absolute; top: 10px; left: 10px; background: #f59e0b; color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  display: inline-flex; gap: 5px; align-items: center;
}
.prod-cuerpo { padding: 15px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-cat { color: var(--teal-600); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.prod-nombre { font-family: var(--font-titulos); font-weight: 700; color: var(--navy-800); font-size: 15.5px; line-height: 1.35; }
.prod-precios { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.prod-precio { font-family: var(--font-titulos); font-weight: 800; color: var(--navy-800); font-size: 19px; }
.prod-precio-consultar { color: var(--muted-fg); font-weight: 700; font-size: 16px; }
.prod-promo { color: var(--muted-fg); text-decoration: line-through; font-size: 13.5px; }
.prod-boton { margin-top: 10px; }
.prod-oferta {
  position: absolute; top: 10px; right: 10px; background: var(--danger); color: #fff;
  font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
}
.prod-agotado { opacity: .6; }

/* ============================ PROMOS / SERVICIOS / NOSOTROS ============================ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-cuerpo { padding: 20px; }
.card-cuerpo h3 { font-size: 17px; margin-bottom: 8px; }
.card-cuerpo p { color: var(--muted-fg); font-size: 14.5px; }
.lista-check { list-style: none; margin-top: 12px; display: grid; gap: 7px; }
.lista-check li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--fg); }
.lista-check svg { width: 16px; height: 16px; color: var(--teal-600); flex: none; margin-top: 3px; }
.precio-promo-caja { display: flex; align-items: baseline; gap: 12px; margin: 12px 0; }
.precio-promo-caja del { color: var(--muted-fg); }
.precio-promo-caja b { font-family: var(--font-titulos); font-size: 24px; color: var(--teal-600); }

.sobre { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.sobre img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }
.sobre h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.sobre p { color: var(--muted-fg); margin-bottom: 14px; }
@media (max-width: 800px) { .sobre { grid-template-columns: 1fr; } }

/* ============================ DETALLE DE PRODUCTO ============================ */
.miga { font-size: 13.5px; color: var(--muted-fg); margin: 18px 0 22px; }
.miga a { color: var(--muted-fg); }
.detalle { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .detalle { grid-template-columns: 1fr; } }
.galeria-principal {
  border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden;
  background: var(--navy-50); aspect-ratio: 4/3;
}
.galeria-principal img { width: 100%; height: 100%; object-fit: cover; }
.galeria-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.galeria-thumbs img {
  width: 76px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--border); transition: border-color .15s;
}
.galeria-thumbs img.activa, .galeria-thumbs img:hover { border-color: var(--teal-500); }
.detalle-info h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 6px; }
.detalle-meta { color: var(--muted-fg); font-size: 14px; margin-bottom: 16px; }
.detalle-meta b { color: var(--teal-600); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-ok { background: #d1fae5; color: #065f46; }
.detalle-precio { margin: 18px 0; }
.detalle-precio .grande { font-family: var(--font-titulos); font-weight: 800; font-size: 32px; color: var(--navy-800); }
.detalle-precio .promo { font-size: 20px; color: var(--teal-600); font-weight: 800; font-family: var(--font-titulos); }
.detalle-precio del { color: var(--muted-fg); margin-right: 10px; }
.detalle-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.detalle-descripcion { color: var(--muted-fg); margin-top: 8px; white-space: pre-line; }

/* ============================ CONTACTO ============================ */
.contacto-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; }
@media (max-width: 880px) { .contacto-grid { grid-template-columns: 1fr; } }
.dato-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.dato-item:last-child { border-bottom: 0; }
.dato-icono {
  width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--teal-50);
  color: var(--teal-600); display: flex; align-items: center; justify-content: center;
}
.dato-icono svg { width: 20px; height: 20px; }
.dato-item b { display: block; font-size: 14.5px; color: var(--navy-800); }
.dato-item span, .dato-item a { font-size: 14px; color: var(--muted-fg); }
.mapa { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 24px; }
.mapa iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ============================ FORMULARIOS ============================ */
.form-caja { display: grid; gap: 16px; }
.form-fila { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-fila { grid-template-columns: 1fr; } }
.campo label { display: block; font-weight: 600; font-size: 13.5px; color: var(--navy-800); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; font-family: var(--font-texto); font-size: 14.5px; color: var(--fg);
  border: 1px solid var(--input); border-radius: 9px; padding: 10px 13px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.campo textarea { min-height: 110px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,184,166,.15);
}
.campo small { color: var(--muted-fg); display: block; margin-top: 4px; font-size: 12.5px; }
.campo-chico label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.campo-chico input[type=checkbox], .campo-chico input[type=radio] { width: 16px; height: 16px; accent-color: var(--teal-600); }
.alert-ok, .alert-error {
  padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; border: 1px solid;
}
.alert-ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ============================ PIE ============================ */
.footer { background: var(--navy-950); color: #9fb1c9; margin-top: 70px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px;
  padding: 54px 20px 34px; max-width: 1120px; margin: 0 auto;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer img { height: 44px; margin-bottom: 14px; }
.footer h4 { color: #fff; font-family: var(--font-titulos); font-size: 15px; margin-bottom: 14px; }
.footer a { color: #9fb1c9; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; display: grid; gap: 9px; font-size: 14px; }
.footer-item { display: flex; gap: 10px; font-size: 14px; }
.footer-item svg { width: 16px; height: 16px; margin-top: 3px; flex: none; color: var(--teal-500); }
.footer-bajo { border-top: 1px solid rgba(255,255,255,.08); text-align: center; font-size: 13px; padding: 18px; }

/* ============================ WHATSAPP FLOTANTE ============================ */
.wa-flotante {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa-500);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .15s ease;
}
.wa-flotante:hover { transform: scale(1.08); }
.wa-flotante svg { width: 30px; height: 30px; fill: #fff; }

/* ============================ CATÁLOGO: FILTROS ============================ */
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--navy-800);
  font-size: 13.5px; font-weight: 600; padding: 7px 15px; border-radius: 999px; cursor: pointer;
  text-decoration: none !important; transition: all .15s;
}
.chip:hover { border-color: var(--teal-500); color: var(--teal-600); }
.chip.activa { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.buscador { display: flex; gap: 8px; margin-left: auto; }
.buscador input {
  border: 1px solid var(--input); border-radius: 9px; padding: 9px 13px; font-size: 14px;
  min-width: 220px; font-family: var(--font-texto);
}
.buscador input:focus { outline: none; border-color: var(--teal-500); }
.sin-resultados { text-align: center; color: var(--muted-fg); padding: 48px 0; }

/* ============================ PANEL DE ADMINISTRACIÓN ============================ */
.admin { display: grid; grid-template-columns: 246px 1fr; min-height: 100vh; background: var(--navy-50); }
@media (max-width: 880px) { .admin { grid-template-columns: 1fr; } .admin-lado { position: static !important; } }
.admin-lado {
  background: var(--navy-950); color: #c7d4e8; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.admin-lado .marca { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; padding: 0 8px; }
.admin-lado .marca img { height: 38px; }
.admin-lado .marca b { color: #fff; font-family: var(--font-titulos); font-size: 15px; }
.admin-menu { display: grid; gap: 3px; }
.admin-menu a {
  display: flex; align-items: center; gap: 11px; color: #b6c5dc; font-size: 14px; font-weight: 500;
  padding: 10px 12px; border-radius: 9px; text-decoration: none !important;
}
.admin-menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-menu a.activo { background: var(--teal-600); color: #fff; }
.admin-menu svg { width: 18px; height: 18px; flex: none; }
.admin-menu .separador { border-top: 1px solid rgba(255,255,255,.08); margin: 10px 0; }
.admin-menu .salir { color: #fca5a5; }
.admin-contenido { padding: 28px 30px 60px; min-width: 0; }
@media (max-width: 640px) { .admin-contenido { padding: 20px 14px 60px; } }
.admin-cab { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 22px; }
.admin-cab h1 { font-size: 23px; }
.admin-cab p { color: var(--muted-fg); font-size: 14px; }
.admin-cab .acciones { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px;
}
.panel h2 { font-size: 16.5px; margin-bottom: 14px; }
.panel h2 small { color: var(--muted-fg); font-weight: 500; }

.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-fg); padding: 10px 12px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.tabla td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr:hover td { background: var(--navy-50); }
.tabla .thumb { width: 52px; height: 42px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.tabla-acciones { display: flex; gap: 6px; }
.estado { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.estado-verde { background: #d1fae5; color: #065f46; }
.estado-gris { background: var(--muted); color: var(--muted-fg); }
.estado-amarillo { background: #fef3c7; color: #92400e; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.stat b { font-family: var(--font-titulos); font-size: 26px; color: var(--navy-800); display: block; }
.stat span { color: var(--muted-fg); font-size: 13px; }
.stat.teal b { color: var(--teal-600); }

.login-pantalla {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); padding: 20px;
}
.login-caja {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 34px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.login-caja img { height: 52px; margin: 0 auto 8px; }
.login-caja .bienvenida { text-align: center; color: var(--muted-fg); font-size: 14px; margin-bottom: 22px; }

.mini { color: var(--muted-fg); font-size: 12.5px; }
.preview-img { max-width: 120px; max-height: 90px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }
.fila-imagenes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acciones-chicas { display: flex; gap: 6px; flex-wrap: wrap; }

/* Resultado de importación */
.reporte-import { background: var(--muted); border-radius: 10px; padding: 14px 16px; font-size: 13.5px; margin-top: 14px; }
.reporte-import b { color: var(--teal-600); }
.reporte-import .errores { color: var(--danger); margin-top: 8px; }

pre.codigo-script {
  background: var(--navy-950); color: #dbe4f0; font-size: 12px; line-height: 1.55;
  padding: 16px; border-radius: 10px; overflow: auto; max-height: 320px; font-family: ui-monospace, monospace;
}
.pasos { padding-left: 20px; display: grid; gap: 12px; font-size: 14.5px; }
.pasos b { color: var(--navy-800); }

@media print { .admin-lado, .wa-flotante, .header { display: none; } }
