/* ============================================================
   iMercado · Design System CSS
   Estética: Marketplace Premium — Laranja vivo + Azul naval
   Fontes: Plus Jakarta Sans (display) + Lato (corpo)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Lato:ital,wght@0,300;0,400;0,700;1,400&display=swap');

:root {
  --orange:      #FF6B00;
  --orange-l:    #FF8C2A;
  --orange-d:    #E55A00;
  --orange-dim:  rgba(255,107,0,.1);
  --navy:        #1E3A5F;
  --navy-l:      #2a4f82;
  --navy-dim:    rgba(30,58,95,.1);
  --green:       #10B981;
  --green-dim:   rgba(16,185,129,.1);
  --red:         #EF4444;
  --red-dim:     rgba(239,68,68,.1);
  --yellow:      #F59E0B;
  --yellow-dim:  rgba(245,158,11,.1);

  --bg:          #F8F7F4;
  --surface:     #FFFFFF;
  --surface2:    #F3F4F6;
  --border:      #E5E7EB;
  --border-hi:   #D1D5DB;
  --text:        #111827;
  --text-dim:    #374151;
  --text-muted:  #9CA3AF;
  --text-light:  #6B7280;

  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Lato', sans-serif;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px;
  --sh:    0 1px 8px rgba(0,0,0,.08);
  --sh-md: 0 4px 20px rgba(0,0,0,.1);
  --sh-lg: 0 12px 48px rgba(0,0,0,.15);
  --sh-xl: 0 24px 80px rgba(0,0,0,.2);
  --t:     .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size:16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height:1.6; }
img  { max-width:100%; height:auto; display:block; }
a    { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--border-hi); border-radius:99px; }

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar-promo {
  background: var(--navy);
  color:#fff; text-align:center;
  padding:8px 20px;
  font-size:13px; font-weight:600;
  letter-spacing:.3px;
}
.topbar-promo a { color: var(--orange-l); }

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top:0; z-index:200;
  box-shadow: var(--sh);
}
.header-inner {
  max-width:1280px; margin:0 auto;
  display:flex; align-items:center;
  gap:16px; padding:14px 20px;
}
.brand {
  display:flex; align-items:center; gap:10px;
  flex-shrink:0;
}
.brand-icon {
  width:42px; height:42px;
  background: linear-gradient(135deg, var(--orange), #ff9a3c);
  border-radius:12px;
  display:grid; place-items:center;
  font-size:22px;
}
.brand-name {
  font-family: var(--font-head);
  font-size:24px; font-weight:900;
  color: var(--navy);
}
.brand-name span { color: var(--orange); }

.search-bar {
  flex:1; display:flex;
  background: var(--surface2);
  border:2px solid var(--border);
  border-radius: var(--r-xl);
  overflow:hidden;
  transition: var(--t);
  max-width:640px;
}
.search-bar:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
  background:#fff;
}
.search-input {
  flex:1; padding:12px 16px;
  border:none; background:transparent;
  font-family: var(--font-body); font-size:15px;
  color: var(--text); outline:none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding:0 20px;
  background: var(--orange);
  border:none; cursor:pointer;
  color:#fff; font-size:18px;
  transition: var(--t);
}
.search-btn:hover { background: var(--orange-d); }

.header-actions {
  display:flex; align-items:center; gap:10px;
  flex-shrink:0;
}
.hbtn {
  display:flex; flex-direction:column; align-items:center;
  gap:2px; padding:8px 12px;
  border-radius: var(--r);
  cursor:pointer; border:none;
  background:transparent; color: var(--text-dim);
  font-family: var(--font-body); font-size:11px; font-weight:600;
  transition: var(--t);
  position:relative; white-space:nowrap;
}
.hbtn:hover { background: var(--orange-dim); color: var(--orange); }
.hbtn-icon { font-size:22px; }
.cart-badge {
  position:absolute; top:4px; right:6px;
  background: var(--orange); color:#fff;
  width:18px; height:18px; border-radius:50%;
  font-size:10px; font-weight:800;
  display:grid; place-items:center;
}

/* ── NAVBAR CATEGORIAS ──────────────────────────────────────── */
.cat-nav {
  background: var(--navy);
  overflow-x:auto; scrollbar-width:none;
}
.cat-nav::-webkit-scrollbar { display:none; }
.cat-nav-inner {
  max-width:1280px; margin:0 auto;
  display:flex; align-items:center;
  padding:0 20px;
}
.cat-link {
  display:flex; align-items:center; gap:6px;
  padding:12px 16px;
  color:rgba(255,255,255,.8);
  font-size:13px; font-weight:600;
  white-space:nowrap;
  border-bottom:3px solid transparent;
  transition: var(--t);
  cursor:pointer; border:none; background:none;
}
.cat-link:hover, .cat-link.active {
  color:#fff;
  border-bottom-color: var(--orange);
  background: rgba(255,255,255,.08);
}

/* ── CONTAINER ──────────────────────────────────────────────── */
.container { max-width:1280px; margin:0 auto; padding:0 20px; }

/* ── HERO / BANNER ──────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2a4f82 100%);
  border-radius: var(--r-xl);
  margin:24px auto; max-width:1280px; padding:0 20px;
  overflow:hidden; position:relative;
  min-height:320px;
  display:flex; align-items:center;
}
.hero-content { position:relative; z-index:2; padding:48px; max-width:520px; }
.hero-tag {
  display:inline-flex; align-items:center; gap:6px;
  background: var(--orange-dim);
  border:1px solid rgba(255,107,0,.3);
  color: var(--orange-l);
  padding:5px 12px; border-radius:99px;
  font-size:12px; font-weight:700;
  letter-spacing:.5px; text-transform:uppercase;
  margin-bottom:16px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size:clamp(28px,4vw,48px);
  font-weight:900; color:#fff; line-height:1.15;
  margin-bottom:16px;
}
.hero h1 span { color: var(--orange-l); }
.hero p { color: rgba(255,255,255,.75); font-size:16px; margin-bottom:28px; }
.hero-bg {
  position:absolute; right:0; top:0; bottom:0; width:45%;
  background: linear-gradient(90deg,var(--navy),transparent);
  display:flex; align-items:center; justify-content:center;
  font-size:180px; opacity:.15;
}

/* ── SEÇÃO ──────────────────────────────────────────────────── */
.section { padding:36px 0; }
.section-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:24px;
}
.section-title {
  font-family: var(--font-head);
  font-size:22px; font-weight:800; color: var(--navy);
  display:flex; align-items:center; gap:10px;
}
.section-title::after {
  content:''; display:block;
  width:40px; height:3px;
  background: var(--orange);
  border-radius:99px;
  margin-left:4px;
}
.ver-todos {
  font-size:13px; font-weight:700; color: var(--orange);
  display:flex; align-items:center; gap:4px;
  cursor:pointer;
}
.ver-todos:hover { color: var(--orange-d); text-decoration:underline; }

/* ── CATEGORIAS GRID ────────────────────────────────────────── */
.cats-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(110px,1fr));
  gap:14px;
}
.cat-card {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--r-lg);
  padding:20px 12px;
  text-align:center;
  cursor:pointer;
  transition: var(--t);
  border-top:3px solid transparent;
}
.cat-card:hover {
  transform:translateY(-3px);
  box-shadow: var(--sh-md);
  border-top-color: var(--orange);
}
.cat-card-icon { font-size:32px; margin-bottom:8px; }
.cat-card-name {
  font-size:12px; font-weight:700;
  color: var(--text-dim); line-height:1.3;
}

/* ── PRODUTO CARD ───────────────────────────────────────────── */
.products-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap:16px;
}
.prod-card {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--r-lg);
  overflow:hidden;
  transition: var(--t);
  position:relative;
  display:flex; flex-direction:column;
}
.prod-card:hover { box-shadow: var(--sh-md); transform:translateY(-3px); }

.prod-badges {
  position:absolute; top:10px; left:10px;
  display:flex; flex-direction:column; gap:4px; z-index:2;
}
.prod-badge {
  padding:3px 8px; border-radius:99px;
  font-size:10px; font-weight:800;
  letter-spacing:.3px; text-transform:uppercase;
}
.badge-oferta { background: var(--red); color:#fff; }
.badge-novo   { background: var(--green); color:#fff; }
.badge-org    { background: #4CAF50; color:#fff; }

.prod-fav {
  position:absolute; top:10px; right:10px; z-index:2;
  width:32px; height:32px;
  background:#fff; border-radius:50%;
  display:grid; place-items:center;
  cursor:pointer; border:none;
  box-shadow: var(--sh); font-size:16px;
  transition: var(--t);
}
.prod-fav:hover { transform:scale(1.15); }
.prod-fav.active { color: var(--red); }

.prod-img {
  height:180px;
  background: var(--surface2);
  display:flex; align-items:center; justify-content:center;
  font-size:72px;
  overflow:hidden;
}
.prod-img img { width:100%; height:100%; object-fit:cover; }

.prod-info { padding:14px; flex:1; display:flex; flex-direction:column; }
.prod-cat  { font-size:10px; font-weight:700; color: var(--orange); text-transform:uppercase; letter-spacing:.5px; margin-bottom:4px; }
.prod-name { font-size:14px; font-weight:700; color: var(--text); line-height:1.4; margin-bottom:8px; flex:1; }
.prod-rating {
  display:flex; align-items:center; gap:4px;
  font-size:11px; color: var(--text-muted); margin-bottom:8px;
}
.stars { color: var(--yellow); }
.prod-price { margin-bottom:12px; }
.prod-price-de {
  font-size:12px; color: var(--text-muted);
  text-decoration:line-through;
}
.prod-price-por {
  font-family: var(--font-head);
  font-size:20px; font-weight:800; color: var(--orange);
}
.prod-price-parcela { font-size:11px; color: var(--text-muted); }

.add-cart {
  width:100%; padding:10px;
  background: var(--orange);
  color:#fff; border:none; border-radius: var(--r);
  font-family: var(--font-body); font-size:13px; font-weight:700;
  cursor:pointer; transition: var(--t);
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.add-cart:hover { background: var(--orange-d); }
.add-cart.added { background: var(--green); }

/* ── BOTÕES ─────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 24px; border-radius: var(--r-lg);
  font-family: var(--font-head); font-size:14px; font-weight:700;
  cursor:pointer; border:none; transition: var(--t);
  white-space:nowrap; line-height:1; text-decoration:none;
}
.btn-orange  { background: var(--orange); color:#fff; }
.btn-orange:hover  { background: var(--orange-d); box-shadow:0 4px 18px rgba(255,107,0,.35); }
.btn-navy    { background: var(--navy); color:#fff; }
.btn-navy:hover    { background: var(--navy-l); }
.btn-outline { background:transparent; color: var(--orange); border:2px solid var(--orange); }
.btn-outline:hover { background: var(--orange); color:#fff; }
.btn-white   { background:#fff; color: var(--navy); }
.btn-white:hover   { background: var(--surface2); }
.btn-green   { background: var(--green); color:#fff; }
.btn-green:hover   { background:#0d9467; }
.btn-red     { background: var(--red-dim); color: var(--red); border:1px solid rgba(239,68,68,.2); }
.btn-red:hover     { background: var(--red); color:#fff; }
.btn-ghost   { background: var(--surface2); color: var(--text-dim); border:1px solid var(--border); }
.btn-ghost:hover   { background: var(--border); }
.btn-sm  { padding:8px 16px; font-size:12px; border-radius:var(--r); }
.btn-full{ width:100%; justify-content:center; }
.btn-icon{ padding:10px; aspect-ratio:1; border-radius:var(--r); }
.btn:disabled { opacity:.45; cursor:not-allowed; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow:hidden;
}
.form-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-l));
  padding:32px 40px;
  text-align:center;
}
.form-header-logo {
  display:flex; align-items:center; justify-content:center;
  gap:10px; margin-bottom:16px;
}
.form-logo-icon {
  width:48px; height:48px;
  background: linear-gradient(135deg,var(--orange),#ff9a3c);
  border-radius:12px;
  display:grid; place-items:center; font-size:24px;
}
.form-logo-name {
  font-family: var(--font-head);
  font-size:26px; font-weight:900; color:#fff;
}
.form-logo-name span { color: var(--orange-l); }
.form-header h2 { font-family: var(--font-head); color:#fff; font-size:22px; font-weight:700; margin-bottom:6px; }
.form-header p  { color:rgba(255,255,255,.7); font-size:14px; }

.form-body { padding:36px 40px; }

.form-row   { display:grid; gap:16px; margin-bottom:16px; }
.cols-1 { grid-template-columns:1fr; }
.cols-2 { grid-template-columns:1fr 1fr; }
.cols-3 { grid-template-columns:1fr 1fr 1fr; }

.form-group { display:flex; flex-direction:column; gap:5px; }
.form-group.span-2 { grid-column:1/-1; }
.form-group.span-3 { grid-column:1/-1; }

.form-label {
  font-size:12px; font-weight:700; letter-spacing:.5px;
  text-transform:uppercase; color: var(--text-dim);
  display:flex; align-items:center; gap:4px;
}
.req { color: var(--orange); }

.form-input, .form-select, .form-textarea {
  background: var(--surface2);
  border:1.5px solid var(--border);
  border-radius: var(--r);
  padding:12px 14px;
  font-family: var(--font-body); font-size:14px;
  color: var(--text); outline:none;
  transition: var(--t); width:100%;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--orange);
  background:#fff;
  box-shadow:0 0 0 3px var(--orange-dim);
}
.form-input.error { border-color: var(--red); box-shadow:0 0 0 3px var(--red-dim); }
.form-textarea { resize:vertical; min-height:100px; }
.form-hint  { font-size:11px; color: var(--text-muted); }
.form-error { font-size:11px; color: var(--red); display:none; }
.form-error.show { display:block; }

.input-group { position:relative; }
.input-prefix {
  position:absolute; left:13px; top:50%; transform:translateY(-50%);
  color: var(--text-muted); font-size:14px; pointer-events:none;
}
.input-group .form-input { padding-left:36px; }
.input-suffix {
  position:absolute; right:13px; top:50%; transform:translateY(-50%);
  cursor:pointer; color: var(--text-muted); font-size:16px;
}

.form-divider {
  display:flex; align-items:center; gap:12px;
  margin:20px 0; color: var(--text-muted); font-size:13px;
}
.form-divider::before, .form-divider::after {
  content:''; flex:1; height:1px; background: var(--border);
}

.form-footer {
  background: var(--surface2);
  padding:20px 40px;
  text-align:center;
  border-top:1px solid var(--border);
  font-size:14px; color: var(--text-muted);
}
.form-footer a { color: var(--orange); font-weight:700; }
.form-footer a:hover { text-decoration:underline; }

/* ── CARD GENÉRICO ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
}
.card-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 24px;
  border-bottom:1px solid var(--border);
  background: var(--surface2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-title {
  font-family: var(--font-head);
  font-size:16px; font-weight:800; color: var(--navy);
  display:flex; align-items:center; gap:8px;
}
.card-body { padding:24px; }

/* ── BADGE ──────────────────────────────────────────────────── */
.badge {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 10px; border-radius:99px;
  font-size:11px; font-weight:700; letter-spacing:.3px;
}
.badge-success { background: var(--green-dim); color: var(--green); border:1px solid rgba(16,185,129,.2); }
.badge-danger  { background: var(--red-dim);   color: var(--red);   border:1px solid rgba(239,68,68,.2); }
.badge-warning { background: var(--yellow-dim);color: var(--yellow);border:1px solid rgba(245,158,11,.2); }
.badge-info    { background: var(--navy-dim);  color: var(--navy);  border:1px solid rgba(30,58,95,.2); }
.badge-orange  { background: var(--orange-dim);color: var(--orange);border:1px solid rgba(255,107,0,.2); }

/* ── TABELA ─────────────────────────────────────────────────── */
.table-wrap { overflow-x:auto; }
.data-table { width:100%; border-collapse:collapse; font-size:14px; }
.data-table thead th {
  padding:12px 16px; text-align:left;
  font-size:11px; font-weight:800; letter-spacing:.8px; text-transform:uppercase;
  color: var(--text-muted); background: var(--surface2);
  border-bottom:2px solid var(--border);
}
.data-table tbody tr {
  border-bottom:1px solid var(--border); transition: var(--t);
}
.data-table tbody tr:hover { background: var(--orange-dim); }
.data-table td { padding:14px 16px; }

/* ── OVERLAY / MODAL ────────────────────────────────────────── */
.overlay {
  position:fixed; inset:0;
  background:rgba(0,0,0,.55); backdrop-filter:blur(5px);
  z-index:500;
  display:flex; align-items:center; justify-content:center; padding:16px;
  opacity:0; visibility:hidden; transition: var(--t);
}
.overlay.open { opacity:1; visibility:visible; }
.modal {
  background: var(--surface); border-radius: var(--r-xl);
  width:100%; max-width:600px;
  box-shadow: var(--sh-xl);
  transform:translateY(20px) scale(.97); transition: var(--t);
  max-height:92vh; overflow-y:auto;
}
.overlay.open .modal { transform:none; }
.modal-lg { max-width:860px; }
.modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 28px; border-bottom:1px solid var(--border);
  background: var(--surface2);
  position:sticky; top:0; z-index:1;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.modal-title { font-family: var(--font-head); font-size:18px; font-weight:800; color: var(--navy); }
.modal-close {
  width:32px; height:32px;
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--r-sm); cursor:pointer;
  display:grid; place-items:center; font-size:18px; color: var(--text-muted);
  transition: var(--t);
}
.modal-close:hover { background: var(--red); color:#fff; border-color:transparent; }
.modal-body   { padding:28px; }
.modal-footer {
  padding:18px 28px; border-top:1px solid var(--border);
  display:flex; justify-content:flex-end; gap:10px;
  background: var(--surface2);
  border-radius:0 0 var(--r-xl) var(--r-xl);
}

/* ── TOAST ──────────────────────────────────────────────────── */
.toasts {
  position:fixed; bottom:24px; right:24px; z-index:9999;
  display:flex; flex-direction:column; gap:8px; pointer-events:none;
}
.toast {
  display:flex; align-items:flex-start; gap:10px;
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--r-lg); padding:14px 18px;
  box-shadow: var(--sh-lg); font-size:14px;
  transform:translateX(calc(100% + 30px));
  transition:transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity:0; pointer-events:auto;
  min-width:270px; max-width:380px; border-left:4px solid;
}
.toast.show { transform:translateX(0); opacity:1; }
.toast.ok   { border-left-color: var(--green); }
.toast.err  { border-left-color: var(--red); }
.toast.info { border-left-color: var(--orange); }
.toast.warn { border-left-color: var(--yellow); }
.toast-icon { font-size:20px; flex-shrink:0; }
.toast-text strong { display:block; font-weight:700; margin-bottom:2px; }
.toast-text small  { color: var(--text-muted); font-size:12px; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--navy); color:rgba(255,255,255,.8);
  margin-top:60px; padding:48px 20px 24px;
}
.footer-grid {
  max-width:1280px; margin:0 auto;
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px; margin-bottom:40px;
}
.footer-brand-name { font-family: var(--font-head); font-size:24px; font-weight:900; color:#fff; margin-bottom:12px; }
.footer-brand-name span { color: var(--orange-l); }
.footer-desc { font-size:14px; line-height:1.7; color:rgba(255,255,255,.6); }
.footer-social { display:flex; gap:10px; margin-top:16px; }
.social-btn {
  width:36px; height:36px;
  background:rgba(255,255,255,.1); border-radius: var(--r-sm);
  display:grid; place-items:center; cursor:pointer;
  transition: var(--t); font-size:16px;
}
.social-btn:hover { background: var(--orange); }
.footer-title { font-family: var(--font-head); font-size:15px; font-weight:700; color:#fff; margin-bottom:16px; }
.footer-links { display:flex; flex-direction:column; gap:8px; }
.footer-link { font-size:13px; color:rgba(255,255,255,.6); cursor:pointer; transition: var(--t); }
.footer-link:hover { color: var(--orange-l); padding-left:4px; }
.footer-bottom {
  max-width:1280px; margin:0 auto;
  border-top:1px solid rgba(255,255,255,.1); padding-top:24px;
  display:flex; align-items:center; justify-content:space-between;
  font-size:13px; flex-wrap:wrap; gap:12px;
}

/* ── ADMIN SIDEBAR ──────────────────────────────────────────── */
.admin-layout { display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.admin-sidebar {
  background: var(--navy); color:#fff;
  display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.admin-sidebar-logo {
  padding:28px 24px; border-bottom:1px solid rgba(255,255,255,.1);
  display:flex; align-items:center; gap:10px;
}
.admin-sidebar-logo .brand-name { font-size:20px; }
.admin-nav { padding:20px 12px; flex:1; }
.admin-nav-section { font-size:10px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; color:rgba(255,255,255,.4); padding:0 12px; margin:16px 0 6px; }
.admin-nav-item {
  display:flex; align-items:center; gap:10px;
  padding:11px 14px; border-radius: var(--r);
  color:rgba(255,255,255,.7); font-size:14px; font-weight:600;
  cursor:pointer; transition: var(--t);
  border:none; background:none; width:100%; text-align:left;
}
.admin-nav-item:hover { background:rgba(255,255,255,.1); color:#fff; }
.admin-nav-item.active { background: var(--orange); color:#fff; }
.admin-nav-icon { font-size:18px; flex-shrink:0; }
.admin-main { background: var(--bg); overflow-y:auto; }
.admin-topbar {
  background: var(--surface); border-bottom:1px solid var(--border);
  padding:16px 32px;
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:10;
  box-shadow: var(--sh);
}
.admin-page-title { font-family: var(--font-head); font-size:20px; font-weight:800; color: var(--navy); }
.admin-content { padding:32px; }

/* ── STATS CARDS ────────────────────────────────────────────── */
.stats-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-bottom:28px;
}
.stat-card {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--r-lg);
  padding:22px;
  position:relative; overflow:hidden;
  transition: var(--t);
}
.stat-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
}
.stat-card.orange::before { background: linear-gradient(90deg,var(--orange),#ffb347); }
.stat-card.navy::before   { background: linear-gradient(90deg,var(--navy),var(--navy-l)); }
.stat-card.green::before  { background: linear-gradient(90deg,var(--green),#34d399); }
.stat-card.red::before    { background: linear-gradient(90deg,var(--red),#f87171); }
.stat-card:hover { box-shadow: var(--sh-md); transform:translateY(-2px); }
.stat-icon { font-size:28px; margin-bottom:12px; }
.stat-value {
  font-family: var(--font-head);
  font-size:32px; font-weight:900; letter-spacing:-1px;
}
.stat-card.orange .stat-value { color: var(--orange); }
.stat-card.navy   .stat-value { color: var(--navy); }
.stat-card.green  .stat-value { color: var(--green); }
.stat-card.red    .stat-value { color: var(--red); }
.stat-label { font-size:13px; color: var(--text-muted); margin-top:4px; }
.stat-change { font-size:12px; margin-top:8px; font-weight:700; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── PAINEL USUÁRIO ─────────────────────────────────────────── */
.user-layout { display:grid; grid-template-columns:240px 1fr; gap:28px; padding:28px 20px; max-width:1280px; margin:0 auto; }
.user-sidebar {
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh);
  height:fit-content; position:sticky; top:80px; overflow:hidden;
}
.user-sidebar-profile {
  background: linear-gradient(135deg,var(--navy),var(--navy-l));
  padding:28px 20px; text-align:center;
}
.user-avatar-big {
  width:72px; height:72px;
  background: linear-gradient(135deg,var(--orange),#ff9a3c);
  border-radius:50%; margin:0 auto 12px;
  display:grid; place-items:center;
  font-family: var(--font-head); font-size:28px; font-weight:900; color:#fff;
  border:3px solid rgba(255,255,255,.3);
}
.user-name-sidebar { font-family: var(--font-head); font-size:16px; font-weight:700; color:#fff; }
.user-email-sidebar { font-size:12px; color:rgba(255,255,255,.6); margin-top:3px; }
.user-nav { padding:12px; }
.user-nav-item {
  display:flex; align-items:center; gap:10px;
  padding:11px 14px; border-radius: var(--r);
  color: var(--text-dim); font-size:14px; font-weight:600;
  cursor:pointer; transition: var(--t);
  border:none; background:none; width:100%; text-align:left;
}
.user-nav-item:hover { background: var(--orange-dim); color: var(--orange); }
.user-nav-item.active { background: var(--orange-dim); color: var(--orange); }

/* ── CARRINHO DRAWER ────────────────────────────────────────── */
.cart-overlay {
  position:fixed; inset:0; z-index:400;
  visibility:hidden;
}
.cart-overlay.open { visibility:visible; }
.cart-backdrop {
  position:absolute; inset:0; background:rgba(0,0,0,.5);
  opacity:0; transition: var(--t);
  cursor:pointer;
}
.cart-overlay.open .cart-backdrop { opacity:1; }
.cart-drawer {
  position:absolute; top:0; right:0; bottom:0;
  width:420px; max-width:100%;
  background: var(--surface);
  transform:translateX(100%); transition: var(--t);
  display:flex; flex-direction:column;
  box-shadow:-8px 0 40px rgba(0,0,0,.2);
}
.cart-overlay.open .cart-drawer { transform:none; }
.cart-drawer-header {
  padding:20px 24px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  background: var(--navy); color:#fff;
}
.cart-drawer-title { font-family: var(--font-head); font-size:18px; font-weight:800; }
.cart-items { flex:1; overflow-y:auto; padding:16px; }
.cart-item {
  display:flex; gap:12px; padding:14px 0;
  border-bottom:1px solid var(--border);
}
.cart-item:last-child { border-bottom:none; }
.cart-item-img {
  width:72px; height:72px;
  background: var(--surface2);
  border-radius: var(--r);
  display:grid; place-items:center; font-size:36px;
  flex-shrink:0;
}
.cart-item-info { flex:1; }
.cart-item-name { font-size:14px; font-weight:600; margin-bottom:6px; line-height:1.3; }
.cart-item-price { font-family: var(--font-head); font-size:16px; font-weight:800; color: var(--orange); }
.cart-qty {
  display:flex; align-items:center; gap:8px; margin-top:6px;
}
.qty-btn {
  width:28px; height:28px; border-radius: var(--r-sm);
  background: var(--surface2); border:1px solid var(--border);
  cursor:pointer; display:grid; place-items:center;
  font-size:16px; transition: var(--t);
}
.qty-btn:hover { background: var(--orange); color:#fff; border-color:transparent; }
.qty-val { font-weight:700; font-size:14px; min-width:24px; text-align:center; }
.cart-footer {
  padding:20px 24px; border-top:1px solid var(--border);
  background: var(--surface2);
}
.cart-total-row { display:flex; justify-content:space-between; margin-bottom:8px; font-size:14px; }
.cart-total-row.final {
  font-family: var(--font-head); font-size:20px; font-weight:800;
  color: var(--orange); border-top:1px solid var(--border);
  padding-top:10px; margin-top:4px;
}

/* ── RESPONSIVIDADE ─────────────────────────────────────────── */
@media(max-width:1100px) {
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .admin-layout { grid-template-columns:1fr; }
  .admin-sidebar { display:none; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width:768px) {
  .header-inner { flex-wrap:wrap; gap:10px; }
  .search-bar { order:3; flex-basis:100%; max-width:100%; }
  .hero-content { padding:28px 24px; }
  .hero-bg { display:none; }
  .user-layout { grid-template-columns:1fr; }
  .user-sidebar { position:static; }
  .cats-grid { grid-template-columns:repeat(4,1fr); }
  .products-grid { grid-template-columns:repeat(2,1fr); }
  .form-body { padding:24px 20px; }
  .form-header { padding:24px 20px; }
  .footer-grid { grid-template-columns:1fr; }
  .cols-2, .cols-3 { grid-template-columns:1fr; }
  .form-group.span-2, .form-group.span-3 { grid-column:auto; }
}
@media(max-width:480px) {
  .cats-grid { grid-template-columns:repeat(3,1fr); }
  .products-grid { grid-template-columns:repeat(2,1fr); }
  .stats-grid { grid-template-columns:1fr; }
  .header-actions .hbtn span:not(.cart-badge) { display:none; }
  .hbtn { padding:6px 8px; }
  .cart-drawer { width:100%; }
}
