/* ===== BAZAR 3D — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg:        #06080f;
  --bg2:       #0d1120;
  --bg3:       #141929;
  --border:    #1e2a42;
  --accent:    #d4a017;
  --accent2:   #f0c040;
  --text:      #f0f0f0;
  --muted:     #7a8aaa;
  --success:   #22c55e;
  --navy:      #1a2a4a;
  --radius:    6px;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1rem;
}
.logo {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.4rem;
  color: var(--text);
  display: flex; align-items: center; gap: .5rem;
}
.logo span { color: var(--accent); }

nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { color: var(--muted); font-size: .85rem; letter-spacing: .05em; transition: color .2s; }
nav a:hover, nav a.active { color: var(--text); }

.cart-btn {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .45rem .9rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .85rem;
  transition: border-color .2s;
  display: flex; align-items: center; gap: .4rem;
}
.cart-btn:hover { border-color: var(--accent); }
.cart-badge {
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ===== HERO ===== */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.5rem;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(212,160,23,.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 60%, rgba(26,42,74,.6) 0%, transparent 70%),
    var(--bg);
  text-align: center;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); max-width: 520px; margin: 0 auto 2rem; font-size: .95rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: .85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  font-weight: 700;
  letter-spacing: .03em;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); color: #fff; }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost  { color: var(--muted); background: transparent; border-color: transparent; }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: .35rem .8rem; font-size: .78rem; }
.btn-lg { padding: .85rem 2rem; font-size: .95rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-green { background: var(--success); color: #fff; }
.btn-green:hover { filter: brightness(1.1); }

/* ===== CONTAINER / GRID ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-title {
  font-family: var(--font-head);
  font-size: 1.8rem; font-weight: 800;
  margin-bottom: 2rem;
  display: flex; align-items: center; gap: .75rem;
}
.section-title::before {
  content: '';
  display: block; width: 4px; height: 1.6rem;
  background: var(--accent); border-radius: 2px;
}

.grid-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* ===== CARD DE PRODUTO ===== */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-img {
  aspect-ratio: 1/1;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 3rem;
}
.card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.card-cat { font-size: .72rem; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.card-name { font-family: var(--font-head); font-size: 1rem; font-weight: 700; }
.card-price { font-size: 1.15rem; font-weight: 700; color: var(--accent); margin-top: auto; padding-top: .5rem; }
.card-footer { padding: .75rem 1rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; }

/* ===== BADGE ESTOQUE ===== */
.badge {
  font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .15rem .5rem; border-radius: 3px; font-weight: 700;
}
.badge-ok  { background: rgba(34,197,94,.15); color: var(--success); }
.badge-out { background: rgba(255,107,43,.12); color: var(--accent); }

/* ===== PÁGINA DE PRODUTO ===== */
.produto-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.produto-img-main {
  aspect-ratio: 1/1; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.produto-img-main img { width: 100%; height: 100%; object-fit: cover; }
.produto-info h1 { font-family: var(--font-head); font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.produto-preco { font-size: 2.2rem; font-weight: 700; color: var(--accent); margin: 1rem 0; }
.produto-desc { color: var(--muted); line-height: 1.8; margin-bottom: 1.5rem; }
.qty-control { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.qty-btn {
  width: 36px; height: 36px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius);
  cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.qty-btn:hover { border-color: var(--accent); }
.qty-val { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; min-width: 2rem; text-align: center; }

/* ===== CARRINHO / MODAL ===== */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 200; backdrop-filter: blur(4px);
}
.overlay.open { display: flex; justify-content: flex-end; }
.drawer {
  background: var(--bg2); width: 100%; max-width: 420px;
  height: 100%; overflow-y: auto;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-head h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; }
.drawer-body { flex: 1; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: flex; gap: 1rem; align-items: center;
  background: var(--bg3); border: 1px solid var(--border);
  padding: .75rem; border-radius: var(--radius);
}
.cart-item-img { width: 56px; height: 56px; background: var(--bg); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.cart-item-price { color: var(--accent); font-size: .85rem; }
.cart-item-remove { cursor: pointer; color: var(--muted); font-size: 1.2rem; transition: color .2s; }
.cart-item-remove:hover { color: var(--accent); }
.drawer-foot {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 1rem;
}
.cart-total { display: flex; justify-content: space-between; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.cart-empty { text-align: center; color: var(--muted); padding: 3rem 0; }

/* ===== FORMULÁRIO CHECKOUT ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .8rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
input, select, textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: .6rem .85rem;
  font-family: var(--font-mono);
  font-size: .9rem;
  transition: border-color .2s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--bg3); }

/* ===== ALERTAS ===== */
.alert { padding: .85rem 1rem; border-radius: var(--radius); font-size: .9rem; margin-bottom: 1rem; }
.alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: var(--success); }
.alert-error   { background: rgba(255,107,43,.1); border: 1px solid rgba(255,107,43,.3); color: var(--accent); }
.alert-info    { background: rgba(255,155,43,.1); border: 1px solid rgba(255,155,43,.3); color: var(--accent2); }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted); font-size: .82rem;
  margin-top: 4rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

/* ===== TABELA ADMIN ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .88rem; }
th { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
tr:hover td { background: var(--bg3); }

/* ===== STATUS BADGES ===== */
.status { padding: .2rem .6rem; border-radius: 3px; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.status-novo      { background: rgba(255,155,43,.15); color: var(--accent2); }
.status-pago      { background: rgba(34,197,94,.15);  color: var(--success); }
.status-producao  { background: rgba(59,130,246,.15); color: #60a5fa; }
.status-enviado   { background: rgba(168,85,247,.15); color: #c084fc; }
.status-entregue  { background: rgba(34,197,94,.2);   color: var(--success); }
.status-cancelado { background: rgba(239,68,68,.15);  color: #f87171; }

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .produto-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  nav { display: none; }
  .hero { padding: 3rem 1.5rem; }
}
