/* =========================================================
   MAIA MS ERP — Sistema de Design (v2: corporativo + vivo)
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@700;800;900&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --azul: #164B8C;
  --azul-nocturno: #0A2454;
  --azul-medio: #2A6CC8;
  --azul-tint: #E8EFF9;
  --laranja: #E85D1C;
  --laranja-vivo: #FF7A2E;
  --amarelo: #F5B133;
  --amarelo-solar: #FFC94D;
  --tijolo: #B84A28;
  --verde-selva: #2C6B3D;
  --vermelho: #C0392B;

  --bg: #FFFFFF;
  --bg-warm: #FDF6EC;
  --surface: #F4EBDB;
  --border: #E6DCC8;
  --border-strong: #0A2454;
  --text: #0F1B33;
  --text-2: #4E5B75;
  --text-3: #8A8578;

  --f-display: 'Archivo', -apple-system, sans-serif;
  --f-body: 'Manrope', -apple-system, sans-serif;

  --sidebar-w: 260px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-warm);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 900; margin: 0; letter-spacing: -0.02em; text-transform: uppercase; }
p { margin: 0; }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
code { background: var(--surface); padding: 2px 6px; font-size: 12px; }
::selection { background: var(--amarelo); color: var(--azul-nocturno); }

/* ============= LOGIN ============= */
.login-body {
  background: var(--azul-nocturno);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 32px; }
.login-mosaico { display: inline-grid; grid-template-columns: 20px 14px; gap: 3px; margin-bottom: 16px; }
.login-mosaico .y { width: 20px; height: 20px; background: var(--amarelo); }
.login-mosaico .o { width: 14px; height: 14px; background: var(--laranja); }
.login-mosaico .o2 { width: 14px; height: 14px; background: var(--laranja); grid-column: 1; }
.login-word { font-family: var(--f-display); font-weight: 900; font-size: 40px; color: #FFF; letter-spacing: -0.03em; line-height: 1; }
.login-desc { font-size: 11px; font-weight: 800; letter-spacing: 0.2em; color: var(--amarelo); margin-top: 6px; }
.login-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-top: 16px; text-transform: uppercase; }
.login-card { background: #FFF; border: 3px solid var(--azul-nocturno); padding: 40px; }
.login-card h1 { font-size: 24px; margin-bottom: 24px; }
.login-demo-hint {
  margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--border);
  font-size: 12px; color: var(--text-2); line-height: 1.7;
}
.eyebrow-strong {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--laranja); font-weight: 800; margin: 0 0 8px;
}

/* ============= FORM ELEMENTS ============= */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--azul); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-warm); border: 2px solid var(--border);
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--laranja); background: #FFF;
}
.field textarea { min-height: 90px; resize: vertical; }
.field-check { margin-bottom: 20px; font-size: 13px; color: var(--text-2); }
.field-check input { margin-right: 8px; }
.field-error { color: var(--vermelho); font-size: 12px; margin-top: 6px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .form-row-3 { grid-template-columns: 1fr; } }

.btn-primary-block {
  width: 100%; padding: 16px; background: var(--laranja); color: #FFF; border: none;
  font-family: inherit; font-size: 13px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: background 0.15s;
}
.btn-primary-block:hover { background: var(--laranja-vivo); }

.alert { padding: 14px 16px; margin-bottom: 20px; font-size: 13px; font-weight: 600; }
.alert-error { background: #FCEAE8; border: 2px solid var(--vermelho); color: var(--vermelho); }
.alert-success { background: #E8F5EB; border: 2px solid var(--verde-selva); color: var(--verde-selva); }
.alert-aviso { background: #FCF2DC; border: 2px solid var(--amarelo); color: #8A6212; }

/* ============= APP LAYOUT ============= */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--azul-nocturno); color: #FFF;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { padding: 24px; display: flex; align-items: center; gap: 10px; border-bottom: 2px solid rgba(255,255,255,0.1); }
.sidebar-brand .mos { display: grid; grid-template-columns: 16px 10px; gap: 2px; }
.sidebar-brand .mos .y { width: 16px; height: 16px; background: var(--amarelo); }
.sidebar-brand .mos .o { width: 10px; height: 10px; background: var(--laranja); }
.sidebar-brand .mos .o2 { width: 10px; height: 10px; background: var(--laranja); grid-column: 1; }
.sidebar-brand .lockup { line-height: 1; }
.sidebar-brand .word { font-family: var(--f-display); font-weight: 900; font-size: 20px; color: #FFF; letter-spacing: -0.02em; }
.sidebar-brand .desc { font-size: 8px; font-weight: 800; letter-spacing: 0.15em; color: var(--amarelo); margin-top: 3px; }

.sidebar-nav { flex: 1; padding: 16px 0; }
.sidebar-group { margin-bottom: 8px; }
.sidebar-group-label { padding: 12px 24px 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px; color: rgba(255,255,255,0.75);
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #FFF; text-decoration: none; }
.sidebar-link.active { background: rgba(232,93,28,0.15); color: #FFF; border-left-color: var(--laranja); }
.sidebar-link svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
.sidebar-link .badge {
  margin-left: auto; background: var(--laranja); color: #FFF; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; line-height: 1.4;
}

.sidebar-footer { padding: 16px 24px; border-top: 2px solid rgba(255,255,255,0.1); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar {
  width: 36px; height: 36px; background: var(--laranja); color: #FFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 900; font-size: 14px; flex-shrink: 0;
}
.sidebar-user .name { font-size: 12px; font-weight: 800; color: #FFF; line-height: 1.3; }
.sidebar-user .role { font-size: 10px; color: var(--amarelo); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.sidebar-logout { display: block; margin-top: 12px; font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: none; border: none; cursor: pointer; padding: 0; }
.sidebar-logout:hover { color: var(--laranja); text-decoration: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: #FFF; border-bottom: 3px solid var(--azul-nocturno);
  display: flex; align-items: center; justify-content: space-between; padding-inline: 32px;
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 18px; letter-spacing: -0.01em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.notif-wrap { position: relative; }
.notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: none; border: 1px solid var(--border); cursor: pointer;
  color: var(--azul-nocturno);
}
.notif-bell:hover { background: var(--surface); }
.notif-bell svg { width: 18px; height: 18px; }
.notif-bell-badge {
  position: absolute; top: -6px; right: -6px; background: var(--laranja); color: #FFF;
  font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 999px; line-height: 1.4;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-width: 90vw;
  background: #FFF; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(15,27,51,0.12);
  z-index: 200;
}
.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--text-2);
}
.notif-mark-all {
  background: none; border: none; color: var(--laranja); font-size: 11px; font-weight: 700;
  cursor: pointer; padding: 0; text-transform: none; letter-spacing: normal;
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface); text-decoration: none; }
.notif-item.nao-lida { background: var(--azul-tint); }
.notif-item-titulo { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.notif-item-msg { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.notif-item-data { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.notif-empty { padding: 24px 16px; text-align: center; font-size: 12px; color: var(--text-3); }

.content { flex: 1; padding: 32px; max-width: 1400px; width: 100%; }

.sidebar-backdrop {
  display: none;
}

#mobile-toggle {
  display: none;
}

[x-cloak] { display: none !important; }

@media (max-width: 900px) {
  .sidebar { position: fixed; top: 0; left: -100%; height: 100vh; z-index: 100; transition: left 0.2s; }
  .sidebar.open { left: 0; }
  .content { padding: 20px; }
  .topbar { padding-inline: 16px; height: auto; min-height: var(--topbar-h); flex-wrap: wrap; padding-block: 12px; }
  .topbar h1 { font-size: 16px; }
  .topbar-actions { flex-wrap: wrap; gap: 8px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

  #mobile-toggle {
    display: inline-flex;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 36, 84, 0.55);
    z-index: 99;
  }
}

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; font-family: inherit; font-size: 12px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  border: none; transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 14px; height: 14px; }
.btn-orange { background: var(--laranja); color: #FFF; }
.btn-orange:hover { background: var(--laranja-vivo); }
.btn-blue { background: var(--azul-nocturno); color: #FFF; }
.btn-blue:hover { background: var(--azul); }
.btn-ghost { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--azul); color: var(--azul); }
.btn-danger { background: var(--vermelho); color: #FFF; }
.btn-danger:hover { background: #A5352A; }
.btn-sm { padding: 7px 12px; font-size: 11px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============= CATÁLOGO ============= */
.produtos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.produto-card {
  background: #FFF; border: 3px solid var(--azul-nocturno); display: flex; flex-direction: column;
  text-decoration: none; color: var(--text); transition: transform 0.1s;
}
.produto-card:hover { text-decoration: none; transform: translateY(-2px); }
.produto-card .thumb {
  aspect-ratio: 4/3; background: var(--surface); display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 3px solid var(--azul-nocturno); position: relative;
}
.produto-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.produto-card .thumb .sem-imagem { font-size: 32px; opacity: 0.35; }
.produto-card .thumb .destaque-badge {
  position: absolute; top: 10px; left: 10px; background: var(--amarelo); color: var(--azul-nocturno);
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px;
}
.produto-card .thumb .inactivo-badge {
  position: absolute; top: 10px; right: 10px; background: var(--vermelho); color: #FFF;
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px;
}
.produto-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.produto-card .cat { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--laranja); }
.produto-card h3 { font-size: 14px; line-height: 1.3; margin: 0; }
.produto-card .desc { font-size: 12px; color: var(--text-2); flex: 1; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.produto-card .preco { font-family: var(--f-display); font-size: 15px; font-weight: 900; color: var(--azul-nocturno); margin-top: 4px; }

.produto-hero-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--surface);
  border: 3px solid var(--azul-nocturno); margin-bottom: 20px;
}
.produto-hero-placeholder {
  width: 100%; aspect-ratio: 16/9; background: var(--surface); border: 3px solid var(--azul-nocturno);
  margin-bottom: 20px; display: flex; align-items: center; justify-content: center; font-size: 48px; opacity: 0.3;
}
.current-image { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.current-image img { width: 70px; height: 70px; object-fit: cover; border: 2px solid var(--border); }

/* ============= CARDS / PANELS ============= */
.panel { background: #FFF; border: 3px solid var(--azul-nocturno); }
.panel-header {
  padding: 20px 24px; border-bottom: 2px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.panel-header h2 { font-size: 16px; }
.panel-body { padding: 24px; }
.panel-body.no-pad { padding: 0; overflow-x: auto; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 28px; margin-bottom: 4px; }
.page-head .sub { font-size: 13px; color: var(--text-2); font-weight: 600; }

/* ============= KPI CARDS ============= */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border: 3px solid var(--azul-nocturno); margin-bottom: 24px; }
.kpi {
  background: #FFF; padding: 24px; border-right: 2px solid var(--border); border-bottom: 2px solid var(--border);
  position: relative;
}
.kpi:last-child { border-right: none; }
.kpi .label { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.kpi .value { font-family: var(--f-display); font-size: 36px; font-weight: 900; letter-spacing: -0.03em; color: var(--text); line-height: 1; }
.kpi .value .unit { font-size: 16px; color: var(--text-3); margin-left: 4px; }
.kpi .delta { font-size: 11px; font-weight: 700; margin-top: 8px; }
.kpi .delta.up { color: var(--verde-selva); }
.kpi .delta.down { color: var(--vermelho); }
.kpi.accent-orange { background: var(--laranja); color: #FFF; }
.kpi.accent-orange .label { color: rgba(255,255,255,0.75); }
.kpi.accent-orange .value { color: #FFF; }

/* ============= TABLE ============= */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; font-size: 13px; }
.tbl thead { background: var(--azul-nocturno); }
.tbl thead th {
  padding: 12px 16px; text-align: left; font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--amarelo); white-space: nowrap;
}
.tbl thead th.right { text-align: right; }
.tbl tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody td.right { text-align: right; }
.tbl tbody tr:hover { background: var(--bg-warm); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.tbl-empty { padding: 48px 24px; text-align: center; color: var(--text-3); font-size: 13px; font-weight: 600; }

/* ============= BADGES / PILLS ============= */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.pill-neutro { background: var(--surface); color: var(--text-2); }
.pill-azul { background: var(--azul-tint); color: var(--azul); }
.pill-verde { background: #E3F2E6; color: var(--verde-selva); }
.pill-amarelo { background: #FDF0D5; color: #8A6114; }
.pill-vermelho { background: #FBE5E3; color: var(--vermelho); }
.pill-laranja { background: #FDE7DC; color: var(--laranja); }
.pill-tijolo { background: #F5E0D9; color: var(--tijolo); }
.pill-cinza { background: #EEEEEE; color: #666; }

/* ============= KANBAN ============= */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }
.kanban-col { background: var(--surface); border: 2px solid var(--border); min-height: 200px; }
.kanban-col-head {
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid var(--azul-nocturno); background: #FFF;
}
.kanban-col-head .t { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.kanban-col-head .count { background: var(--azul-nocturno); color: #FFF; font-size: 11px; font-weight: 800; padding: 2px 9px; }
.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 100px; }
.kanban-card {
  background: #FFF; border: 2px solid var(--border); padding: 14px;
  cursor: grab; transition: border-color 0.15s, box-shadow 0.15s;
}
.kanban-card:hover { border-color: var(--azul); box-shadow: 0 2px 8px rgba(10,36,84,0.1); }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card .num { font-size: 10px; font-weight: 800; color: var(--text-3); letter-spacing: 0.04em; margin-bottom: 6px; }
.kanban-card .title { font-family: var(--f-body); font-weight: 800; font-size: 13px; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.kanban-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kanban-card .cliente { font-size: 11px; color: var(--text-2); font-weight: 600; }
.kanban-col.dragover { background: var(--amarelo); border-color: var(--laranja); }

/* ============= TABS ============= */
.tabs { display: flex; gap: 4px; border-bottom: 3px solid var(--azul-nocturno); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  padding: 10px 20px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2); cursor: pointer; background: var(--surface); border: none; border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.tab.active { background: var(--azul-nocturno); color: #FFF; }
.tab:hover:not(.active) { background: var(--border); }

/* ============= EMPTY STATE ============= */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state .icon { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--text-3); }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-2); }
.empty-state p { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }

/* ============= MODAL (Alpine) ============= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,22,40,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #FFF; border: 3px solid var(--azul-nocturno); max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px; border-bottom: 2px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 2px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ============= UTILITY ============= */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-8 { display: flex; gap: 8px; align-items: center; }
.flex-gap-12 { display: flex; gap: 12px; align-items: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-3 { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 800; }
.w-full { width: 100%; }

/* Search box */
.search-box { position: relative; }
.search-box input { padding-left: 40px; width: 260px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--text-3); }

/* Filters bar */
.filters-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters-bar select { padding: 9px 12px; font-size: 12px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination a, .pagination span { padding: 8px 12px; font-size: 12px; font-weight: 700; border: 2px solid var(--border); }
.pagination a:hover { border-color: var(--azul); text-decoration: none; }
.pagination .active { background: var(--azul-nocturno); color: #FFF; border-color: var(--azul-nocturno); }

/* ============= LOJA PÚBLICA (Ecommerce) ============= */
.loja-body { background: var(--bg-warm); }
.loja-wrap { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }

.loja-header { background: var(--azul-nocturno); border-bottom: 3px solid var(--laranja); position: sticky; top: 0; z-index: 50; }
.loja-header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.loja-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.loja-brand .lockup { line-height: 1; }
.loja-brand .word { font-family: var(--f-display); font-weight: 900; font-size: 22px; color: #FFF; letter-spacing: -0.02em; }
.loja-brand .desc { font-size: 8px; font-weight: 800; letter-spacing: 0.14em; color: var(--amarelo); margin-top: 3px; }
.loja-brand .mos { display: grid; grid-template-columns: 16px 10px; gap: 2px; flex-shrink: 0; }
.loja-brand .mos .y { width: 16px; height: 16px; background: var(--amarelo); }
.loja-brand .mos .o { width: 10px; height: 10px; background: var(--laranja); }
.loja-brand .mos .o2 { width: 10px; height: 10px; background: var(--laranja); grid-column: 1; }
.loja-nav { display: flex; align-items: center; gap: 26px; }
.loja-nav a {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(255,255,255,0.75); text-decoration: none;
}
.loja-nav a:hover, .loja-nav a.active { color: #FFF; }
.loja-nav svg { width: 16px; height: 16px; }
.loja-cart-link { position: relative; }
.loja-cart-count {
  background: var(--laranja); color: #FFF; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

.loja-main { padding-block: 32px 64px; min-height: 60vh; }

.loja-hero { background: var(--azul-nocturno); color: #FFF; padding: 40px 32px; margin-bottom: 28px; }
.loja-hero h1 { color: #FFF; font-size: 26px; margin-bottom: 8px; }
.loja-hero p { color: rgba(255,255,255,0.75); margin: 0; font-size: 14px; }

.loja-footer { background: var(--azul-nocturno); color: rgba(255,255,255,0.6); padding-block: 32px; margin-top: 48px; border-top: 3px solid var(--laranja); }
.loja-footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.loja-footer .word { color: #FFF; }
.loja-footer p { font-size: 12px; margin: 0; }

.loja-produto-detalhe { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.loja-produto-detalhe img { width: 100%; border: 3px solid var(--azul-nocturno); aspect-ratio: 4/3; object-fit: cover; }
.loja-produto-detalhe .placeholder { width: 100%; aspect-ratio: 4/3; background: var(--surface); border: 3px solid var(--azul-nocturno); display: flex; align-items: center; justify-content: center; font-size: 48px; opacity: 0.3; }
.loja-preco-grande { font-family: var(--f-display); font-size: 28px; font-weight: 900; color: var(--azul-nocturno); margin: 14px 0; }

.qty-stepper { display: inline-flex; align-items: stretch; border: 2px solid var(--border); }
.qty-stepper button { background: var(--surface); border: none; width: 36px; font-size: 16px; font-weight: 800; cursor: pointer; }
.qty-stepper button:hover { background: var(--border); }
.qty-stepper input { width: 50px; text-align: center; border: none; border-left: 2px solid var(--border); border-right: 2px solid var(--border); font-weight: 800; }

.carrinho-tbl td { vertical-align: middle; }
.carrinho-produto { display: flex; align-items: center; gap: 12px; }
.carrinho-produto img { width: 52px; height: 52px; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.carrinho-produto .sem-imagem { width: 52px; height: 52px; background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.pagamento-opcoes { display: flex; flex-direction: column; gap: 10px; }
.pagamento-opcao { border: 2px solid var(--border); padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.pagamento-opcao:has(input:checked) { border-color: var(--laranja); background: #FDE7DC; }
.pagamento-opcao input { margin-top: 3px; }
.pagamento-opcao .titulo { font-weight: 800; font-size: 13px; }
.pagamento-opcao .sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.confirmacao-box { text-align: center; padding: 48px 24px; }
.confirmacao-box .check {
  width: 64px; height: 64px; background: var(--verde-selva); color: #FFF; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px;
}
.confirmacao-numero { font-family: var(--f-display); font-size: 22px; font-weight: 900; color: var(--laranja); margin: 6px 0 24px; }
.instrucoes-pagamento { text-align: left; background: var(--surface); border: 2px solid var(--border); padding: 20px; margin-top: 20px; }
.instrucoes-pagamento h3 { font-size: 14px; margin-bottom: 10px; }
.instrucoes-pagamento p { margin: 0 0 6px; font-size: 13px; }

@media (max-width: 900px) {
  .loja-produto-detalhe { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .loja-nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
