@import url("variables.css");

/* =========================
   RESET / BASE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: "Blanka";
  src: url("../fonts/Blanka.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #070a12;
  --panel: rgba(255, 255, 255, 0.06);
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);

  --text: #e8ecff;
  --muted: rgba(232, 236, 255, 0.7);

  --accent: #22d3ee; /* neon cyan */
  --accent2: #a78bfa; /* neon violet */
  --danger: #ff4d6d;

  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadowHover: 0 20px 55px rgba(0, 0, 0, 0.6);

  --radius: 20px;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 55%),
    radial-gradient(
      circle at 70% 20%,
      rgba(167, 139, 250, 0.1),
      transparent 55%
    ),
    var(--bg);
  color: var(--text);
}

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  height: 68vh;
  min-height: 420px;
  background: url("../img/hero.webp") center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

/* Overlay + glow */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 18, 0.35),
    rgba(7, 10, 18, 0.75)
  );
  z-index: 1;
}

/* “Glow” decorativo sutil */
.hero::after {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  left: 50%;
  top: -280px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.35),
    transparent 60%
  );
  filter: blur(20px);
  opacity: 0.55;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding: 0 1rem;
}

.hero h1 {
  font-family: "Blanka", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  letter-spacing: 10px;
  font-weight: normal;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.hero p {
  margin: 0 0 1.6rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.92);
}

/* =========================
   BUSCADOR (GLASS)
========================= */
.buscador {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.buscador input {
  width: 330px;
  max-width: 100%;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.buscador input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.buscador button {
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.9),
    rgba(167, 139, 250, 0.85)
  );
  color: #071018;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.18);
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.buscador button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* =========================
   FILTROS
========================= */
.filtros-container {
  display: flex;
  justify-content: center;
  margin: 2.2rem 0 1.2rem;
  padding: 0 1rem;
}

.filtros-form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 0.8rem;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.filtros-form select {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  outline: none;
}

.btn-filtro {
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.18s ease;
}

.btn-filtro:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

/* =========================
   PRODUCTOS
========================= */
.productos-contenedor {
  padding: 1.8rem 1.4rem 3.2rem;
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.7rem;
}

/* =========================
   CARD PRODUCTO (DARK TECH)
========================= */
.card-producto {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.card-producto:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadowHover);
  border-color: rgba(34, 211, 238, 0.22);
}

/* Glow borde suave al hover */
.card-producto:hover::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.22), transparent 55%),
    radial-gradient(
      circle at 70% 20%,
      rgba(167, 139, 250, 0.18),
      transparent 55%
    );
  z-index: 0;
}

/* Imagen */
.card-img {
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.card-img img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

/* Info */
.card-info {
  padding: 1rem 1.1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-info h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.precio {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.precio-oferta {
  color: var(--accent);
}

.precio-tachado {
  font-size: 0.95rem;
  color: rgba(232, 236, 255, 0.6);
  text-decoration: line-through;
  margin-left: 0.4rem;
  font-weight: 600;
}

/* Botón */
.btn-comprar {
  width: 88%;
  margin: 0.2rem auto 1.15rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  color: #071018;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.95),
    rgba(167, 139, 250, 0.9)
  );
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.16);
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
  position: relative;
  z-index: 1;
}

.btn-comprar:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-disabled {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(232, 236, 255, 0.7);
  cursor: not-allowed;
  box-shadow: none;
}

/* =========================
   BADGES
========================= */
.badge-oferta,
.badge-sinstock {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  z-index: 2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.badge-oferta {
  left: 12px;
  background: rgba(34, 211, 238, 0.92);
  color: #071018;
}

.badge-sinstock {
  right: 12px;
  background: #071018;
  color: rgba(232, 236, 255, 0.95);
}

.card-producto.sin-stock {
  opacity: 0.55;
}

/* =========================
   AVISO REGISTRO
========================= */
.aviso-registro {
  max-width: 920px;
  margin: 1.6rem auto 0;
  padding: 1.2rem 1.4rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.aviso-registro strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.aviso-registro p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.btn-registro {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  color: #071018;
  background: rgba(255, 255, 255, 0.92);
}

/* =========================
   EXTRAS / UX
========================= */
.no-productos {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Focus accesible */
.buscador input:focus,
.filtros-form select:focus,
.btn-filtro:focus,
.btn-comprar:focus {
  outline: 3px solid rgba(34, 211, 238, 0.35);
  outline-offset: 2px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {
  .hero {
    height: 55vh;
    min-height: 320px;
  }
  .hero h1 {
    letter-spacing: 4px;
  }

  .grid-productos {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-img img {
    height: 170px;
  }
}

/* Select cerrado: dark */
.filtros-form select,
#form-compra select {
  background: rgba(0, 0, 0, 0.35);
  color: #e8ecff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Desplegable (options): claro para máxima legibilidad */
.filtros-form select option,
#form-compra select option {
  background: #ffffff;
  color: #111111;
}
/* =========================
   ANIMACIÓN ENTRADA PRODUCTOS
========================= */
.card-producto {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
  will-change: opacity, transform;
}

.card-producto.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll anchor no se tapa con header (ajustá si tu header es fijo) */
#productos {
  scroll-margin-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  .card-producto {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
/* =========================
   BENEFICIOS (TRUST BAR)
========================= */
.beneficios {
  max-width: 1100px;
  margin: -34px auto 1.2rem; /* sube un poco sobre el hero */
  padding: 0 1rem;
  position: relative;
  z-index: 5;
}

.beneficios-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.beneficio-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.beneficio-item:last-child {
  border-right: none;
}

.beneficio-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.beneficio-ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  font-size: 20px;
  flex: 0 0 42px;
}

.beneficio-txt strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--text);
}

.beneficio-txt span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.18rem;
}

/* Responsive: pasa a 2 columnas y queda más cómodo */
@media (max-width: 900px) {
  .beneficios {
    margin: -22px auto 1rem;
  }

  .beneficios-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beneficio-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .beneficio-item:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .beneficios-grid {
    grid-template-columns: 1fr;
  }

  .beneficio-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .beneficio-item:last-child {
    border-bottom: none;
  }
}

/* =========================
   WHATSAPP FLOTANTE (CLÁSICO)
========================= */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;

  width: 56px;
  height: 56px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  background: transparent;

  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.whatsapp-float img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 18px 50px rgba(37, 211, 102, 0.45);
}

/* Mobile */
@media (max-width: 520px) {
  .whatsapp-float {
    right: 14px;
    bottom: 14px;
  }
}

/*PAGINACION*/
.paginacion {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 6px;
  flex-wrap: wrap;
}
.pag-btn,
.pag-num {
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.pag-num.active {
  font-weight: 700;
}
.pag-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.pag-ellipsis {
  opacity: 0.6;
  padding: 0 6px;
}

/*TESTIMONIOS*/
.testimonios {
  padding: 20px 20px;
  text-align: center;
}
.testimonios h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}
.testimonios-sub {
  margin: 0 0 26px;
  opacity: 0.75;
}

.t-slider {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 14px;
}

.t-viewport {
  overflow: hidden;
  border-radius: 18px;
}

.t-track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s ease;
  will-change: transform;
  padding: 4px;
}

/* Cards */
.t-card {
  flex: 0 0 calc(33.333% - 11px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  text-align: left;
}
.t-card img {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin-bottom: 12px;
}
.t-card p {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.t-card span {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Flechas */
.t-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
}
.t-prev {
  left: -10px;
}
.t-next {
  right: -10px;
}

/* Dots */
.t-dots {
  color: white;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
}
.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);

  background: gray;
  cursor: pointer;
}
.t-dot.active {
  background: white;
}

/* Responsive */
@media (max-width: 900px) {
  .t-card {
    flex: 0 0 calc(50% - 8px);
  } /* 2 por vista */
}
@media (max-width: 560px) {
  .t-card {
    flex: 0 0 100%;
  } /* 1 por vista pero en slider (NO apilado) */
  .t-prev {
    left: 6px;
  }
  .t-next {
    right: 6px;
  }
}

/* --- FIX: flechas arriba de las imágenes --- */
.t-slider {
  position: relative;
}
.t-viewport {
  overflow: hidden;
}

/* Asegurar que las flechas queden por encima */
.t-nav {
  z-index: 50;
}

/* Evitar que las cards/imágenes queden por encima */
.t-card,
.t-card img {
  position: relative;
  z-index: 1;
}

/* Dar espacio para que la flecha no se pise con la imagen */
.t-viewport {
  padding: 0 46px; /* espacio lateral dentro del carrusel */
}

/* Reacomodar flechas dentro del padding */
.t-prev {
  left: 10px;
}
.t-next {
  right: 10px;
}

/* En móvil, un poco menos de padding */
@media (max-width: 560px) {
  .t-viewport {
    padding: 0 40px;
  }
  .t-nav {
    width: 40px;
    height: 40px;
  }
}
