:root {
  --color-texto: #4e4e4e;
  --color-gris: #f5f5f5;
  --color-morado: #8560d7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  padding-top: 80px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f9f9f9;
  min-height: 100vh;
}

/* =====================================================
     FAVORITOS.CSS — ESTILOS UNIFICADOS
===================================================== */

.favoritos-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
}

/* ==========================
     Estado vacío / No logueado
========================== */
.no-favoritos {
  text-align: center;
  padding: 120px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #4e4e4e;
  animation: fadeIn 0.5s ease-in-out;
  flex: 1;
}

.corazon-svg {
  width: 100px;
  height: 100px;
  opacity: 0.3;
  margin-bottom: 20px;
}

.corazon-path {
  fill: #e0e0e0;
  stroke: #bdbdbd;
  stroke-width: 1;
}

.favoritos-titulo {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.favoritos-descripcion {
  font-size: 14px;
  color: #888;
  margin-bottom: 26px;
  max-width: 260px;
  line-height: 1.4;
}

.btn-explorar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-primario);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 30px;
  padding: 12px 22px;
  box-shadow: 0 4px 12px
    color-mix(in srgb, var(--color-primario) 10%, transparent);
  transition: background 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-explorar:hover {
  background: #ff7ca8;
}

/* ==========================
     Header de favoritos
========================== */
.favoritos-header {
  margin-bottom: 20px;
  text-align: center;
}

.favoritos-header h1 {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.favoritos-count {
  font-size: 14px;
  color: #666;
}

/* ==========================
     Cards de productos (MISMO ESTILO QUE CARRITO)
========================== */
/* ==========================
     Cards de productos (ESTRUCTURA DE 3 COLUMNAS)
========================== */
.card-container {
  position: relative;
  margin: 16px auto;
  width: 350px;
}

.card {
  width: 100%;
  height: 110px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 84px 1fr auto !important;
  align-items: center !important;
  padding: 12px;
  gap: 12px;
  transition: transform 0.3s ease;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  margin-bottom: 20px;
}

.card.dragging {
  cursor: grabbing;
  transition: none;
}

.card.eliminating {
  transform: translateX(-100%) rotate(-5deg);
  opacity: 0;
}

/* Imagen del producto (COLUMNA 1) */
.card-image {
  width: 84px;
  height: 84px;
  background-color: #f7f8fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Información del producto (COLUMNA 2) */
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.product-name {
  font-size: 12px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-category {
  font-size: 10px;
  font-weight: 500;
  color: #aeb0b7;
}

.product-price {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  margin-top: 4px;
}

/* Botón de favorito (COLUMNA 3) */
.favorite-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.favorite-btn:hover {
  background: white;
  transform: scale(1.1);
}

.favorite-btn.active svg {
  fill: var(--color-primario);
  color: var(--color-primario);
}

/* Botones de acción (si decides agregarlos después) */
.card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--color-primario);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-add-to-cart:hover {
  background: #ff7ca8;
  transform: translateY(-1px);
}

.btn-add-to-cart:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ==========================
     Botón de eliminar (Swipe) 
========================== */
.delete-btn {
  position: absolute;
  right: 2.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--color-primario);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 4px 12px
    color-mix(in srgb, var(--color-primario) 10%, transparent);
}

.delete-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.delete-btn svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.drag-hint {
  color: #999;
  font-size: 11px;
  margin-top: 8px;
  text-align: start;
  opacity: 0.6;
}
/* ==========================
     Estados y animaciones
========================== */
.error-message {
  background: #ffeaea;
  color: #d63031;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  margin: 20px 0;
  border: 1px solid #ff7675;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================
     Toast notifications
========================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 9999;
  width: 400px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.toast.ok {
  text-align: center;
  background: var(--color-primario);
  color: #fff;
}

.toast.error {
  text-align: center;
  background: #e74c3c;
  color: #fff;
}

.toast.warning {
  text-align: center;
  background: #fff;
}

/* ==========================
     Bloqueador desktop
========================== */
#desktop-blocker {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9999;
  backdrop-filter: blur(10px);
}

#desktop-blocker.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.blocker-content {
  text-align: center;
  padding: 40px;
  max-width: 400px;
}

.blocker-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.blocker-content h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 16px;
}

.blocker-content p {
  color: #666;
  line-height: 1.5;
}

/* ==========================
     Responsive
========================== */
@media (max-width: 480px) {
  .favoritos-container {
    padding: 15px;
  }

  .card-container {
    width: 100%;
    max-width: 350px;
  }

  .card {
    height: 110px;
  }

  .no-favoritos {
    padding: 80px 15px;
  }

  .corazon-svg {
    width: 80px;
    height: 80px;
  }

  .toast {
    width: 90%;
    max-width: 350px;
  }
}

/* Para tablets pequeñas */
@media (max-width: 380px) {
  .card {
    grid-template-columns: 70px 1fr auto;
    gap: 10px;
    padding: 10px;
  }

  .card-image {
    width: 70px;
    height: 70px;
  }

  .btn-add-to-cart {
    font-size: 10px;
    padding: 6px 10px;
  }

  .product-name {
    font-size: 11px;
  }

  .product-price {
    font-size: 13px;
  }
}

/* En Favorites.css */
.product-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.prices-with-discount {
  display: flex;
  align-items: center;
  gap: 6px;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 10px;
}

.current-price {
  color: var(--color-primario);
  font-weight: 600;
  font-size: 13px;
}

.discount-badge {
  background: var(--color-secundario);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
