/* =========================================
   CATÁLOGO DE PRODUCTOS - GRID SYSTEM
   ========================================= */
html, body {
    overflow-x: hidden; /* Corta cualquier cosa que se salga de ancho */
    width: 100%;
    position: relative;
}
/* CONTENEDOR PRINCIPAL (GRID) */
.productos-container {
  display: grid;
  /* Crea columnas automáticas de mínimo 260px */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  padding: 20px 0 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.link {
  text-decoration: none;
  color: inherit;
  display: block; /* Para que ocupe todo el espacio del grid */
}

/* --- TARJETA DEL PRODUCTO --- */
.producto {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid transparent; /* Invisible por defecto */
  position: relative;
  /* Quitamos sombras pesadas por defecto para look más limpio */
  box-shadow: none; 
}

.producto:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); /* Sombra suave al levantar */
  border-color: #f0f0f0;
}

/* --- IMAGEN Y WRAPPER (Estilo Estudio) --- */
.image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* Cuadrado perfecto */
  background-color: #f6f6f6; /* Fondo gris premium */
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.producto-imagen {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform 0.5s ease;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.05));
}

.producto:hover .producto-imagen {
  transform: scale(1.08); /* Zoom sutil */
}

/* --- BOTÓN FLOTANTE (OVERLAY) --- */
.hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.producto:hover .hover-overlay {
  opacity: 1;
}

.btn-quick-view {
  background-color: #ffffff;
  color: var(--brand-dark);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform 0.3s ease, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.producto:hover .btn-quick-view {
  transform: translateY(0);
}

/* --- INFORMACIÓN --- */
.producto-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 5px;
}

.producto-marca {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  text-transform: capitalize; /* Capitalizado se ve más elegante que Uppercase total */
  line-height: 1.3;
}

/* Separador sutil */
.meta-wrapper {
  margin-top: auto; /* Empuja el precio al fondo */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f9f9f9;
}

.precio {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-blue);
  margin: 0;
  padding: 0; /* Quitamos padding viejo */
}

.cta-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-accent);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.producto:hover .cta-text {
  opacity: 1;
  transform: translateX(0);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
.productos-container {
    display: grid;
    /* Forzamos 2 columnas exactas */
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; /* Gap un poco más fino */
    padding: 10px 12px 60px; /* Padding lateral ajustado para que no corte */
    width: 100%;
    box-sizing: border-box; /* Vital para que el padding no sume ancho */
  }

  .producto {
    padding: 10px;
    min-height: 280px; /* Altura mínima para uniformidad */
    justify-content: space-between;
  }

  .image-wrapper {
    aspect-ratio: 1 / 1; /* Cuadrado perfecto */
    margin-bottom: 10px;
  }
  
  .producto-marca {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .precio {
    font-size: 1rem;
  }
  
  /* En celular ocultamos el botón flotante para limpiar la vista 
     y mostramos el precio y la marca siempre */
  .hover-overlay { display: none; }
  .cta-text { display: none; }
}