/* ===============================
   VARIABLES BASE – MODO ZEN
   =============================== */

:root {
  --bg: #f6f4fb;
  --panel: #ffffff;
  --text: #2e2e38;
  --muted: #6b7280;
  --primary: #b89cff;
  --secondary: #a7c7b7;
}

/* ===============================
   RESET BÁSICO
   =============================== */

* {
  box-sizing: border-box;
}

/* ===============================
   TRANSICIONES SUAVES
   =============================== */

body {
  transition: background 0.6s ease, color 0.3s ease;
}

.card,
.product,
.topbar,
.btn {
  transition: background 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===============================
   ESTILO GENERAL
   =============================== */

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial;
  background: linear-gradient(180deg, var(--bg), #ffffff);
  color: var(--text);
  line-height: 1.5;
}

/* ===============================
   TOPBAR
   =============================== */

.topbar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* TÍTULO PRINCIPAL CENTRADO */
.topbar h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;

  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;

  font-family: "Segoe UI", "Inter", system-ui, sans-serif;

  /* Color lavanda elegante */
  color: #7c6cf0;
}

/* Navegación a la derecha */
.topbar nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===============================
   CONTENEDOR
   =============================== */

.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ===============================
   TARJETAS
   =============================== */

.card {
  background: var(--panel);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ===============================
   GRID DE SESIONES
   =============================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ===============================
   TARJETA DE SESIÓN
   =============================== */

.product {
  background: #faf9fd;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
}

.product h4 {
  margin: 0 0 0.4rem;
}

.descripcion {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.4rem 0 0.7rem;
  line-height: 1.4;
}

.price {
  font-weight: 700;
  color: var(--primary);
}

/* ===============================
   BOTONES
   =============================== */

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.btn-secondary {
  background: var(--secondary);
  color: #1f2937;
}

.btn:hover {
  filter: brightness(1.05);
}

/* ===============================
   LISTAS Y CARRITO
   =============================== */

.list {
  list-style: none;
  padding-left: 0;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}


.cart-summary {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
}

/* ===============================
   INPUT BUSCADOR
   =============================== */

.input {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: var(--text);
}

/* ===============================
   PREFERENCIAS
   =============================== */

#formPreferencias label {
  display: block;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

#mensajePreferencias {
  margin-top: 1rem;
  color: var(--muted);
  font-style: italic;
}

/* ===============================
   FOOTER
   =============================== */

.footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

/* ===============================
   MODO ACTIVO
   =============================== */

body[data-tema="activo"] {
  --bg: #e6f4ff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #88c2db;
  --secondary: #8ac7a1;
}

/* ===============================
   INDICADOR DE TEMA
   =============================== */

#indicadorTema {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}
