/* styles.css */

:root {
  --bg: #e6e6e6;
  --card: #ffffff;
  --card-soft: #f1f5f9;
  --primary: #b6b6b6;      /* gris azulado */
  --accent: #ff5e00;       /* azul rey */
  --text: #0f172a;
  --muted: #64748b;
  --radius: 16px;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Header fijo con el enlace */

a {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 9999;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  background: #007aff;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  transition: background 0.2s ease;
  line-height: 1;
}
a:hover {
  background: #70b5ff;
}
a:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
  border-radius: 2rem;
}

/* Fondo con logo */
.cont_img_logo_background {
  display: flex;
  position: fixed;
  z-index: 0;
  opacity: 0.2;
  padding: 50px;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none; /* para que no interfiera con clics */
}
.img_logo_background {
  width: 50%;
  max-width: 400px;
}

/* Contenedor principal */
.contenedor_catálogo {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  padding: 80px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ===== ANIMACIÓN DE ENTRADA ===== */
@keyframes cardEntrada {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== TARJETA ===== */
.tarjeta {
  width: 280px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  
  /* Animación de entrada (se aplica con delay desde JS) */
  animation: cardEntrada 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  opacity: 0; /* comienza invisible, la animación lo llevará a 1 */
  will-change: transform, opacity;
}

/* Glow animado en hover */
.tarjeta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(176, 201, 255, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border: solid 1px var(--accent);
}
.tarjeta:hover::before {
  opacity: 1;
}

.tarjeta:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* ===== IMAGEN ===== */
.cont_tarjeta_img {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 160px;
}
.tarjeta_img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1),
              filter 0.3s ease;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
  transform-origin: center center;
}
.tarjeta:hover .tarjeta_img {
  transform: scale(1.08);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5));
}

/* ===== TÍTULO ===== */
.tarjeta_titulo {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  letter-spacing: 0.5px;
}
.tarjeta_titulo::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 6px auto 0;
  background: var(--primary);
  border-radius: 10px;
  transition: background 0.35s ease;
}
.tarjeta:hover .tarjeta_titulo::after {
  background: var(--accent);
}

/* ===== MEDIDAS ===== */
.tarjeta_medidas {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

/* ===== DETALLES ===== */
.tarjeta_detalles {
  background: var(--card-soft);
  padding: 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text);
}

/* ===== DESCRIPCIÓN (se revela en hover) ===== */
.tarjeta_descripcion {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
.tarjeta:hover .tarjeta_descripcion {
  max-height: 80px;
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .contenedor_catálogo {
    padding: 20px;
    gap: 20px;
  }
  .tarjeta {
    width: 100%;
    max-width: 320px;
  }
}


/* ============================================================
   RETRASOS ESCALONADOS (serie) – hasta 30 tarjetas
   ============================================================ */
.tarjeta:nth-child(1)  { animation-delay: 0.00s; }
.tarjeta:nth-child(2)  { animation-delay: 0.05s; }
.tarjeta:nth-child(3)  { animation-delay: 0.10s; }
.tarjeta:nth-child(4)  { animation-delay: 0.15s; }
.tarjeta:nth-child(5)  { animation-delay: 0.20s; }
.tarjeta:nth-child(6)  { animation-delay: 0.25s; }
.tarjeta:nth-child(7)  { animation-delay: 0.30s; }
.tarjeta:nth-child(8)  { animation-delay: 0.35s; }
.tarjeta:nth-child(9)  { animation-delay: 0.40s; }
.tarjeta:nth-child(10) { animation-delay: 0.45s; }
.tarjeta:nth-child(11) { animation-delay: 0.50s; }
.tarjeta:nth-child(12) { animation-delay: 0.55s; }
.tarjeta:nth-child(13) { animation-delay: 0.60s; }
.tarjeta:nth-child(14) { animation-delay: 0.65s; }
.tarjeta:nth-child(15) { animation-delay: 0.70s; }
.tarjeta:nth-child(16) { animation-delay: 0.75s; }
.tarjeta:nth-child(17) { animation-delay: 0.80s; }
.tarjeta:nth-child(18) { animation-delay: 0.85s; }
.tarjeta:nth-child(19) { animation-delay: 0.90s; }
.tarjeta:nth-child(20) { animation-delay: 0.95s; }
.tarjeta:nth-child(21) { animation-delay: 1.00s; }
.tarjeta:nth-child(22) { animation-delay: 1.05s; }
.tarjeta:nth-child(23) { animation-delay: 1.10s; }
.tarjeta:nth-child(24) { animation-delay: 1.15s; }
.tarjeta:nth-child(25) { animation-delay: 1.20s; }
.tarjeta:nth-child(26) { animation-delay: 1.25s; }
.tarjeta:nth-child(27) { animation-delay: 1.30s; }
.tarjeta:nth-child(28) { animation-delay: 1.35s; }
.tarjeta:nth-child(29) { animation-delay: 1.40s; }
.tarjeta:nth-child(30) { animation-delay: 1.45s; }
