/* Base compartida por la tienda y el panel: tokens, reset, botones, íconos de servicio. */

:root {
  color-scheme: dark;
  --bg: #08080d;
  --bg-2: #0e0e15;
  --surface: #13131c;
  --surface-2: #1a1a25;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f2f2f6;
  --muted: #a0a0b4;
  --dim: #6c6c82;
  --accent: #c6ff34;
  --accent-hover: #d6ff6b;
  --ink: #0a0a0f;
  --violet: #8466ff;
  --ok: #3ddc84;
  --warn: #ffb547;
  --danger: #ff6b6b;
  --wa: #25d366;

  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ico { width: 20px; height: 20px; flex: none; }
[data-icono] { display: contents; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--display); font-weight: 800;
  font-size: 21px; letter-spacing: -0.02em; white-space: nowrap;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 6px 22px -6px rgba(198, 255, 52, 0.55);
}
.logo-mark svg { width: 19px; height: 19px; }
.logo b { color: var(--accent); font-weight: 800; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04); }
.btn-dark { background: var(--ink); color: var(--text); }
.btn-dark:hover { background: #1c1c26; }
.btn-danger { background: transparent; border-color: rgba(255, 107, 107, 0.4); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.1); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-icon {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.btn-icon:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.04); }
.btn-icon:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-icon .ico { width: 18px; height: 18px; }

/* ---------- Ícono de cada servicio (color de marca + sigla o logo) ---------- */
.tile {
  --tile-fs: 18px;
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 15px; overflow: hidden;
  background: linear-gradient(140deg, var(--brand), var(--brand-2, var(--brand)));
  color: var(--brand-ink, #fff);
  font-family: var(--display); font-weight: 800; font-size: var(--tile-fs);
  letter-spacing: -0.03em; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 26px -12px var(--brand);
}
.tile[data-len="3"] { font-size: calc(var(--tile-fs) * 0.8); letter-spacing: -0.05em; }
.tile[data-len="4"] { font-size: calc(var(--tile-fs) * 0.66); letter-spacing: -0.05em; }
.tile--logo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Campos de formulario ---------- */
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field small { font-weight: 500; color: var(--dim); }
.input {
  width: 100%; height: 46px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2);
  padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198, 255, 52, 0.14); }
.input::placeholder { color: var(--dim); }

/* ---------- Aviso flotante ---------- */
.toast {
  position: fixed; left: 50%; top: calc(var(--header-h) + 14px); z-index: 80;
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px;
  background: var(--text); color: var(--ink); font-weight: 700; font-size: 14.5px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.toast .ico { width: 18px; height: 18px; }

/* iPhone hace zoom al enfocar campos con letra menor a 16px */
@media (max-width: 720px), (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
