/* ============================================================
   NEXO X MARKET — Design System
   Paleta: vazio profundo + dourado de cofre + azul neon de terminal.
   Tipografia: Space Grotesk (display, futurista/geométrica) +
               Inter (corpo, alta legibilidade em painéis densos).
   Assinatura visual: "costura de circuito" — linha-divisora dourado→azul
   com pulso sutil, remetendo a terminais de trading/fintech (contexto
   real do autor: painéis de robôs de trading).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Cor */
    --void:        #08080d;   /* fundo base, quase preto */
    --panel:       #12121a;   /* painéis sólidos */
    --panel-glass: rgba(20, 20, 30, 0.62);
    --border-glass: rgba(212, 175, 55, 0.16);
    --gold:        #d4af37;
    --gold-bright: #f2cf5b;
    --neon:        #00d9ff;
    --neon-deep:   #0072ff;
    --text-hi:     #f5f5f9;
    --text-mid:    #b9b9c6;
    --text-low:    #75758a;
    --success:     #35d68f;
    --danger:      #ff5c72;

    /* Tipografia */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --radius: 14px;
    --radius-sm: 8px;
    --max-w: 1360px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--void);
    background-image:
        radial-gradient(circle at 12% 8%, rgba(0, 217, 255, 0.07), transparent 40%),
        radial-gradient(circle at 88% 92%, rgba(212, 175, 55, 0.08), transparent 45%);
    color: var(--text-hi);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--neon);
    outline-offset: 2px;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Assinatura: costura de circuito ---------- */
.circuit-seam {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--neon) 55%, transparent 85%);
    opacity: 0.55;
    position: relative;
    overflow: hidden;
}
.circuit-seam::after {
    content: '';
    position: absolute;
    top: 0; left: -30%;
    width: 30%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    animation: seam-pulse 4.5s ease-in-out infinite;
}
@keyframes seam-pulse {
    0%   { left: -30%; }
    60%  { left: 130%; }
    100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .circuit-seam::after { animation: none; display: none; }
}

/* ---------- Cabeçalho ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(8, 8, 13, 0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-glass);
}
.topbar-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.logo {
    font-family: var(--font-display); font-weight: 700; font-size: 22px;
    display: flex; align-items: baseline; gap: 2px; white-space: nowrap;
}
.logo .x { color: var(--gold); }
.logo .market { color: var(--neon); font-size: 13px; letter-spacing: 0.14em; font-weight: 600; margin-left: 6px; }

.search-bar {
    flex: 1; min-width: 220px;
    display: flex; align-items: center; gap: 10px;
    background: var(--panel-glass);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    padding: 10px 18px;
    transition: border-color .2s, box-shadow .2s;
}
.search-bar:focus-within {
    border-color: var(--neon);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.12);
}
.search-bar input {
    flex: 1; background: transparent; border: none; color: var(--text-hi);
    font-size: 14px; outline: none;
}
.search-bar input::placeholder { color: var(--text-low); }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    position: relative;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel-glass); border: 1px solid var(--border-glass);
    color: var(--text-mid); transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--gold-bright); border-color: var(--gold); }
.icon-btn .badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--neon); color: #001018;
    font-size: 10px; font-weight: 700; line-height: 1;
    padding: 3px 5px; border-radius: 999px;
}

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 14px; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.btn:active { transform: scale(0.97); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #1a1305;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover { box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4); }

.btn-neon {
    background: transparent; color: var(--neon); border-color: rgba(0, 217, 255, 0.4);
}
.btn-neon:hover { background: rgba(0, 217, 255, 0.08); border-color: var(--neon); }

.btn-ghost {
    background: var(--panel-glass); color: var(--text-hi); border-color: var(--border-glass);
}
.btn-ghost:hover { border-color: var(--text-mid); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Categorias (nav) ---------- */
.categories-nav {
    display: flex; gap: 22px; overflow-x: auto; padding: 12px 24px;
    max-width: var(--max-w); margin: 0 auto;
    scrollbar-width: none;
}
.categories-nav::-webkit-scrollbar { display: none; }
.categories-nav a {
    font-size: 13.5px; color: var(--text-mid); white-space: nowrap;
    padding-bottom: 4px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.categories-nav a:hover { color: var(--gold-bright); border-color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
    padding: 56px 24px 40px;
    max-width: var(--max-w); margin: 0 auto;
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 32px; } }

.hero-eyebrow {
    font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--neon); font-weight: 600; margin-bottom: 14px;
}
.hero h1 {
    font-size: clamp(32px, 5vw, 52px); line-height: 1.06;
    background: linear-gradient(120deg, #fff 30%, var(--gold-bright) 65%, var(--neon) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-mid); font-size: 16px; margin-top: 18px; max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-visual {
    position: relative; aspect-ratio: 1/1; border-radius: 24px;
    background: linear-gradient(155deg, rgba(212,175,55,0.14), rgba(0,217,255,0.10));
    border: 1px solid var(--border-glass);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.hero-visual::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255,255,255,0.025) 18px 19px);
}
.hero-orb {
    width: 62%; aspect-ratio: 1/1; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.5), var(--gold) 35%, var(--neon-deep) 100%);
    filter: blur(0.5px);
    box-shadow: 0 0 80px rgba(0, 217, 255, 0.35), 0 0 120px rgba(212, 175, 55, 0.2);
    animation: orb-float 6s ease-in-out infinite;
}
@keyframes orb-float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-14px);} }
@media (prefers-reduced-motion: reduce) { .hero-orb { animation: none; } }

/* ---------- Seções ---------- */
.section { padding: 44px 24px; max-width: var(--max-w); margin: 0 auto; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h2 { font-size: 22px; }
.section-head .see-all { font-size: 13px; color: var(--gold-bright); }

/* ---------- Grid de produtos ---------- */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
}

.product-card {
    background: var(--panel-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .18s, border-color .18s, box-shadow .18s;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}
.product-card .thumb {
    aspect-ratio: 1/1; background: #16161f;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-low); font-size: 12px; position: relative;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .fav-btn {
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(8,8,13,0.6); border: 1px solid var(--border-glass);
    display: flex; align-items: center; justify-content: center; color: var(--text-hi);
    backdrop-filter: blur(4px);
}
.product-card .fav-btn.active { color: var(--gold-bright); border-color: var(--gold); }
.badge-promo {
    position: absolute; top: 10px; left: 10px;
    background: var(--neon); color: #001018; font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 999px;
}
.product-card .info { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .store { font-size: 11.5px; color: var(--text-low); }
.product-card .name {
    font-size: 14px; font-weight: 600; color: var(--text-hi);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 36px;
}
.product-card .price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.product-card .price { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--gold-bright); }
.product-card .price-old { font-size: 12px; color: var(--text-low); text-decoration: line-through; }
.product-card .meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-low); margin-top: 2px; }

/* ---------- Cards de loja em destaque ---------- */
.store-card {
    background: var(--panel-glass); border: 1px solid var(--border-glass); border-radius: var(--radius);
    padding: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
    transition: border-color .18s, transform .18s;
}
.store-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.store-card .avatar {
    width: 64px; height: 64px; border-radius: 50%; background: #16161f;
    border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; color: var(--gold-bright);
}
.store-card .name { font-weight: 600; font-size: 14px; }
.store-card .meta { font-size: 12px; color: var(--text-low); }

/* ---------- Formulários / painéis ---------- */
.card {
    background: var(--panel); border: 1px solid var(--border-glass);
    border-radius: var(--radius); padding: 24px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--text-mid); font-weight: 500; }
.field input, .field select, .field textarea {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
    padding: 11px 13px; color: var(--text-hi); font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(0,217,255,0.1);
}
.field textarea { resize: vertical; min-height: 90px; }

/* ---------- Tabelas de painel (admin/vendedor) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-glass); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-glass); white-space: nowrap; }
th { color: var(--text-low); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill-pendente { background: rgba(212,175,55,0.15); color: var(--gold-bright); }
.pill-aprovado, .pill-ativo, .pill-ativa { background: rgba(53,214,143,0.15); color: var(--success); }
.pill-bloqueado, .pill-reprovado, .pill-suspensa { background: rgba(255,92,114,0.15); color: var(--danger); }
.pill-pausado { background: rgba(255,255,255,0.08); color: var(--text-mid); }

/* ---------- Dashboard layout (admin/vendedor/cliente) ---------- */
.dash {
    display: grid; grid-template-columns: 240px 1fr; min-height: 100vh;
}
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } .dash-side { display: none; } }
.dash-side {
    background: var(--panel); border-right: 1px solid var(--border-glass);
    padding: 24px 16px; display: flex; flex-direction: column; gap: 4px;
}
.dash-side a {
    padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-mid);
    display: flex; align-items: center; gap: 10px; transition: background .15s, color .15s;
}
.dash-side a:hover, .dash-side a.active { background: rgba(212,175,55,0.1); color: var(--gold-bright); }
.dash-main { padding: 32px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi-card { background: var(--panel-glass); border: 1px solid var(--border-glass); border-radius: var(--radius); padding: 18px; }
.kpi-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--gold-bright); }
.kpi-card .label { font-size: 12px; color: var(--text-mid); margin-top: 4px; }

/* ---------- Footer ---------- */
footer { padding: 40px 24px; text-align: center; color: var(--text-low); font-size: 12.5px; }

/* ---------- Utilidades ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-low); }
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--panel); border: 1px solid var(--gold); color: var(--text-hi);
    padding: 12px 20px; border-radius: 999px; font-size: 13.5px; z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
