/* ============================================================
   RunDF Night — Loja de Bebidas (main.css)
   Tema neon noturno — preto + magenta + ciano (cores da logo)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #05060f;
  --bg-soft: #0a0c1d;
  --card: #12152b;
  --surface: #05060f;
  --text: #f2f4ff;
  --muted: #8b93b8;
  --line: rgba(0, 229, 255, 0.14);
  --neon-pink: #ff2bd6;
  --neon-pink-soft: rgba(255, 43, 214, 0.16);
  --neon-cyan: #00e5ff;
  --neon-cyan-soft: rgba(0, 229, 255, 0.12);
  --brand: #ff2bd6;
  --brand-dark: #ff2bd6;
  --accent: #00e5ff;
  --success: #22e584;
  --danger: #ff4d6d;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(255, 43, 214, 0.12);
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.5);
  --max: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

a, button, input, select, textarea, .pill, .card { -webkit-tap-highlight-color: transparent; }
a:focus, button:focus, input:focus, select:focus { outline: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 2px; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1000px 400px at 10% -5%, rgba(255, 43, 214, 0.08), transparent),
    radial-gradient(900px 380px at 95% 0%, rgba(0, 229, 255, 0.07), transparent),
    var(--surface);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Hero / Header ---------- */
.hero {
  background:
    radial-gradient(700px 260px at 12% 0%, rgba(255, 43, 214, 0.28), transparent),
    radial-gradient(700px 260px at 88% 10%, rgba(0, 229, 255, 0.22), transparent),
    linear-gradient(180deg, #070818 0%, #0b0d24 100%);
  color: #fff;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  border-bottom: 1px solid rgba(255, 43, 214, 0.25);
  box-shadow: 0 8px 40px rgba(255, 43, 214, 0.12);
}

.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #000;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 2px var(--neon-pink), 0 0 18px rgba(255, 43, 214, 0.65), 0 0 34px rgba(0, 229, 255, 0.3);
}

.brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand__sub { font-size: 0.8rem; color: #aab1d6; font-weight: 500; }

/* ---------- Toolbar ---------- */
.toolbar {
  max-width: var(--max);
  margin: -22px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.toolbar__card {
  background: rgba(18, 21, 43, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 43, 214, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.toolbar__row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
}
@media (max-width: 640px) { .toolbar__row { grid-template-columns: 1fr; } }

.search, .select {
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: #0a0c1d;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  font-family: inherit;
}
.search::placeholder { color: #5d6589; }
.search:focus, .select:focus { border-color: var(--neon-pink); box-shadow: 0 0 0 3px rgba(255, 43, 214, 0.15); }
.select option { background: #0a0c1d; }

.pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }

.pill {
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: transparent;
  color: #c6ccea;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
  font-family: inherit;
}
.pill:hover { transform: translateY(-1px); border-color: var(--neon-pink); color: #fff; box-shadow: 0 0 14px rgba(255, 43, 214, 0.35); }
.pill--active {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  color: #060714;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.5);
}

.result-count { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

/* ---------- Grid ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 22px 20px 40px; width: 100%; flex: 1; }

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

.card {
  background: linear-gradient(180deg, #14173a 0%, #0e1128 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 229, 255, 0.12);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 43, 214, 0.45);
  box-shadow: 0 12px 40px rgba(255, 43, 214, 0.22);
}
.card--unavailable { opacity: 0.65; filter: saturate(0.6); }

.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(5, 6, 15, 0.78);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 229, 255, 0.4);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.badge--off {
  top: auto;
  bottom: 12px;
  color: #fff;
  background: rgba(255, 77, 109, 0.85);
  border-color: transparent;
}
/* Selos do canto direito (INDISPONÍVEL + OFERTA) lado a lado */
.badges-right {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.badges-right .badge { position: static; }

.card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.card__volume { font-size: 0.8rem; color: var(--neon-cyan); font-weight: 700; margin-top: 2px; }
.card__desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Promoção ---------- */
.badge--promo {
  color: #060714;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  border: none;
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.6);
}
.card--promo { border-color: rgba(255, 43, 214, 0.5); box-shadow: 0 12px 44px rgba(255, 43, 214, 0.25); }
.price-wrap { display: flex; flex-direction: column; gap: 2px; }
.old-price { font-size: 0.85rem; color: var(--muted); text-decoration: line-through; }
.price--promo { font-size: 1.45rem; }

.empty {
  grid-column: 1 / -1;
  background: rgba(18, 21, 43, 0.9);
  border: 1px dashed rgba(255, 43, 214, 0.35);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
}
.empty__title { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; color: #fff; }
.empty__text { color: var(--muted); font-size: 0.92rem; }
.empty__text code { color: var(--neon-cyan); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255, 43, 214, 0.18);
  background: #070818;
  padding: 18px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Toast ---------- */
#app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #14173a;
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 50;
  max-width: min(90vw, 420px);
  text-align: center;
}
#app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#app-toast[data-type='error'] { background: #3a0f22; border-color: var(--danger); }
#app-toast[data-type='success'] { background: #0a2e1f; border-color: var(--success); }
