:root {
  --bg-main: #0f172a;
  --bg-card: #111827;
  --border: #1f2937;
  --primary: #8b5cf6;
  --primary-soft: rgba(139, 92, 246, 0.15);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --gradient: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

/* ===============================
   RESET BÁSICO
================================ */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
}

/* ===============================
   CANVAS / PARTÍCULAS
================================ */
#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===============================
   GRID DE PRODUCTOS
================================ */
.nx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .nx-grid {
    gap: 1rem;
  }
}

/* ===============================
   CARD DE SERVICIO
================================ */
.nx-card {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(12px);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  transform: translateY(20px) scale(0.96);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.nx-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.5);
}

.nx-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===============================
   BADGE CATEGORÍA
================================ */
.nx-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #6366f1);
  color: white;
  margin-bottom: 0.5rem;
}

/* ===============================
   BOTÓN PRINCIPAL
================================ */
.nx-btn {
  position: relative;        /* 🔥 CLAVE PARA EL CONTADOR */
  overflow: visible;         /* 🔥 NO RECORTAR BADGE */
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: var(--gradient);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nx-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* ===============================
   CONTADOR DEL CARRITO
================================ */
#cart-count {
  position: absolute;
  top: -8px;
  right: -8px;

  min-width: 20px;
  height: 20px;
  padding: 0 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 0.7rem;
  font-weight: 700;

  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;

  border-radius: 999px;
  box-shadow:
    0 0 0 2px #020617,
    0 6px 18px rgba(139, 92, 246, 0.6);

  z-index: 60;
}

/* ===============================
   FILTROS SUTILES
================================ */
.nx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.nx-filter-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid #334155;
  color: #cbd5e1;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nx-filter-btn:hover {
  border-color: var(--primary);
  color: white;
}

.nx-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===============================
   CARRITO LATERAL
================================ */
.nx-cart {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: #020617;
  padding: 1.5rem;
  z-index: 50;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.nx-cart.open {
  right: 0;
}

@media (max-width: 480px) {
  .nx-cart {
    width: 100%;
  }
}

/* ===============================
   ITEM CARRITO
================================ */
.nx-cart-item {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

/* ===============================
   ANIMACIONES
================================ */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


#particles-canvas {
  width: 100%;
  height: 100%;
  display: block;
}


