/* ===== Rage Bull Pharmaceutics — preto + vermelho neon ===== */
:root {
  --bg: #060607;
  --bg-2: #0b0b0d;
  --panel: #121214;
  --panel-2: #17171a;
  --line: #2a1214;
  --line-2: #33191c;
  --text: #f4f4f6;
  --muted: #9a9aa2;
  --red: #e11414;
  --red-2: #ff2a2a;
  --red-glow: rgba(225,20,20,.55);
  --green: #22c55e;
  --amber: #f59e0b;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0,0,0,.6);
}
/* Tema azul da seção Peptídeos (RB Peps — Medicina Avançada) */
body.theme-peptideos {
  --red: #1e50c8;
  --red-2: #3b82f6;
  --red-glow: rgba(37,99,235,.5);
  --line: #10203f;
  --line-2: #17325f;
  background:
    radial-gradient(900px 500px at 50% -12%, rgba(37,99,235,.16), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(37,99,235,.07), transparent 55%),
    var(--bg);
}
body.theme-peptideos .st-confirmado { background: rgba(148,163,184,.16); color: #94a3b8; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { transition: background .3s; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 50% -12%, rgba(225,20,20,.14), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(225,20,20,.06), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* display / headings */
.display { font-family: "Oswald", "Arial Narrow", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-style: italic; }
h1, h2, h3 { margin: 0; }

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(8,8,10,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.topbar .logo img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px #3a1113, 0 0 18px var(--red-glow); }
.topbar .logo b { font-family: "Oswald", sans-serif; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 19px; letter-spacing: .5px; }
.topbar .logo b span { color: var(--red-2); }
.topnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav a { padding: 9px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .15s; text-transform: uppercase; letter-spacing: .4px; }
.topnav a:hover { color: var(--text); background: #1a1113; }
.topnav a.active { color: #fff; background: linear-gradient(90deg, var(--red), var(--red-2)); box-shadow: 0 6px 18px var(--red-glow); }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--red-2); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 10px var(--red-glow); }
.cart-count[hidden] { display: none; }
.menu-btn { display: none; background: #1a1113; border: 1px solid var(--line-2); color: var(--text); font-size: 18px; border-radius: 9px; padding: 7px 11px; margin-left: auto; }

/* ===== Layout ===== */
main { max-width: 1120px; margin: 0 auto; padding: 34px 24px 80px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pill-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red-2); border: 1px solid var(--line-2); background: rgba(225,20,20,.06); padding: 5px 12px; border-radius: 999px; }

/* ===== Hero (home) ===== */
.hero { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); margin-bottom: 34px; box-shadow: var(--shadow); }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .34; filter: saturate(1.1) contrast(1.05); }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,6,7,.55), rgba(6,6,7,.92)); }
.hero .inner { position: relative; padding: 64px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.hero h1 { font-family: "Oswald", sans-serif; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: clamp(34px, 6vw, 60px); line-height: .98; letter-spacing: 1px; text-shadow: 0 0 26px var(--red-glow); }
.hero h1 span { color: var(--red-2); }
.hero p { max-width: 620px; color: #cfcfd6; font-size: 15.5px; line-height: 1.6; margin: 0; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ===== Category cards (home) ===== */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.cat-card { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel), var(--bg-2)); padding: 32px 28px; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; cursor: pointer; transition: .18s; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 200px at 85% -20%, rgba(225,20,20,.25), transparent 60%); pointer-events: none; }
.cat-card:hover { transform: translateY(-4px); border-color: var(--red); box-shadow: 0 24px 60px rgba(225,20,20,.16); }
.cat-card .k { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--red-2); font-weight: 800; }
.cat-card h2 { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; font-size: 32px; letter-spacing: .5px; }
.cat-card p { color: var(--muted); font-size: 13.5px; margin: 0; max-width: 90%; }
.cat-card .go { margin-top: 10px; font-weight: 700; color: #fff; font-size: 13px; }

/* trust strip */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 12px; }
.trust .t { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 18px; }
.trust .t b { display: block; font-size: 14px; margin-bottom: 3px; }
.trust .t span { color: var(--muted); font-size: 12.5px; }

/* ===== Category hero (catalog pages) ===== */
.cat-hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); margin-bottom: 24px; box-shadow: var(--shadow); }
.cat-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .4; }
.cat-hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,6,7,.5), rgba(6,6,7,.9)); }
.cat-hero .inner { position: relative; padding: 40px 32px; }
.cat-hero h1 { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; font-size: clamp(30px, 5vw, 46px); letter-spacing: 1px; text-shadow: 0 0 24px var(--red-glow); margin-top: 8px; }
.cat-hero p { color: #cfcfd6; max-width: 560px; font-size: 14px; line-height: 1.6; margin: 8px 0 0; }

/* group headers within a catalog */
.group-head { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 14px; }
.group-head span:first-child { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; font-size: 19px; letter-spacing: .5px; color: var(--red-2); }
.group-head .count { font-size: 12px; color: var(--muted); }
.group-head::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ===== Page head ===== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; font-size: 30px; letter-spacing: .5px; }
.page-head h1 span { color: var(--red-2); }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ===== Product grid ===== */
.search { max-width: 320px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.prod {
  position: relative; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: .16s;
}
.prod:hover { border-color: var(--line-2); box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.prod .thumb { height: 96px; border-radius: 10px; background: radial-gradient(120px 80px at 50% 20%, rgba(225,20,20,.22), transparent 60%), #0e0e10; display: grid; place-items: center; border: 1px solid var(--line); overflow: hidden; }
.prod .thumb.has-img { height: 168px; background: #fff; padding: 10px; }
.prod .thumb.has-img img { width: 100%; height: 100%; object-fit: contain; }
.prod .name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.prod .unit { font-size: 12px; color: var(--muted); }
.code { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 11px; letter-spacing: .04em; color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); border: 1px solid color-mix(in srgb, var(--red) 32%, transparent); }
td .code { margin-left: 0; }
.prod .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prod .price { font-family: "Oswald", sans-serif; font-style: italic; font-size: 20px; color: #fff; }
.prod .qtybox { display: flex; align-items: center; gap: 8px; }

/* ===== Buttons / inputs ===== */
button, .btn {
  border: none; border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 800;
  cursor: pointer; background: linear-gradient(90deg, var(--red), var(--red-2)); color: #fff;
  transition: .15s; text-transform: uppercase; letter-spacing: .5px; font-family: "Oswald", sans-serif; font-style: italic;
  box-shadow: 0 6px 18px rgba(225,20,20,.25);
}
button:hover, .btn:hover { filter: brightness(1.09); box-shadow: 0 8px 24px var(--red-glow); }
button.ghost { background: #1a1113; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; font-style: normal; letter-spacing: .3px; }
button.ghost:hover { border-color: var(--red); box-shadow: none; }
button.dark { background: #17171a; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
button.sm { padding: 7px 12px; font-size: 12px; }
button.danger { background: #221012; color: #ff8b8b; border: 1px solid #4a1a1e; box-shadow: none; font-style: normal; }
button.block { width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; box-shadow: none; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.stepper button { background: #17171a; color: var(--text); border: none; border-radius: 0; padding: 6px 11px; font-size: 15px; box-shadow: none; font-style: normal; }
.stepper button:hover { background: #241416; box-shadow: none; }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; font-size: 14px; }
input, select {
  background: #0e0e10; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text);
  padding: 11px 13px; font-size: 14px; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,20,20,.12); }
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; font-weight: 600; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.field { flex: 1; min-width: 150px; }

/* ===== Panels / tables ===== */
.panel { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; font-size: 17px; margin-bottom: 14px; letter-spacing: .4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
td { padding: 12px; border-bottom: 1px solid #1c1416; }
tbody tr:last-child td { border-bottom: none; }
.right { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 34px 0; }

/* stats */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .v { font-family: "Oswald", sans-serif; font-style: italic; font-size: 26px; }
.stat .l { color: var(--muted); font-size: 12px; margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }
.stat .v.red { color: var(--red-2); } .stat .v.green { color: var(--green); }

/* badges */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.st-pendente { background: rgba(245,158,11,.16); color: #fbbf24; }
.st-confirmado { background: rgba(56,189,248,.16); color: #38bdf8; }
.st-enviado { background: rgba(168,85,247,.18); color: #c084fc; }
.st-entregue { background: rgba(34,197,94,.16); color: #4ade80; }
.st-cancelado { background: rgba(148,163,184,.16); color: #94a3b8; }

/* cart */
.cart-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #1c1416; }
.cart-line:last-child { border-bottom: none; }
.cart-line .ci { width: 46px; height: 46px; border-radius: 9px; background: radial-gradient(60px 40px at 50% 20%, rgba(225,20,20,.25), transparent), #0e0e10; display: grid; place-items: center; border: 1px solid var(--line); flex: none; }
.cart-line .ci img { width: 26px; height: 26px; filter: drop-shadow(0 0 8px var(--red-glow)); }
.cart-line .ci.has-img { background: #fff; overflow: hidden; }
.cart-line .ci.has-img img { width: 100%; height: 100%; object-fit: contain; filter: none; padding: 3px; }

/* admin: mini thumbnail + preview no modal */
.mini-thumb { width: 40px; height: 40px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 20px; background: #0e0e10; overflow: hidden; }
.mini-thumb.has-img { background: #fff; }
.mini-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.img-preview { width: 88px; height: 88px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; background: #fff; overflow: hidden; text-align: center; }
.img-preview img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.img-preview .hint { color: #666; }
.cart-line .grow { flex: 1; min-width: 0; }
.summary { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary.total { font-family: "Oswald", sans-serif; font-style: italic; font-size: 22px; border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 14px; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--line-2); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #2a2a2e; border: 2px solid var(--bg); }
.timeline li.done::before { background: var(--red-2); box-shadow: 0 0 10px var(--red-glow); }
.timeline li .ts { font-size: 12px; color: var(--muted); }
.timeline li b { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; font-size: 14px; letter-spacing: .4px; }

/* auth */
.auth-wrap { min-height: 70vh; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line-2); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card .logo { display: grid; place-items: center; margin-bottom: 8px; }
.auth-card .logo img { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 1px #3a1113, 0 0 26px var(--red-glow); }
.auth-card h1 { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; text-align: center; font-size: 24px; margin: 8px 0 2px; }
.auth-toggle { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-toggle a { color: var(--red-2); cursor: pointer; font-weight: 700; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.err { color: #ff8b8b; font-size: 13px; min-height: 16px; }

/* Pix + comprovante */
.pix-box { border: 1px solid var(--line-2); border-radius: 12px; background: rgba(225,20,20,.05); padding: 16px; margin-top: 16px; }
.pix-head { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.pix-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pix-key { font-weight: 700; font-size: 15px; word-break: break-all; margin-top: 3px; }
.pix-ok { margin-top: 12px; color: #4ade80; font-weight: 700; font-size: 13.5px; }
.proof-thumb { display: block; margin-top: 6px; max-width: 160px; max-height: 200px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; }

/* code box */
.code-box { text-align: center; padding: 26px; border: 1px dashed var(--line-2); border-radius: 14px; background: rgba(225,20,20,.05); }
.code-box .code { font-family: "Oswald", sans-serif; font-style: italic; font-size: 34px; letter-spacing: 3px; color: var(--red-2); text-shadow: 0 0 18px var(--red-glow); }

/* modal */
#modal-root:empty { display: none; }
.modal-bg { position: fixed; inset: 0; background: rgba(4,4,6,.78); display: flex; align-items: flex-start; justify-content: center; z-index: 60; padding: 20px; overflow-y: auto; }
.modal { width: 100%; max-width: 460px; margin: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.modal h2 { font-family: "Oswald", sans-serif; font-style: italic; text-transform: uppercase; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; padding: 26px 20px 40px; line-height: 1.7; }
.foot .warn { color: #d18; opacity: .8; max-width: 620px; margin: 8px auto 0; }

/* WhatsApp floating button */
#wa-fab { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; z-index: 55; box-shadow: 0 8px 24px rgba(37,211,102,.4); transition: transform .15s, box-shadow .15s; }
#wa-fab:hover { transform: scale(1.07); box-shadow: 0 10px 30px rgba(37,211,102,.55); }
#wa-fab svg { display: block; }
@media (max-width: 820px) { #wa-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; } }

/* drawer (mobile nav) — overlay ABAIXO do topbar (z-index 40), senão cobre o menu
   (o nav vive dentro do topbar, que cria stacking context; overlay precisa ficar abaixo dele) */
.overlay { display: none; position: fixed; inset: 0; background: rgba(4,4,6,.6); z-index: 38; }
.overlay.show { display: block; }
body.drawer-open #wa-fab { display: none; }

@media (max-width: 820px) {
  .topnav { position: fixed; top: 0; right: 0; bottom: 0; width: 250px; flex-direction: column; align-items: stretch; gap: 6px; background: #0c0c0e; border-left: 1px solid var(--line-2); padding: 76px 16px 20px; margin: 0; transform: translateX(100%); transition: transform .2s; z-index: 46; }
  .topnav.open { transform: translateX(0); }
  .topnav a { padding: 13px 14px; }
  .menu-btn { display: block; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero .inner { padding: 44px 22px; }
  table { min-width: 520px; }
  .panel { overflow-x: auto; }
}
