/* Layout principal */
.main-content {
  min-height: 100vh;
  background: #f9fafb;
  padding-top: 10px;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* Botón de favoritos */
.btn-favorito,
.btn-favorito-card {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 20;
}

.btn-favorito:hover,
.btn-favorito-card:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-favorito i,
.btn-favorito-card i {
  font-size: 1.25rem;
  color: #6B7280;
  transition: all 0.3s ease;
}

.btn-favorito:hover i,
.btn-favorito-card:hover i {
  color: #F97316;
}

.btn-favorito i.bi-heart-fill,
.btn-favorito-card i.bi-heart-fill {
  color: #EF4444;
  animation: heartBeat 0.3s ease-in-out;
}

.btn-favorito-card.active i {
  color: #EF4444;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.favoritos-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: #EF4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.favorito-card {
  position: relative;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.favorito-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.favorito-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.favorito-card-body {
  padding: 1.25rem;
}

.favorito-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.favorito-card-sku {
  font-size: 0.85rem;
  color: #6B7280;
  margin-bottom: 0.75rem;
}

.favorito-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #F97316;
  margin-bottom: 0.5rem;
}

.favorito-card-price-oferta {
  font-size: 1.25rem;
  color: #6B7280;
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.favorito-card-stock {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.favorito-card-stock.disponible {
  background: #D1FAE5;
  color: #065F46;
}

.favorito-card-stock.agotado {
  background: #FEE2E2;
  color: #991B1B;
}

.favorito-card-alerta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #FEF3C7;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #92400E;
  margin-bottom: 1rem;
}

.favorito-card-alerta i {
  font-size: 1.1rem;
  color: #F59E0B;
}

.favorito-card-actions {
  display: flex;
  gap: 0.75rem;
}

.favorito-card-actions .btn {
  flex: 1;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.favorito-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.favorito-empty i {
  font-size: 5rem;
  color: #D1D5DB;
  margin-bottom: 1.5rem;
}

.favorito-empty h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.75rem;
}

.favorito-empty p {
  font-size: 1rem;
  color: #6B7280;
  margin-bottom: 2rem;
}

/* Estilos de tarjetas de productos (coherencia con catálogo) */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.producto-card {
  position: relative;
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.producto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.producto-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.producto-imagen-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f9fafb;
  border-radius: 0.75rem 0.75rem 0 0;
}

.producto-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.producto-card:hover .producto-imagen {
  transform: scale(1.05);
}

.badge-agotado {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #EF4444;
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 5;
}

.producto-info {
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.producto-nombre {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.producto-sku {
  font-size: 0.85rem;
  color: #6B7280;
  margin: 0;
}

.producto-dimensiones {
  font-size: 0.85rem;
  color: #6B7280;
  margin: 0;
}

.producto-color {
  margin: 0.25rem 0;
}

.color-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: white;
  font-weight: 600;
}

.producto-precio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.precio-actual {
  font-size: 1.5rem;
  font-weight: 700;
  color: #F97316;
}

.precio-anterior {
  font-size: 1.1rem;
  color: #9CA3AF;
  text-decoration: line-through;
}

.producto-stock {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #059669;
  font-weight: 600;
  margin: 0;
}

.producto-stock i {
  font-size: 1rem;
}

.producto-stock-agotado {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #DC2626;
  font-weight: 600;
  margin: 0;
}

.producto-stock-agotado i {
  font-size: 1rem;
}

.alerta-restock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #FEF3C7;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: #92400E;
  margin: 0.5rem 0;
}

.alerta-restock i {
  color: #F59E0B;
  font-size: 0.9rem;
}

.producto-acciones {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.btn-ver-opciones {
  flex: 1;
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid #F97316;
  color: #F97316;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ver-opciones:hover {
  background: #F97316;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-agregar-carrito {
  width: 44px;
  height: 44px;
  background: #F97316;
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-agregar-carrito:hover {
  background: #EA580C;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

@media (max-width: 768px) {
  .btn-favorito,
  .btn-favorito-card {
    width: 36px;
    height: 36px;
  }

  .btn-favorito i,
  .btn-favorito-card i {
    font-size: 1.1rem;
  }

  .favorito-card-image {
    height: 180px;
  }

  .favorito-card-body {
    padding: 1rem;
  }

  .productos-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .producto-imagen-container {
    height: 200px;
  }
}
