/* ============================================================
   ESCUDERÍA — base compartida de la tienda y el panel (v2, 03/09)
   Dirección: "almacén editorial" — canvas cálido, tipografía con
   carácter, marca como color protagonista. Los colores de acento
   los pisa engine.js con los de config.js.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --border: #e6e2d8;
  --text: #17171a;
  --muted: #6f6f76;
  --dark: #17171a;
  --dark-2: #26262b;
  --accent: #ff4d1c;
  --accent-2: #ff9d00;
  --accent-rgb: 255, 77, 28;
  --grad: linear-gradient(100deg, #ff2d00, #ff4d1c 45%, #ff9d00);
  --ok: #178a4c;
  --warn: #b45309;
  --bad: #c62828;
  --wsp: #25d366;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23,23,26,0.04), 0 10px 30px -12px rgba(23,23,26,0.14);
  --shadow-lg: 0 20px 50px -20px rgba(23,23,26,0.28);
  --display: "Bricolage Grotesque", "Manrope", -apple-system, sans-serif;
  --body: "Manrope", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; }
::selection { background: rgba(var(--accent-rgb), 0.22); }

.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ---- barra de anuncio: tinte de marca, no negro ---- */
.announce {
  background: rgba(var(--accent-rgb), 0.10);
  color: var(--text);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
}
.announce strong { color: var(--accent); font-weight: 800; }

/* ---- header ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 28px;
  background: rgba(246,244,238,0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--accent);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 19px; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), 0.7);
}
.brand-name { font-size: 21px; line-height: 1; color: var(--text); }
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; font-weight: 700; }
.topbar .spacer { flex: 1; }

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: none; border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(var(--accent-rgb), 0.75); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(var(--accent-rgb), 0.85); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-wsp { background: var(--wsp); color: #06240f; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- badges de stock ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok   { color: var(--ok);   background: rgba(255,255,255,0.9); }
.badge-warn { color: var(--warn); background: #fff4dc; }
.badge-bad  { color: var(--bad);  background: #ffe4e1; }

/* ---- whatsapp flotante ---- */
.wsp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wsp); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px -6px rgba(37, 211, 102, 0.6);
  transition: transform 0.15s ease;
}
.wsp-float:hover { transform: scale(1.08); }
.wsp-float svg { width: 30px; height: 30px; }

/* ---- placeholders de producto con emoji ---- */
.emoji-ph { line-height: 1; }
.card-img .emoji-ph { font-size: 64px; filter: drop-shadow(0 8px 14px rgba(23,23,26,0.14)); }
.catcard-icon .emoji-ph { font-size: 26px; }
.cart-item-icon .emoji-ph, .prod-icon .emoji-ph { font-size: 22px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d2c6; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
