.card {
  --card-bg: #ffffff;
  --card-accent: #31c923;
  --card-text: #1e293b;
  --card-shadow: 0 12px 17px 2px rgba(0, 0, 0, 0.08);

  width: 260px; /* antes 190px */
  height: 340px; /* antes 254px */
  background: var(--card-bg);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

.card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card__glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(124, 58, 237, 0.3) 0%,
    rgba(124, 58, 237, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.card__content {
  padding: 1.5em;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1em;
  position: relative;
  z-index: 2;
}

.card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f52409;
  color: white;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.4s ease 0.1s;
}

.card__image {
  width: 100%;
  height: 150px; /* antes 100px */
  background: white;
  border-radius: 14px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.card__image::after {
  content: "";
  position: absolute;
  inset: 0;
 
  opacity: 0.5;
}

.card__text {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.card__title {
  color: var(--card-text);
  font-size: 1.2em; /* más grande */
  margin: 0;
  font-weight: 700;
  transition: all 0.3s ease;
  line-height: 1.2;
}

.card__description {
  color: var(--card-text);
  font-size: 0.85em; /* más legible */
  margin: 0;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card__price {
  color: var(--card-text);
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
}

.card__button {
  width: 34px;
  height: 34px;
  background: var(--card-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: scale(0.9);
}

/* Hover Effects */
.card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 24px 30px -5px rgba(0, 0, 0, 0.12),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(124, 58, 237, 0.3);
}

.card:hover .card__shine {
  opacity: 1;
  animation: shine 3s infinite;
}

.card:hover .card__glow {
  opacity: 1;
}

.card:hover .card__badge {
  transform: scale(1);
  opacity: 1;
  z-index: 1;
}

.card:hover .card__image {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1);
}

.card:hover .card__title {
  color: var(--card-accent);
  transform: translateX(2px);
}

.card:hover .card__description {
  opacity: 1;
  transform: translateX(2px);
}

.card:hover .card__price {
  color: var(--card-accent);
  transform: translateX(2px);
}

.card:hover .card__button {
  transform: scale(1);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25);
}

.card:hover .card__button svg {
  animation: pulse 1.5s infinite;
}

.card:active {
  transform: translateY(-5px) scale(0.98);
}.card__image {
  width: 100%;
  height: 200px; /* altura fija para todas las imágenes */
  background: linear-gradient(45deg, #fcfdfc, #ffffff);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card__image img {
  width: 90%;
  height: 180px;
  object-fit: contain; /* asegura que la imagen llene el contenedor sin deformarse */
  border-radius: 14px;
}.card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pantallas muy grandes (≥1600px): 5 columnas */
@media (min-width: 1600px) {
  .productos-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Escritorio (1200px–1599px): 4 columnas */
@media (max-width: 1599px) and (min-width: 1200px) {
  .productos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Laptops medianas (900px–1199px): 3 columnas */
@media (max-width: 1199px) and (min-width: 900px) {
  .productos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets (600px–899px): 2 columnas */
@media (max-width: 899px) and (min-width: 600px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Móviles (≤599px): 1 columna centrada */
@media (max-width: 599px) {
  .productos-grid {
    grid-template-columns: 1fr;
  }
}

/* Ajuste visual de las cards en pantallas pequeñas */
@media (max-width: 480px) {
  .card {
    width: 90%;
    height: auto;
  }

  .card__image img {
    height: 150px;
  }

  .card__title {
    font-size: 1em;
  }

  .card__description {
    font-size: 0.8em;
  }
}
/* Tamaño uniforme de las cards */
.card {
  width: 260px;
  height: 380px; /* ← altura fija para todas */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Asegura que el contenido no rompa el alto */
.card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Imagen consistente */
.card__image {
  width: 100%;
  height: 180px; /* altura fija uniforme */
  background: linear-gradient(45deg, #fcfdfc, #ffffff);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card__image img {
  width: 90%;
  height: 100%;
  object-fit: contain; /* mantiene proporción sin deformar */
}

/* Ajuste del texto para evitar desbordes */
.card__title {
  font-size: 1.1em;
  line-height: 1.2;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.card__description {
  font-size: 0.85em;
  line-height: 1.3;
  max-height: 2.6em; /* aprox 2 líneas */
  overflow: hidden;
}
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  justify-items: center;
  padding: 20px;
}

/* Pantallas grandes: 4 columnas */
@media (min-width: 1200px) {
  .productos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Pantallas medianas: 3 columnas */
@media (min-width: 768px) and (max-width: 1199px) {
  .productos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Pantallas pequeñas: 2 columnas */
@media (max-width: 767px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pantallas muy pequeñas: 1 columna */
@media (max-width: 480px) {
  .productos-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================
   Responsivo: Ajustes para Móviles muy pequeños (<= 480px) 📲
============================ */
@media (max-width: 480px) {
    /* Manteniendo la misma lógica de menú flotante, solo ajustamos la fila inicial si es necesario */
    .cards .card {
        width: 100%; /* Una tarjeta por fila en la posición inicial */
        height: 100px;
    }
}.overlay-dark {
    background-color: rgba(0, 0, 0, 0.5); /* Negro semi-transparente */
    color: white; /* Asegura que el texto sea blanco */
    padding: 1rem; /* Opcional, para separación interna */
    border-radius: 0.25rem; /* Si quieres bordes ligeramente redondeados */
}.zoom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease-in-out;
    animation: zoomEffect 20s infinite alternate;
}

@keyframes zoomEffect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1); /* Zoom hasta 110% */
    }
    100% {
        transform: scale(1);
    }
}

