.list-products-main {
  position: relative;
  min-height: calc(100vh - 0px);
  height: 100%;
  margin-top: 1.5rem;
}

.list-products-loader {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 88px;
  left: 16rem;
  right: 0;
  bottom: 0;
  width: auto;
  min-height: 0;
  margin-left: 0;
  z-index: 45;
  pointer-events: auto;
  overflow: hidden;
}

.list-products-loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.list-products-loader > div {
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .list-products-loader {
    top: 88px;
    left: 0;
  }
}

.modern-spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid #2563eb;
  border-top: 6px solid #fff;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 32px #2563eb80;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Estilos para el botón de favorito */
.favorite-btn {
  color: #d1d5db;
  cursor: pointer;
  transition:
    color 0.2s ease,
    transform 0.1s ease;
  background: transparent;
  border: none;
  padding: 8px;
  z-index: 20;
}

.favorite-btn:hover {
  transform: scale(1.1);
  color: #9ca3af;
}

/* Cuando está activo es dorado/amarillo */
.favorite-btn.active {
  color: #f59e0b;
}

/* El SVG hereda el color del texto  */
.favorite-btn svg {
  fill: currentColor;
  stroke: none;
  width: 28px;
  height: 28px;
}
/* Contenedor de toasts (abajo a la derecha) */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

/* Toast */
.toast {
  padding: 16px 24px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.4s ease-out forwards;
}

.toast.success {
  background: rgba(16, 185, 129, 0.9);
}

.toast.error {
  background: #f59e0b;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(50px);
  }
}
/* 🔥 FORZAR toast verde SIEMPRE */
/*#toast-container .toast {
  background-color: #10b981;
  color: white;
}

#toast-container .toast.success {
  background-color: #10b981;
}*/

/* Product card modern styling */
.product-card-modern {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.85) 0%,
    rgba(56, 189, 248, 0.15) 100%
  );
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-radius: 1.5rem;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    background 0.18s ease,
    border-color 0.2s ease;
}

.product-card-modern:hover {
  transform: none;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow:
    0 2px 2px rgba(190, 240, 255, 0.649),
    0 0 25px 1px rgb(92, 200, 246, 0.685);
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.748) 0%,
    rgba(82, 195, 244, 0.63) 80%,
    rgba(103, 206, 250, 0.958) 100%
  );
}

.card-hover {
  position: relative;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(37, 99, 235, 0.15) 100%
  );
  border: 2px solid rgba(37, 99, 235, 0.2);
}

.card-hover:hover {
  transform: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow:
    0 4px 10px rgba(37, 99, 235, 0.3),
    0 0 25px 1px rgba(37, 99, 235, 0.6);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(37, 99, 235, 0.6) 80%,
    rgba(59, 130, 246, 0.95) 100%
  );
}

/* Badge para productos comprados */
.purchased-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, #10b981 80%, #34d399 100%);
  color: #ffffff;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem 0.5rem 0.9rem;
  border-bottom-right-radius: 1.2rem;
  z-index: 30;
  box-shadow: 0 2px 8px #0002;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px #0004;
  border-top-left-radius: 0.5rem;
}

/* Animaciones para insertar/eliminar cards */
.card-fade-in {
  opacity: 0;
  transform: scale(0.98);
  animation: cardFadeIn 0.22s ease forwards;
}
@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Estilo personalizado para el checkbox */
.category-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #334155; /* Slate 700 */
  border-radius: 4px;
  background-color: transparent;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-checkbox::before {
  content: '';
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em #38bdf8; /* Sky 400 */
  border-radius: 1px;
}

.category-checkbox:checked {
  border-color: #38bdf8;
}

.category-checkbox:checked::before {
  transform: scale(1);
}

/* Efecto de brillo en el contenedor */
.glass-container {
  background: #0b101b;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.category-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-pill:hover {
  background-color: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

/* Estilos para la sección de opciones superior */
.options-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.option-button {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.85) 0%,
    rgba(56, 189, 248, 0.15) 100%
  );
  border: 2px solid rgba(56, 189, 248, 0.3);
  color: #e0e7ef;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.option-button:hover {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(56, 189, 248, 0.25) 100%
  );
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.option-button.active {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.3) 0%,
    rgba(139, 92, 246, 0.2) 100%
  );
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.option-label {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Aumentar espacio después del subtítulo */
#filter-subtitle {
  margin-bottom: 1.5rem;
}

#products-grid-container {
  position: relative;
  min-height: 300px;
}

#explore-products-container {
  position: relative;
  min-height: 400px;
  flex: 1;
}

#main-content {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

#dashboard-header-container {
  z-index: 50;
  min-height: 88px;
}

#dashboard-aside-container .dashboard-sidebar-top {
  min-height: 88px;
  height: 88px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

#dashboard-aside-container .dashboard-sidebar-top > div {
  min-height: 100%;
  display: flex;
  align-items: center;
}

/* === Descripción expandible en tarjetas buyer === */
.buyer-lp-desc-wrap {
  margin-bottom: 1rem;
}

.buyer-lp-desc {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 4px;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.buyer-lp-desc--expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.buyer-lp-desc-none {
  color: #6b7280;
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.buyer-lp-desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: #60a5fa;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
  margin-bottom: 0;

  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  line-height: inherit;
}

.buyer-lp-desc-toggle:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Añadir al carrito */
.add-to-cart-btn {
  background: #f59e0b;
  color: #1a1a1a;
  border: none;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.add-to-cart-btn:hover {
  background: #d97706;
}

.add-to-cart-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Mini-modal de selección de variante de precio ── */
.lp-variant-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.lp-variant-modal {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lp-variant-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  overflow-wrap: break-word;
  word-break: break-word;
}

.lp-variant-modal-label {
  font-size: 0.85rem;
  color: #94a3b8;
}

.lp-variant-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: #e2e8f0;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.lp-variant-select:focus {
  border-color: rgba(56, 189, 248, 0.5);
}

.lp-variant-select option {
  background: #1e293b;
  color: #e2e8f0;
}

.lp-variant-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.lp-variant-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.lp-variant-btn--cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.lp-variant-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lp-variant-btn--confirm {
  background: #2563eb;
  color: #fff;
}

.lp-variant-btn--confirm:hover {
  background: #1d4ed8;
}

.price-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #374151;
}

.price-action-row > .price-block {
  flex: 1 1 auto;
  min-width: 70px;
}

.price-action-row > .price-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.price-action-row::after {
  display: none;
}

body.list-products-loading #main-content,
body.list-products-loading #pagination {
  opacity: 0;
  pointer-events: none;
}

body.list-products-loading .list-products-loader {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

body.list-products-loading .list-products-loader > div {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.product-card-modern {
  position: relative;
  isolation: isolate;
}

.product-image-container {
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.price-action-row {
  z-index: 20;
}

.price-action-row > .price-action-buttons {
  position: relative;
  z-index: 30;
}

.add-to-cart-btn,
.favorite-btn,
.product-open-link {
  pointer-events: auto;
}

.add-to-cart-btn svg,
.favorite-btn svg {
  pointer-events: none;
}
