:root {
  --bg: #0b1020;
  --surface: #0f172a;
  --panel: #111827;
  --card: #1a2332;
  --accent: #0f766e;
  --accent-light: #14b8a6;
  --text: #e5e7eb;
  --text-dark: #1f2937;
  --muted: #9ca3af;
  --white: #ffffff;
  --border: #1f2937;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,16,32,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; }
.nav-logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: grid; place-items: center; font-weight: 800; color: #0b1020; font-size: 14px;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: .15s; }
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--accent); color: var(--white) !important;
  padding: 8px 18px; border-radius: 8px; font-weight: 600; transition: .2s;
}
.nav-cta:hover { background: var(--accent-light); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; }
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #0b1020 50%, #0d1525 100%);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(20,184,166,.12) 0%, transparent 55%),
              radial-gradient(ellipse at 20% 80%, rgba(15,118,110,.08) 0%, transparent 50%);
}
.hero-content {
  position: relative; max-width: 1140px; margin: 0 auto; padding: 80px 24px;
  text-align: center; width: 100%;
}
.hero-content h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.highlight { color: var(--accent-light); }
.hero-content p { font-size: 19px; color: var(--muted); max-width: 600px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.btn-primary, .btn-secondary {
  padding: 14px 32px; border-radius: 10px; font-weight: 700; font-size: 16px;
  text-decoration: none; transition: .2s; border: none; cursor: pointer; display: inline-block;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,184,166,.3); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent-light); color: var(--white); }

.hero-channels { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-channels > span { color: var(--muted); font-size: 14px; }
.channel-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; transition: .2s;
}
.channel-link.wa { background: rgba(34,197,94,.12); color: #22c55e; }
.channel-link.wa:hover { background: rgba(34,197,94,.2); }
.channel-link.tg { background: rgba(56,163,222,.12); color: #38a3de; }
.channel-link.tg:hover { background: rgba(56,163,222,.2); }
.channel-link.ig { background: rgba(236,72,153,.12); color: #ec4899; }
.channel-link.ig:hover { background: rgba(236,72,153,.2); }

/* ===== Section titles ===== */
.section-title { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); font-size: 16px; margin-bottom: 40px; }

/* ===== Features ===== */
.features { padding: 80px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; transition: .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; }

/* ===== Catalogo ===== */
.catalogo { padding: 80px 0; background: var(--surface); }
.catalogo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.catalogo-loading { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 40px; }
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: .2s;
}
.cat-card:hover { border-color: var(--accent-light); transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-card .cat-badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.cat-badge.auto { background: rgba(59,130,246,.12); color: var(--info, #3b82f6); }
.cat-badge.cam { background: rgba(245,158,11,.12); color: #f59e0b; }
.cat-card h3 { font-size: 22px; margin-bottom: 4px; }
.cat-card .cat-marca { color: var(--accent-light); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.cat-card .cat-specs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.cat-specs span { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.cat-card .cat-variantes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-variante {
  display: inline-block; font-size: 13px; padding: 6px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
}
.cat-variante strong { color: var(--accent-light); }
.cat-card .cat-uso { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ===== Chat section ===== */
.chat-section { padding: 80px 0; }
.chat-container {
  max-width: 560px; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; height: 600px;
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); background: #0b1220;
}
.chat-brand { display: flex; align-items: center; gap: 12px; }
.chat-brand strong { display: block; font-size: 16px; }
.chat-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4ade80; }
.chat-status .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 6px #4ade80; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.chat-restart {
  background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; transition: .15s;
}
.chat-restart:hover { color: var(--accent-light); transform: rotate(180deg); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: var(--radius); white-space: pre-wrap; line-height: 1.45; font-size: 15px; }
.msg.bot { background: var(--card); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.system { background: transparent; color: var(--muted); font-size: 12px; align-self: center; }
.typing { color: var(--muted); font-style: italic; }

.chat-buttons { padding: 6px 16px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chat-buttons button {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; transition: .15s;
}
.chat-buttons button:hover { border-color: var(--accent-light); color: #fff; }
.chat-buttons button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

.chat-composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-composer input {
  flex: 1; background: #0b1220; border: 1px solid var(--border);
  color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 15px; outline: none;
}
.chat-composer input:focus { border-color: var(--accent-light); }
.chat-composer button {
  background: var(--accent); color: #fff; border: none;
  padding: 12px 18px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: .2s;
}
.chat-composer button:disabled { opacity: .5; cursor: not-allowed; }
.chat-legal { font-size: 11px; color: var(--muted); text-align: center; padding: 8px; border-top: 1px solid var(--border); }

/* ===== Contacto ===== */
.contacto { padding: 80px 0; background: var(--surface); }
.contacto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.contacto-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.contacto-card h3 { font-size: 17px; margin-bottom: 8px; color: var(--accent-light); }
.contacto-card p { color: var(--muted); font-size: 15px; }
.contacto-card a { color: var(--accent-light); text-decoration: none; }
.contacto-card a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.footer { padding: 32px 0; border-top: 1px solid var(--border); text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 12px; font-weight: 700; font-size: 16px; }
.footer p { color: var(--muted); font-size: 14px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); display: none; padding: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; text-align: center; }
  .hero-content h1 { font-size: 34px; }
  .hero-content p { font-size: 16px; }
  .section-title { font-size: 26px; }
  .chat-container { height: 500px; }
}
