/* ============================================================
   MueveteSport — Catálogo
   Paleta: morado profundo + neón magenta + dorado (logo MS)
   ============================================================ */

:root {
  --bg-dark: #12061f;
  --bg-dark-2: #1c0a30;
  --surface: #ffffff;
  --surface-alt: #f7f4fb;
  --ink: #221238;
  --muted: #6f6584;
  --line: #e9e2f2;

  --purple: #7a2fd0;
  --purple-deep: #4c1a86;
  --magenta: #e02ec4;
  --gold: #e5b53c;
  --wsp: #25d366;
  --wsp-dark: #1cae53;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(34, 18, 56, .10);
  --shadow-lg: 0 18px 50px rgba(34, 18, 56, .18);

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--purple); text-decoration: none; }

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

section { scroll-margin-top: 84px; }

/* ============ Botones ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font: 600 1rem/1 var(--font);
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(120deg, var(--purple) 10%, var(--magenta) 90%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(122, 47, 208, .35);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(224, 46, 196, .40); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-wsp {
  background: var(--wsp);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .30);
}
.btn-wsp:hover { background: var(--wsp-dark); transform: translateY(-2px); }

.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-buy { width: 100%; margin-top: auto; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 6, 31, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .65rem 0;
}

.brand { display: flex; align-items: center; gap: .65rem; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(224, 46, 196, .45);
}

.brand-name {
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  font-size: 1.05rem;
}
.brand-name em {
  font-style: normal;
  background: linear-gradient(120deg, var(--gold), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.site-nav a {
  color: rgba(255, 255, 255, .78);
  font-weight: 500;
  font-size: .95rem;
  transition: color .15s;
}
.site-nav a:hover { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: .4rem;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(224, 46, 196, .18), transparent 60%),
    radial-gradient(500px 380px at 10% 85%, rgba(122, 47, 208, .25), transparent 60%),
    linear-gradient(160deg, var(--bg-dark) 30%, var(--bg-dark-2));
  color: #fff;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 2.5rem;
  padding: 4.5rem 0 5rem;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(229, 181, 60, .35);
  border-radius: 999px;
  padding: .35rem .9rem;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.01em;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--gold) 0%, var(--magenta) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin-top: 1.1rem;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, .72);
  max-width: 46ch;
  font-weight: 300;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }

.ig-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1.6rem;
  color: rgba(255, 255, 255, .65);
  font-size: .92rem;
  font-weight: 500;
  transition: color .15s;
}
.ig-chip:hover { color: var(--magenta); }

.hero-media { position: relative; }
.hero-media img {
  width: min(380px, 100%);
  margin-inline: auto;
  border-radius: 28px;
  box-shadow: 0 0 60px rgba(224, 46, 196, .35), 0 30px 60px rgba(0, 0, 0, .45);
}

/* ============ Secciones ============ */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface-alt); }

.section-head { text-align: center; margin-bottom: 2.8rem; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.01em;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  margin: .7rem auto 0;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
}
.section-head p { color: var(--muted); margin-top: .8rem; }

/* ============ Catálogo / Cards ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.6rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card-media { position: relative; }

.card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  background: var(--surface-alt);
}

.thumbs {
  position: absolute;
  left: .6rem;
  bottom: .6rem;
  display: flex;
  gap: .4rem;
}

.thumb {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  transition: transform .15s, border-color .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.thumb:hover { transform: translateY(-3px); }
.thumb.is-active { border-color: var(--magenta); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.15rem 1.15rem 1.3rem;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
}

.card-top h3 { font-size: 1.15rem; font-weight: 700; }

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple-deep);
  white-space: nowrap;
}
.price span { font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: .15rem; }

.desc { font-size: .92rem; color: var(--muted); }

.badges { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.badges li {
  font-size: .74rem;
  font-weight: 600;
  color: var(--purple-deep);
  background: rgba(122, 47, 208, .08);
  border: 1px solid rgba(122, 47, 208, .15);
  padding: .28rem .65rem;
  border-radius: 999px;
}

.grid-note {
  text-align: center;
  margin-top: 2.2rem;
  color: var(--muted);
}
.grid-note a { font-weight: 600; }

/* ============ Cómo comprar ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(120deg, var(--purple), var(--magenta));
  margin-bottom: .9rem;
}

.step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.step p { font-size: .93rem; color: var(--muted); }

.apartado-note {
  margin-top: 1.6rem;
  text-align: center;
  background: linear-gradient(120deg, rgba(122, 47, 208, .08), rgba(224, 46, 196, .08));
  border: 1px dashed rgba(122, 47, 208, .35);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  color: var(--ink);
}

/* ============ Ubicación ============ */
.map-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  display: block;
}

.map-info {
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  justify-content: center;
}

.map-info h3 { font-size: 1.3rem; font-weight: 700; }
.map-info > p { color: var(--muted); margin-bottom: .6rem; }

.map-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.btn-waze {
  background: #31c8f0;
  color: #06303c;
  box-shadow: 0 8px 20px rgba(49, 200, 240, .35);
}
.btn-waze:hover { background: #17b6e0; transform: translateY(-2px); }

.map-alt {
  margin-top: .6rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
}
.map-alt:hover { color: var(--purple); }

/* ============ Footer ============ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, .75);
  padding: 3rem 0 1.2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand { display: flex; gap: .8rem; align-items: center; }
.footer-tag { font-size: .88rem; color: rgba(255, 255, 255, .5); }

.footer-links, .footer-contact { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a, .footer-contact a {
  color: rgba(255, 255, 255, .75);
  font-size: .95rem;
}
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-contact p { font-size: .95rem; }

.copyright {
  text-align: center;
  font-size: .82rem;
  color: rgba(255, 255, 255, .4);
  padding-top: 1.2rem;
}

/* ============ WhatsApp flotante ============ */
.fab-wsp {
  position: fixed;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wsp);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
  transition: transform .15s;
}
.fab-wsp:hover { transform: scale(1.08); }
.fab-wsp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--wsp);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ============ Chatbot ============ */
.chat-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 70;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  box-shadow: 0 10px 26px rgba(122, 47, 208, .5);
  transition: transform .15s;
}
.chat-toggle:hover { transform: scale(1.08); }

.chat-toggle .icon-close { display: none; }
.chat-toggle[aria-expanded="true"] .icon-open { display: none; }
.chat-toggle[aria-expanded="true"] .icon-close { display: block; }

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: .72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border: 2px solid #fff;
}
.chat-badge.is-hidden { display: none; }

.chat-panel {
  position: fixed;
  right: 1.1rem;
  bottom: 5.6rem;
  z-index: 70;
  width: min(380px, calc(100vw - 2.2rem));
  height: min(540px, calc(100dvh - 8rem));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(18, 6, 31, .45);
  border: 1px solid var(--line);
}
.chat-panel[hidden] { display: none; }

.chat-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  background: linear-gradient(120deg, var(--bg-dark), var(--purple-deep));
  color: #fff;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(224, 46, 196, .55);
}

.chat-title { font-weight: 700; font-size: .98rem; line-height: 1.2; }

.chat-status {
  font-size: .78rem;
  color: rgba(255, 255, 255, .65);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.chat-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  display: inline-block;
}

.chat-close {
  margin-left: auto;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s;
}
.chat-close:hover { background: rgba(255, 255, 255, .25); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: var(--surface-alt);
}

.msg {
  max-width: 85%;
  padding: .65rem .9rem;
  border-radius: 16px;
  font-size: .92rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(34, 18, 56, .06);
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(120deg, var(--purple), var(--magenta));
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg.bot a { font-weight: 600; }
.msg.bot ul { padding-left: 1.1rem; margin: .3rem 0; }
.msg.bot .msg-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
  background: var(--wsp);
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  padding: .45rem .9rem;
  border-radius: 999px;
}
.msg.bot .msg-cta:hover { background: var(--wsp-dark); }
.msg.bot .msg-cta.alt { background: linear-gradient(120deg, var(--purple), var(--magenta)); }
.msg.bot .msg-cta.waze { background: #31c8f0; color: #06303c; }
.msg.bot .msg-cta.waze:hover { background: #17b6e0; }

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: .8rem 1rem;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite both;
}
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.chat-chips {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .6rem .9rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.chip {
  border: 1px solid rgba(122, 47, 208, .35);
  color: var(--purple-deep);
  background: rgba(122, 47, 208, .06);
  font: 600 .8rem var(--font);
  padding: .4rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.chip:hover {
  background: linear-gradient(120deg, var(--purple), var(--magenta));
  color: #fff;
  border-color: transparent;
}

.chat-form {
  display: flex;
  gap: .5rem;
  padding: .7rem .9rem .9rem;
  background: var(--surface);
}

.chat-form input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: .6rem 1rem;
  font: 400 .95rem var(--font);
  outline: none;
  transition: border-color .15s;
}
.chat-form input:focus { border-color: var(--purple); }

.chat-form button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  transition: transform .15s;
}
.chat-form button:hover { transform: scale(1.06); }

/* ============ Animaciones de entrada ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fab-wsp::after { animation: none; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 3.2rem 0 3.6rem; }
  .hero .lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-media { order: -1; }
  .hero-media img { width: min(230px, 60%); }

  .map-card { grid-template-columns: 1fr; }
  .map-card iframe { min-height: 260px; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; text-align: center; }
  .footer-brand { justify-content: center; }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(18, 6, 31, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .95rem 1.4rem; border-top: 1px solid rgba(255, 255, 255, .06); }

  .nav-toggle { display: flex; }

  .btn-wsp.btn-sm span { display: none; }
  .btn-wsp.btn-sm { padding: .55rem; width: 40px; height: 40px; border-radius: 50%; }

  .section { padding: 3.2rem 0; }
}

/* Catálogo compacto en celular: 2 columnas, tarjetas pequeñas */
@media (max-width: 700px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .card { border-radius: 14px; }
  .card:hover { transform: none; }
  .card-body { padding: .75rem .75rem .85rem; gap: .5rem; }
  .card-top { flex-direction: column; align-items: flex-start; gap: .05rem; }
  .card-top h3 { font-size: .98rem; }
  .price { font-size: 1.08rem; }
  .desc {
    font-size: .8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .badges { gap: .3rem; }
  .badges li {
    font-size: .64rem;
    padding: .2rem .5rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .btn-buy { font-size: .82rem; padding: .62rem .7rem; gap: .35rem; }
  .btn-buy svg { width: 15px; height: 15px; }
  .thumbs { gap: .3rem; left: .45rem; bottom: .45rem; }
  .thumb { width: 32px; height: 32px; border-radius: 8px; border-width: 1.5px; }
}

@media (max-width: 560px) {
  .fab-wsp { width: 52px; height: 52px; }
  .chat-toggle { width: 52px; height: 52px; }
  .chat-panel { bottom: 5rem; }
}
