/* BASE */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f5f5f7;
  color: #1d1d1f;

  /* 🔥 clave para footer correcto */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HERO */
.hero {
  background: #f5f5f7;
  padding: 60px 20px 50px;
}

/* CONTENEDOR PRINCIPAL */
.hero-content {
  max-width: 1100px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 40px;
}

/* LOGO */
.logo {
  width: 250px;
  flex-shrink: 0;
}

/* BLOQUE DERECHO */
.hero-texto {
  flex: 1;
  max-width: 100%;
}

/* TITULOS */
.hero-texto h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
}

.hero-texto h2 {
  font-size: 24px;
  margin: 6px 0 10px;
  color: #6e6e73;
}

/* SUBTEXTO */
.hero-sub {
  font-size: 14px;
  color: #8e8e93;
  margin-bottom: 15px;
}

/* INPUT */
input {
  padding: 14px 18px;
  width: 100%;
  max-width: 800px;

  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e5e7;

  outline: none;
  font-size: 14px;

  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: 0.2s;
}

input:focus {
  background: #f9f9f9;
}

/* GRID */
#catalogo {
  flex: 1; /* 🔥 empuja el footer abajo */

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
  padding: 50px 20px;

  max-width: 1200px;
  margin: 0 auto;
}

/* TARJETA */
.producto {
  background: #fff;
  border-radius: 18px;
  padding: 18px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  min-height: 380px;

  border: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);

  transition: all 0.25s ease;
  overflow: hidden;
}

.producto:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

/* IMAGEN */
.producto img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    background: #f5f5f7; /* gris suave tipo Apple */
    padding: 10px;
    border-radius: 14px;
  }

/* TITULO PRODUCTO */
.producto h3 {
  font-size: 15px;
  font-weight: 500;
  color: #2c2c2e;
  margin: 14px 0 6px;
  line-height: 1.4;

  height: 44px;
  overflow: hidden;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* PRECIO */
.precio {
  font-size: 20px;
  font-weight: 600;
  margin: 6px 0 14px;
}

/* BADGES */
.oferta,
.top {
  font-size: 11px;
  color: #6e6e73;
  margin: 2px 0;
}

/* STOCK */
.stock {
  font-size: 12px;
  color: #ff9500;
}

.agotado {
  font-size: 12px;
  color: #ff3b30;
}

/* BOTON */
.btn {
  margin-top: auto;
  padding: 12px;
  background: #16a34a;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transition: all 0.2s ease;
}

.btn:hover {
  background: #15803d;
  filter: brightness(1.05);
}

/* 🔥 FOOTER PRO */
.footer {
  background: #f5f5f7;
  border-top: 1px solid #e5e5e7;

  text-align: center;
  padding: 25px 20px;

  font-size: 13px;
  color: #6e6e73;
}

.footer p {
  margin: 6px 0;
}

.footer strong {
  color: #1d1d1f;
  font-weight: 500;
}

/* BOTÓN FLOTANTE */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;

  width: 55px;
  height: 55px;

  background: #16a34a;
  color: white;

  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  text-decoration: none;

  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  transition: 0.2s;
  z-index: 1000;
}

.whatsapp-float:hover {
  background: #15803d;
  transform: scale(1.08);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

/* RESPONSIVE PRO */
@media (max-width: 700px) {

  /* 🔥 HERO: mantener layout horizontal */
  .hero-content {
    flex-direction: row; /* 🔥 clave */
    align-items: center;
    gap: 15px;
  }

  /* 🔥 LOGO más pequeño */
  .logo {
    width: 120px;
  }

  /* 🔥 TEXTO compacto */
  .hero-texto h1 {
    font-size: 22px;
    letter-spacing: -0.5px;
  }

  .hero-texto h2 {
    font-size: 16px;
  }

  .hero-sub {
    font-size: 12px;
  }

  /* 🔥 INPUT adaptado */
  input {
    max-width: 100%;
    font-size: 13px;
    padding: 12px 14px;
  }

  /* 🔥 GRID: 2 COLUMNAS */
  #catalogo {
    grid-template-columns: repeat(2, 1fr); /* 🔥 clave */
    gap: 15px;
    padding: 30px 10px;
  }

  /* 🔥 TARJETAS más compactas */
  .producto {
    min-height: 320px;
    padding: 12px;
  }

  .producto img {
    height: 140px;
  }

  .producto h3 {
    font-size: 13px;
    height: 38px;
  }

  .precio {
    font-size: 16px;
  }

  .btn {
    font-size: 12px;
    padding: 10px;
  }
}
