/* =============================
   💜 DSM API — Tech Purple–Orange
============================= */
:root {
  --bg: #0d0b16;
  --card: #1a1528;
  --primary: #8b5cf6;
  --accent: #f97316;
  --highlight: #ec4899;
  --text: #e9e9f4;
  --muted: #a1a1aa;
  --success: #22c55e;
  --danger: #f43f5e;
}

body {
  margin: 0;
  font-family: 'Inter', 'Poppins', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: 0.2s;
}
a:hover {
  color: var(--accent);
}


main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.08);
  transition: 0.25s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.2);
}

button, .btn {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}
button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

input, select {
  background: #100d1e;
  border: 1px solid #312450;
  color: var(--text);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  width: 100%;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
}

.alert {
  background: var(--danger);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.notice {
  background: var(--success);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* =============================
   💜 LOGIN - DSM API STYLE
============================= */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.3), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.25), transparent 60%),
              linear-gradient(135deg, #0d0b16 0%, #1a1528 100%);
  background-attachment: fixed;
}

.login-card {
  background: rgba(26, 21, 40, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
.login-card:hover {
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.2);
  transform: translateY(-3px);
}

.login-card h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.login-card p {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.login-card form label {
  text-align: left;
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.login-card input {
  background: #100d1e;
  border: 1px solid #2f2647;
  color: var(--text);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  width: 100%;
  margin-bottom: 1rem;
  transition: all 0.25s ease;
}
.login-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  outline: none;
}

.login-card button {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 0.5rem;
  transition: transform 0.2s, box-shadow 0.3s;
}
.login-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.login-footer {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.login-footer a {
  color: var(--accent);
  font-weight: 500;
}
.login-footer a:hover {
  color: var(--primary);
}
/* =============================
   💜 DSM API — SERVICIOS (Balanced Style)
============================= */

/* --- GRID --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.8rem;
  width: 100%;
  max-width: 1400px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

/* --- TARJETA --- */
.service-card {
  background: linear-gradient(180deg, #1a1528 0%, #110e1f 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.25);
}

/* --- IMAGEN --- */
.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #100d1e;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  transition: transform 0.4s ease;
}

.service-card:hover img {
  transform: scale(1.05);
}

/* --- CONTENIDO --- */
.service-info {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.service-info h2 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.service-info p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.7rem;
}

.service-info .details {
  margin-top: auto;
}

.service-info .details p {
  color: var(--text);
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

.service-info .details strong {
  color: var(--primary);
  margin-left: 0.3rem;
}

/* --- BOTONES --- */
.service-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.service-actions form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.service-actions input[type="number"] {
  width: 2.8rem;
  text-align: center;
  border-radius: 6px;
  background: #0e0b18;
  border: 1px solid #2b2344;
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.4rem;
}

/* --- Botones unificados --- */
.service-actions .btn {
  flex: 1;
  border-radius: 8px;
  font-size: 0.9rem;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: #fff;
  font-weight: 600;
  transition: all 0.25s ease;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.service-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

/* --- Botón WhatsApp especial --- */
.service-actions .btn.whatsapp {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.service-actions .btn.whatsapp:hover {
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
}


/* ====== NAVBAR DSM (versión con triple degradado limpio) ====== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(90deg, var(--primary), var(--highlight), var(--accent));
  color: #fff;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Marca DSM */
.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
  text-decoration: none;
}

/* Sección central con enlaces */
.nav-center {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all .2s ease;
}

.nav-link:hover {
  color: var(--bg);
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

/* Usuario a la derecha */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: #fff;
}

.user-name {
  font-size: 0.9rem;
  opacity: 0.9;
}


/* =============================
   💜 DSM API — CARRITO DE COMPRAS
============================= */

.cart-section {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 2rem;
  background: rgba(26, 21, 40, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 18px;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.08);
  backdrop-filter: blur(10px);
}

.cart-section h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.8rem;
  text-align: center;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.cart-section i {
  color: var(--primary);
}

/* --- Carrito vacío --- */
.empty-cart {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.empty-cart p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

/* --- Tabla --- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: rgba(17, 14, 30, 0.9);
  border-radius: 12px;
  overflow: hidden;
}

.cart-table th {
  text-align: left;
  padding: 1rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(26, 21, 40, 0.9);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.cart-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  color: var(--text);
  font-size: 0.9rem;
  vertical-align: middle;
}

.cart-table tr:last-child td {
  border-bottom: none;
}

/* --- Inputs y botones dentro de tabla --- */
.qty-input {
  width: 3.5rem;
  text-align: center;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: #0d0b16;
  color: var(--text);
  padding: 0.4rem;
  font-size: 0.9rem;
  transition: 0.2s;
}

.qty-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(139, 92, 246, 0.4);
  outline: none;
}

.inline-form button {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border: none;
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.inline-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

/* --- Footer del carrito --- */
.cart-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  padding-top: 1.5rem;
}

.cart-total {
  font-size: 1.2rem;
  color: #fff;
}

.cart-total strong {
  color: var(--primary);
}

/* --- Botones principales --- */
.cart-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cart-actions .btn {
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.cart-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

/* --- Botón WhatsApp --- */
.cart-actions .btn.whatsapp {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.cart-actions .btn.whatsapp:hover {
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
}



/* .cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 999px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
} */

/* === Toast flotante inferior === */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none; /* no bloquea clics */
}

.toast {
  background: #22c55e; /* verde éxito */
  color: white;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  text-align: center;
  pointer-events: auto;
  animation: float-fade 4s ease forwards;
  display: inline-block;
  opacity: 0;
}

/* Animación de entrada/salida flotante */
@keyframes float-fade {
  0% { opacity: 0; transform: translate(-50%, 30px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 20px); }
}


/* --- Responsivo --- */
@media (max-width: 700px) {
  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3),
  .cart-table th:nth-child(4),
  .cart-table td:nth-child(4) {
    display: none;
  }

  .cart-footer {
    align-items: center;
    text-align: center;
  }

  .cart-actions {
    justify-content: center;
  }
}

