/* ============================================================
   🛍️ DASHBOARD CLIENTE — CATÁLOGO MODERNO Y RESPONSIVE
   ============================================================ */

body {
  background: #f6f7f9;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
}

/* ============================================================
   🧭 CONTENEDOR PRINCIPAL
   ============================================================ */
.dashboard-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}

/* ============================================================
   🎨 CABECERA DE CATEGORÍA
   ============================================================ */
.categoria-header {
  text-align: center;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.categoria-header h1 {
  font-weight: 700;
  color: #1f2937;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-volver {
  background: #2563eb;
  color: #fff;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease;
}

.btn-volver:hover {
  background: #1d4ed8;
}

/* ============================================================
   🧱 GRID DE PRODUCTOS
   ============================================================ */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.8rem;
  justify-content: center;
  align-items: start;
}

/* ✅ CENTRAR cuando hay 1 o 2 productos */
@media (min-width: 769px) {
  .productos-grid:has(.producto-card:nth-child(1):last-child),
  .productos-grid:has(.producto-card:nth-child(2):last-child) {
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(320px, 400px));
  }
}

/* ============================================================
   🧩 TARJETA DE PRODUCTO
   ============================================================ */
.producto-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   🖼️ IMAGEN DE PRODUCTO
   ============================================================ */
.producto-img {
  width: 100%;
  height: 200px; /* Altura estándar (mantiene uniformidad) */
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ✅ rellena sin deformar */
  object-position: center;
  transition: transform 0.3s ease;
}

.producto-card:hover .producto-img img {
  transform: scale(1.05);
}

/* ============================================================
   📝 INFORMACIÓN DEL PRODUCTO
   ============================================================ */
.producto-info {
  padding: 1rem 1.2rem;
}

.producto-info h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: #1f2937;
  font-weight: 600;
}

/* Descripción */
.descripcion {
  font-size: 0.9rem;
  color: #6b7280;
  height: 60px;
  overflow: hidden;
  line-height: 1.4;
  text-decoration: none;
}

/* Precio */
.precio {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 600;
  color: #2563eb;
  font-size: 1rem;
  background: #eff6ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
}

/* ============================================================
   📦 MENSAJE SIN PRODUCTOS
   ============================================================ */
.mensaje-vacio {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
  margin-top: 2rem;
}

/* ============================================================
   📱 RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 0.8rem;
  }

  .categoria-header h1 {
    font-size: 1.6rem;
  }

  .btn-volver {
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
  }

  .producto-img {
    height: 180px;
  }

  .producto-info h2 {
    font-size: 1rem;
  }

  .descripcion {
    height: auto;
  }

  .productos-grid {
    gap: 1.2rem;
  }
}
.producto-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}
/* ============================================================
   💬 BOTÓN DE WHATSAPP — ESTILO COTIZACIÓN
   ============================================================ */
.btn-whatsapp {
  display: inline-block;
  width: 100%;
  margin-top: 0.8rem;
  text-align: center;
  background: #25d366;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp i {
  margin-right: 6px;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

/* Asegura que los botones no colapsen en pantallas pequeñas */
@media (max-width: 768px) {
  .btn-whatsapp {
    font-size: 0.9rem;
    padding: 0.55rem;
  }
}
