/* ── Variáveis ─────────────────────────────── */
:root {
  --sidebar-w: 240px;
  --accent:    #E74C3C;
  --bg:        #F0F2F5;
  --surface:   #FFFFFF;
  --border:    #C5CDD6;
  --text:      #1A202C;
  --text2:     #5F6B7A;
  --sidebar-bg:#E8ECF0;
  --submenu-bg:#eaf3ff;
  --submenu-border:#b8d0ff;
  --submenu-text:#134074;
  --submenu-hover-bg:#dcebff;
  --submenu-hover-border:#9ec3ff;
  --submenu-hover-text:#0f3460;
  --submenu-active-bg:#111827;
  --submenu-active-text:#ffffff;
  --submenu-strip-bg:#f8fafc;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0b1220;
  --surface:#111827;
  --border:#2c3a4f;
  --text:#e5edf7;
  --text2:#9fb0c8;
  --sidebar-bg:#0f172a;
  --submenu-bg:#0f2747;
  --submenu-border:#204876;
  --submenu-text:#cfe4ff;
  --submenu-hover-bg:#16355d;
  --submenu-hover-border:#2b5d95;
  --submenu-hover-text:#e8f2ff;
  --submenu-active-bg:#e5edf7;
  --submenu-active-text:#0b1220;
  --submenu-strip-bg:#0c1628;
}

/* ── Layout base ───────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
}
html[data-theme="dark"] body {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--text2);
  --bs-border-color: var(--border);
  --bs-tertiary-bg: #0f172a;
  --bs-secondary-bg: #101a2c;
  --bs-emphasis-color: var(--text);
  --bs-light-rgb: 17, 24, 39;
}

#sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; z-index: 1000;
  transition: transform .25s ease;
}

#main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Sidebar ───────────────────────────────── */
.sidebar-logo {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 72px;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand-logo {
  width: min(220px, 100%);
  max-height: 68px;
  object-fit: contain;
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-user-email {
  font-size: .75rem;
}

.minimal-shell-container {
  max-width: 760px;
}

.minimal-shell-logo {
  width: 108px;
  max-width: 35vw;
}

@media (max-width: 768px) {
  .minimal-shell-logo {
    width: 96px;
    max-width: 40vw;
  }
}


.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}

#sidebar .nav-link {
  color: var(--text); font-size: .9rem; border-radius: 8px;
  padding: 8px 12px; margin: 1px 0;
  display: flex; align-items: center; gap: 8px;
}
#sidebar .nav-link:hover  { background: #D1D9E0; }
#sidebar .nav-link.active { background: var(--accent); color: #fff; font-weight: 600; }
#sidebar .nav-link i { font-size: 1rem; }
.nav-section {
  list-style: none;
  padding: 10px 12px 4px;
  color: var(--text2);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
#sidebar .nav-link-sub {
  margin-left: 10px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: .85rem;
}

/* ── Topbar ────────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
 }
.topbar-toggle {
  flex: 0 0 auto;
}
.topbar-title {
  min-width: 0;
}
.topbar-company,
.topbar-theme {
  min-width: 0;
}
.topbar-company-form {
  min-width: 0;
}
.topbar-company-select {
  min-width: min(280px, 100%);
  max-width: 100%;
}
.topbar-clock {
  margin-left: auto;
  flex: 0 0 auto;
}
.top-submenu {
  padding: 10px 24px 0;
  background: var(--submenu-strip-bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}
.theme-switcher select {
  min-width: 130px;
}
.install-shortcut-btn {
  max-width: calc(100vw - 24px);
}
.module-tabs {
  flex-wrap: nowrap;
  gap: 8px;
  border-bottom: 0;
  min-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 107, 122, .55) transparent;
}
.module-tabs-scroll {
  padding-bottom: 2px;
}
.module-tabs-scroll .module-tabs {
  margin-bottom: 0;
}
.module-tabs::-webkit-scrollbar {
  height: 6px;
}
.module-tabs::-webkit-scrollbar-thumb {
  background: rgba(95, 107, 122, .55);
  border-radius: 999px;
}
.module-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.module-tabs .nav-link {
  border: 1px solid var(--submenu-border);
  background: var(--submenu-bg);
  color: var(--submenu-text);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  padding: 9px 14px;
}
.module-tabs .nav-link:hover {
  border-color: var(--submenu-hover-border);
  background: var(--submenu-hover-bg);
  color: var(--submenu-hover-text);
}
.module-tabs .nav-link.active {
  background: var(--submenu-active-bg);
  color: var(--submenu-active-text);
  border-color: var(--submenu-active-bg);
}
.submenu-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.submenu-action-btn {
  border-radius: 10px;
  white-space: nowrap;
}
.page-toolbar {
  flex-wrap: wrap;
}
.page-toolbar-form {
  min-width: 0;
}
.page-toolbar-form-grow {
  flex: 1 1 320px;
}
.page-toolbar-action {
  flex: 0 0 auto;
}

/* ── Toolbars / busca (reutilizável nas telas de lista) ───────── */
.compras-status-select {
  width: 200px;
}

.compras-div-justificativa {
  width: 200px;
}

.param-cfop-codigo {
  width: 130px;
}

.param-cfop-tipo {
  width: 240px;
}

.loja-categorias-form-card {
  max-width: 600px;
}

@media (max-width: 768px) {
  .compras-status-select,
  .compras-div-justificativa {
    width: 100%;
  }

  /* Em telas pequenas, deixa as colunas “respirarem” e evita overflow rígido */
  .param-cfop-codigo,
  .param-cfop-tipo {
    width: auto;
  }
}

.page-toolbar-search {
  width: 100%;
  max-width: 460px;
}
.page-toolbar-search .input-group-text {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text2);
}
html[data-theme="dark"] .page-toolbar-search .input-group-text {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text2) !important;
}

.btn-touch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

/* Utilitário (Bootstrap não inclui min-w-0) */
.min-w-0 {
  min-width: 0 !important;
}

/* ── Cards utilitários para listagens em mobile ───────────────── */
.entity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .04);
}


/* ── Área de conteúdo ──────────────────────── */
.content-area { padding: 24px; flex: 1; }

/* ── Cards de métrica ──────────────────────── */
.card-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px;
  text-align: center;
}
.metric-icon  { font-size: 1.45rem; margin-bottom: 4px; }
.metric-value { font-size: 1.25rem; font-weight: 700; color: var(--text); line-height: 1.15; }
.metric-label { font-size: .8rem; color: var(--text2); margin-top: 2px; }
.card-metric-link { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.card-metric-link:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.08); border-color: #b0bec5; }

/* ── Tabela ────────────────────────────────── */
.table { background: var(--surface); border-radius: 10px; overflow: hidden; }
.table thead th { background: #E8ECF0; color: var(--text2); font-size: .8rem; font-weight: 700; }
.table-hover tbody tr:hover { background: #F5F7FA; }
.cadastro-doc,
.cadastro-ie,
.cadastro-doc-input,
.cadastro-ie-input {
  font-family: var(--bs-font-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
  font-size: .83rem;
}

/* ── Botões xs ─────────────────────────────── */
.btn-xs { padding: 2px 7px; font-size: .78rem; }

.financeiro-pagar-table {
  table-layout: fixed;
}
.financeiro-pagar-table thead th {
  font-size: .74rem;
  white-space: nowrap;
}
.financeiro-pagar-table td {
  font-size: .9rem;
  vertical-align: middle;
}
.financeiro-pagar-cell {
  line-height: 1.25;
}
.financeiro-pagar-principal {
  font-size: .88rem;
  word-break: break-word;
}
.financeiro-pagar-secundario {
  font-size: .78rem;
}
.financeiro-pagar-valor,
.financeiro-pagar-data {
  font-size: .86rem;
}
.financeiro-pagar-col-id { width: 6%; }
.financeiro-pagar-col-descricao { width: 20%; }
.financeiro-pagar-col-categoria { width: 11%; }
.financeiro-pagar-col-empresa { width: 27%; }
.financeiro-pagar-col-fornecedor { width: 11%; }
.financeiro-pagar-col-valor { width: 9%; }
.financeiro-pagar-col-vencimento { width: 9%; }
.financeiro-pagar-col-status { width: 8%; }
.financeiro-pagar-col-acoes { width: 9%; }
.financeiro-receber-table {
  min-width: 720px;
}
.financeiro-receber-table thead th,
.financeiro-receber-table td {
  white-space: nowrap;
}
.financeiro-receber-table td:nth-child(2),
.financeiro-receber-table td:nth-child(3) {
  white-space: normal;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .table,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control-plaintext {
  background-color: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table-light th,
html[data-theme="dark"] .table-light td {
  background: #162133 !important;
  color: var(--text2) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .table-hover tbody tr:hover,
html[data-theme="dark"] .list-group-item:hover {
  background: #182235 !important;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar-logo,
html[data-theme="dark"] .sidebar-user,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .text-bg-light {
  background: #172132 !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-success,
html[data-theme="dark"] .btn-outline-danger,
html[data-theme="dark"] .btn-outline-warning {
  color: var(--text);
}

html[data-theme="dark"] .form-control::placeholder {
  color: #7f8ea3;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: #121b2d !important;
  color: var(--text) !important;
  border-color: #476b9a !important;
  box-shadow: 0 0 0 .2rem rgba(71, 107, 154, .2);
}

html[data-theme="dark"] .alert-success {
  background: #0e2d24;
  color: #b7f7dc;
  border-color: #1f5a47;
}

html[data-theme="dark"] .alert-danger {
  background: #351419;
  color: #ffc7cf;
  border-color: #7b2834;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] .text-secondary-emphasis {
  color: var(--text2) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .table,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] label,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .btn {
  color: var(--text);
}

html[data-theme="dark"] .table-dark th,
html[data-theme="dark"] .table-dark td {
  background: #111827 !important;
  color: #dbe6f5 !important;
  border-color: var(--border) !important;
}

/* ── Responsivo: esconder sidebar em mobile ── */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.show { transform: translateX(0); }
  #main-content { margin-left: 0; }
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
    padding: 12px 16px !important;
  }
  .topbar-toggle {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0;
  }
  .topbar-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    font-size: .96rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-company,
  .topbar-theme,
  .topbar-clock {
    grid-column: 1 / -1;
    margin-left: 0;
  }
  .topbar-company {
    grid-row: 2;
  }
  .topbar-theme {
    grid-row: 3;
  }
  .topbar-clock {
    grid-row: 4;
    font-size: .75rem;
  }
  .topbar-company-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .topbar-label {
    width: auto;
  }
  .topbar-company .topbar-label {
    display: none;
  }
  .topbar-theme {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap;
  }
  .topbar-theme .topbar-label {
    width: auto;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .topbar-company-select,
  .theme-switcher select {
    width: 100%;
    min-width: 0;
  }
  .theme-switcher select {
    flex: 1 1 auto;
  }
  .topbar-clock {
    text-align: left;
  }
  .top-submenu {
    padding: 8px 12px 0;
  }
  .module-tabs {
    gap: 6px;
  }
  .module-tabs .nav-link {
    font-size: .78rem;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .page-toolbar-stack-sm {
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
    .page-toolbar-stack-sm .page-toolbar-form,
  .page-toolbar-stack-sm .page-toolbar-action {
    width: 100%;
  }
  .page-toolbar-stack-sm .page-toolbar-form {
    flex-direction: column;
  }
  .page-toolbar-stack-sm .page-toolbar-form-grow {
    flex: 0 0 auto;
  }

  .page-toolbar-stack-sm .page-toolbar-form .form-control,
  .page-toolbar-stack-sm .page-toolbar-form .btn,
  .page-toolbar-stack-sm .page-toolbar-form a,
  .page-toolbar-stack-sm .page-toolbar-action {
    width: 100%;
  }

  /* Alguns templates antigos usam width/min-width inline (ex: 320px) */
  .page-toolbar-stack-sm .page-toolbar-form [style*="width"],
  .page-toolbar-stack-sm .page-toolbar-form [style*="min-width"] {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Tap targets melhores no mobile sem mexer no desktop */
  .page-toolbar-stack-sm .btn-touch {
    min-height: 44px;
  }
  .page-toolbar-stack-sm .page-toolbar-search {
    max-width: 100%;
  }
  .page-toolbar-stack-sm .input-group-sm > .form-control,
  .page-toolbar-stack-sm .input-group-sm > .input-group-text {
    padding-top: .5rem;
    padding-bottom: .5rem;
    font-size: 1rem;
  }
  .page-toolbar-stack-sm .input-group-sm > .input-group-text {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .content-area {
    padding: 16px;
  }

  .install-shortcut-btn {
    left: 16px;
    right: 16px;
    margin: 0 0 16px !important;
    width: auto;
  }
  .submenu-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .submenu-action-btn {
    width: 100%;
  }
}

@media (max-width: 1400px) {
  .financeiro-pagar-table td {
    font-size: .85rem;
  }
  .financeiro-pagar-principal {
    font-size: .83rem;
  }
  .financeiro-pagar-secundario,
  .financeiro-pagar-table .badge {
    font-size: .72rem;
  }
}

/* ── Storefront público ───────────────────────── */
.store-body {
  background: #f8fafc;
  color: var(--text);
}

.store-header,
.store-footer {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.store-brand {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
}

.store-brand-mark { color: var(--accent); }
.store-brand-sub  { color: var(--text2); font-size: .9rem; }

.store-search { min-width: min(100%, 420px); }
.store-search .form-control { border-radius: 999px; }

.btn-store-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-store-primary:hover {
  background: #cf4335;
  color: #fff;
  border-color: #cf4335;
}

.btn-store-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-store-outline:hover {
  background: #eef2f7;
  color: var(--text);
  border-color: #b6c0cb;
}

.store-hero {
  background:
    radial-gradient(circle at top right, rgba(231, 76, 60, .10), transparent 24%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.store-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(231, 76, 60, .10);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
}

.store-panel,
.store-card,
.store-empty,
.store-info-box,
.store-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .04);
}

.store-panel,
.store-empty,
.store-info-box {
  padding: 1.25rem;
}

.store-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.store-stat-label {
  color: var(--text2);
  font-size: .82rem;
}

.store-card {
  overflow: hidden;
}

.store-card-media,
.store-detail-media {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-card-media img,
.store-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-card-body {
  padding: 1.15rem;
}

.store-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: .3rem 0 .85rem;
}

.store-card-title a {
  color: var(--text);
  text-decoration: none;
}

.store-card-title a:hover {
  color: var(--accent);
}

.store-meta {
  color: var(--text2);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.store-price {
  font-size: 1.15rem;
  font-weight: 800;
}

.store-price.xl {
  font-size: 2rem;
}

.store-stock {
  font-size: .9rem;
  margin-top: .45rem;
}

.store-stock.is-available { color: #0f766e; }
.store-stock.is-unavailable { color: #b91c1c; }

.store-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  color: #94a3b8;
  font-size: 3rem;
}

.store-placeholder.lg {
  min-height: 420px;
  font-size: 5rem;
}

.store-info-label {
  color: var(--text2);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.store-info-value {
  margin-top: .35rem;
  font-weight: 600;
}

.store-empty {
  padding: 3rem 1.5rem;
  text-align: center;
}

.store-empty i {
  font-size: 2.6rem;
  color: var(--accent);
}

.store-list {
  overflow: hidden;
}

.store-list-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid #eef2f7;
}

.store-list-item:first-child {
  border-top: 0;
}

.store-list-meta {
  min-width: 150px;
  text-align: right;
}

.store-form-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .04);
  overflow: hidden;
}

.store-form-section {
  padding: 1.35rem;
  border-top: 1px solid #eef2f7;
}

.store-form-section:first-child {
  border-top: 0;
}

.store-form-card .form-control,
.store-form-card .form-select {
  border-color: #d7dee7;
  min-height: 44px;
}

.store-form-card textarea.form-control {
  min-height: auto;
}

.store-form-card button[type="submit"] {
  margin: 0 1.35rem 1.35rem;
  width: calc(100% - 2.7rem) !important;
}

.store-mini-list {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.store-mini-list-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.store-order-status {
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1rem 1.15rem;
}

.store-order-status div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
}

.store-order-status strong {
  font-size: .85rem;
}

@media (max-width: 768px) {
  .store-list-item {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .store-list-meta {
    min-width: auto;
    text-align: left;
  }

  .store-mini-list-item {
    flex-direction: column;
  }
}

/* ══════════════════════════════════════════════════════════════════
   STOREFRONT — inspirado em agillemed.com.br
   Paleta: vermelho #d6000a | verde #4a9966 | fundo #f1f1f1 | texto #3d4445
   Fonte: Encode Sans (carregada no <head>)
   ══════════════════════════════════════════════════════════════════ */

:root {
  --store-red:          #d6000a;
  --store-red-dark:     #aa0008;
  --store-red-hover:    #b0000d;
  --store-green:        #4a9966;
  --store-green-hover:  #3d8057;
  --store-gray:         #6f6f6f;
  --store-light:        #f5f5f5;
  --store-border:       #e8e8e8;
  --store-text:         #3d4445;
  --store-text2:        #7a8185;
  --store-surface:      #ffffff;
  --store-bg:           #f1f1f1;
  --store-shadow:       0 4px 24px rgba(0,0,0,.06);
  --store-radius:       16px;
  --store-radius-lg:    24px;
}

/* ── Base ─────────────────────────────────────────────────────── */
body.store-body {
  background: var(--store-bg);
  color: var(--store-text);
  font-family: 'Encode Sans', 'Segoe UI', sans-serif;
  font-size: 15px;
}

/* ── Topbar ───────────────────────────────────────────────────── */
.store-topbar {
  background: #fafafa;
  border-bottom: 1px solid var(--store-border);
  font-size: .82rem;
}

.store-topbar-link {
  color: var(--store-gray);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.store-topbar-link:hover { color: var(--store-red); }
.store-topbar-link i { color: var(--store-red); }

.store-topbar-msg { color: var(--store-gray); }

.store-topbar-social {
  display: flex;
  gap: .6rem;
}
.store-topbar-social a {
  color: var(--store-gray);
  font-size: .95rem;
  text-decoration: none;
  transition: color .15s;
}
.store-topbar-social a:hover { color: var(--store-red); }

/* ── Header ───────────────────────────────────────────────────── */
.store-header {
  background: var(--store-surface);
  border-bottom: 1px solid var(--store-border);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.store-header-main {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
}

/* ── Logo ─────────────────────────────────────────────────────── */
.store-brand { display: inline-flex; align-items: center; text-decoration: none; }

.store-brand-logo {
  max-width: 260px;
  max-height: 82px;
  object-fit: contain;
}

.store-brand-fallback {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.store-brand-mark {
  color: var(--store-red);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: .03em;
}
.store-brand-sub {
  color: #565656;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .07em;
}

/* ── Barra de busca ───────────────────────────────────────────── */
.store-search { flex: 1; }

.store-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border: 1.5px solid var(--store-border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .2s;
}
.store-search-wrap:focus-within {
  border-color: var(--store-red);
  background: #fff;
}

.store-search-icon {
  position: absolute;
  left: 1rem;
  color: var(--store-gray);
  pointer-events: none;
  font-size: 1rem;
}

.store-search-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  height: 48px;
  padding: 0 1rem 0 2.8rem;
  color: var(--store-text);
  box-shadow: none !important;
  font-family: inherit;
}
.store-search-input::placeholder { color: #aaa; }

.store-search-btn {
  border-radius: 0 999px 999px 0 !important;
  height: 48px;
  padding: 0 1.4rem;
  font-weight: 700;
  background: var(--store-red);
  border-color: var(--store-red);
  color: #fff;
  flex-shrink: 0;
}
.store-search-btn:hover { background: var(--store-red-hover); border-color: var(--store-red-hover); color: #fff; }

/* ── Header actions ───────────────────────────────────────────── */
.store-header-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.store-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--store-text);
  text-decoration: none;
  font-weight: 600;
  font-size: .85rem;
  padding: .4rem .6rem;
  border-radius: 10px;
  transition: background .15s;
}
.store-action-link:hover { background: #f5f5f5; color: var(--store-text); }
.store-action-link i { color: var(--store-red); font-size: 1.4rem; }
.store-action-text { line-height: 1.2; }

.store-cart-btn {
  background: #fff3f3;
  border: 1px solid #fcd4d4;
}
.store-cart-btn:hover { background: #ffe8e8; }
.store-cart-qtd { color: var(--store-red); font-weight: 700; }

.store-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--store-red);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Barra de navegação vermelha ──────────────────────────────── */
.store-nav {
  background: var(--store-red);
}

.store-nav .nav-link {
  color: rgba(255,255,255,.92);
  font-weight: 600;
  font-size: .88rem;
  padding: .75rem .9rem !important;
  border-radius: 6px;
  transition: background .15s;
}
.store-nav .nav-link:hover {
  color: #fff;
  background: rgba(0,0,0,.15);
}
.store-nav .nav-link i { font-size: .85rem; }

.store-nav-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.3);
  transition: background .15s;
}
.store-nav-whatsapp:hover { background: rgba(255,255,255,.25); color: #fff; }
.store-nav-whatsapp i { font-size: 1rem; }

/* ── HERO ─────────────────────────────────────────────────────── */
.store-hero {
  padding: 1.25rem 0 .5rem;
}

.store-hero-banner {
  min-height: 380px;
  border-radius: var(--store-radius-lg);
  padding: 2.5rem;
  color: #fff;
  background: linear-gradient(135deg, #b3000c 0%, #d6000a 50%, #e8001a 100%);
  box-shadow: 0 20px 60px rgba(214,0,10,.22);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.store-hero-banner::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}

.store-hero-banner h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  font-weight: 800;
  max-width: 660px;
  margin: .85rem 0;
}

.store-hero-banner p {
  max-width: 580px;
  font-size: 1rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 0;
}

.store-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.25);
}

.btn-store-hero-wpp {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
  font-weight: 700;
}
.btn-store-hero-wpp:hover { background: #20ba58; border-color: #20ba58; color: #fff; }

/* ── Hero lateral ─────────────────────────────────────────────── */
.store-hero-side {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  height: 100%;
}

.store-side-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--store-shadow);
  color: #565656;
  display: flex;
  flex-direction: column;
}
.store-side-card strong { color: #333; font-size: .95rem; margin-bottom: .2rem; }
.store-side-card span  { font-size: .88rem; color: var(--store-gray); }
.store-side-card i     { color: var(--store-red); }

.store-side-card--green { border-left: 3px solid var(--store-green); }
.store-side-card--green i { color: var(--store-green); }

.store-metrics-panel {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: 1rem;
  box-shadow: var(--store-shadow);
}
.store-metric-col {
  padding: .5rem;
  border-right: 1px solid var(--store-border);
}
.store-metric-col:last-child { border-right: none; }
.store-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--store-red); }
.store-stat-label { font-size: .76rem; color: var(--store-text2); margin-top: .15rem; }

/* ── Atalhos ──────────────────────────────────────────────────── */
.store-shortcuts { padding: 1rem 0 0; }

.store-shortcut-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  min-height: 88px;
  padding: .85rem .75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .45rem;
  align-items: center;
  font-weight: 600;
  font-size: .82rem;
  color: #444;
  text-decoration: none;
  text-align: center;
  box-shadow: var(--store-shadow);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.store-shortcut-card:hover {
  border-color: var(--store-red);
  color: var(--store-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(214,0,10,.1);
}
.store-shortcut-card i { font-size: 1.4rem; color: var(--store-red); }
.store-shortcut-card--cta {
  background: var(--store-red);
  border-color: var(--store-red);
  color: #fff;
}
.store-shortcut-card--cta i { color: #fff; }
.store-shortcut-card--cta:hover {
  background: var(--store-red-hover);
  border-color: var(--store-red-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Seção / cabeçalhos ───────────────────────────────────────── */
.store-section-head h2,
.store-page-hero-box h1,
.store-product-title {
  color: #2d3132;
  font-weight: 800;
}
.store-section-head p { color: var(--store-text2); }

/* ── Hero de página interna ───────────────────────────────────── */
.store-page-hero { padding-top: 1.25rem; }

.store-page-hero-box,
.store-product-shell {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--store-shadow);
}
.store-page-hero-box {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}
.store-page-hero-box h1 { font-size: 1.5rem; margin: 0; }
.store-page-hero-box p  { color: var(--store-text2); margin: .25rem 0 0; }
.store-page-hero-aside  { color: var(--store-text2); text-align: right; }
.store-page-hero-aside .fw-bold { color: var(--store-red); }

/* ── Cards ────────────────────────────────────────────────────── */
.store-card,
.store-empty,
.store-info-box,
.store-list,
.store-panel,
.store-form-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  box-shadow: var(--store-shadow);
}

.store-card {
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.store-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

/* Imagem do card */
.store-card-media,
.store-detail-media {
  background: #fafafa;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.store-card-media img { width: 100%; height: 200px; object-fit: contain; padding: .5rem; }
.store-detail-media {
  min-height: 340px;
  border-radius: var(--store-radius);
  border: 1px solid var(--store-border);
}
.store-detail-media img { width: 100%; height: 100%; object-fit: contain; }

/* Tag no card */
.store-tag {
  position: absolute;
  top: .6rem;
  right: .6rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.store-tag--off   { background: #ffe0e0; color: var(--store-red); }
.store-tag--new   { background: #e8f5e9; color: var(--store-green); }
.store-tag--hot   { background: #fff3e0; color: #e65100; }

/* Corpo do card */
.store-card-body { padding: 1rem 1.1rem 1.1rem; }

.store-meta {
  font-size: .74rem;
  color: var(--store-text2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .2rem;
}

.store-card-title { font-size: .95rem; font-weight: 700; line-height: 1.3; margin: .25rem 0 .6rem; }
.store-card-title a { color: var(--store-text); text-decoration: none; }
.store-card-title a:hover { color: var(--store-red); }

/* Preço */
.store-price { color: var(--store-red); font-weight: 800; font-size: 1.1rem; }
.store-price.xl { font-size: 2rem; }

.store-installment {
  font-size: .82rem;
  color: var(--store-text2);
  margin-top: .2rem;
}
.store-installment strong { color: var(--store-green); }

.store-pix-note {
  font-size: .78rem;
  color: var(--store-green);
  font-weight: 600;
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.store-pix-note i { font-size: .8rem; }

.store-payment-note { color: var(--store-text2); font-size: .85rem; margin-top: .2rem; }

/* Estoque */
.store-stock { font-size: .82rem; margin-top: .4rem; display: flex; align-items: center; gap: .25rem; }
.store-stock.is-available   { color: var(--store-green); font-weight: 700; }
.store-stock.is-unavailable { color: var(--store-red);   font-weight: 700; }

/* Placeholder sem imagem */
.store-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 200px; color: #d0d5d8; font-size: 2.8rem;
}
.store-placeholder.lg { min-height: 340px; font-size: 5rem; }

/* ── Info boxes (detalhe) ─────────────────────────────────────── */
.store-info-box { padding: .75rem 1rem; }
.store-info-label { font-size: .72rem; color: var(--store-text2); text-transform: uppercase; letter-spacing: .05em; }
.store-info-value { margin-top: .2rem; font-weight: 600; font-size: .9rem; }

/* ── Preço bloco detalhado ────────────────────────────────────── */
.store-price-block { padding-bottom: .85rem; border-bottom: 1px solid var(--store-border); }

/* ── Trust badges ─────────────────────────────────────────────── */
.store-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.store-trust-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: var(--store-text2);
  background: #fafafa;
  border: 1px solid var(--store-border);
  border-radius: 999px;
  padding: .3rem .75rem;
}

/* ── Buy box ──────────────────────────────────────────────────── */
.store-buy-box {
  background: #fafafa;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: 1.15rem;
}

/* ── Breadcrumb ───────────────────────────────────────────────── */
.store-breadcrumb { color: var(--store-text2); }
.store-breadcrumb a { color: #666; text-decoration: none; }
.store-breadcrumb a:hover { color: var(--store-red); text-decoration: underline; }
.store-breadcrumb span { margin: 0 .35rem; }

/* ── Lista (carrinho) ─────────────────────────────────────────── */
.store-list { overflow: hidden; }
.store-list-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--store-border);
}
.store-list-item:first-child { border-top: 0; }
.store-list-meta { min-width: 150px; text-align: right; }

/* ── Painéis ──────────────────────────────────────────────────── */
.store-panel { padding: 1.25rem; }
.store-empty { padding: 3rem 1.5rem; text-align: center; }
.store-empty i { font-size: 2.8rem; color: var(--store-red); }

/* ── Mini list (checkout) ─────────────────────────────────────── */
.store-mini-list { display: flex; flex-direction: column; gap: .8rem; }
.store-mini-list-item { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }

/* ── Form card (checkout) ─────────────────────────────────────── */
.store-form-card { overflow: hidden; }
.store-form-section { padding: 1.35rem; border-top: 1px solid var(--store-border); }
.store-form-section:first-child { border-top: 0; }
.store-form-card .form-control,
.store-form-card .form-select {
  border-color: #dde2e8;
  min-height: 44px;
}
.store-form-card button[type="submit"] {
  margin: 0 1.35rem 1.35rem;
  width: calc(100% - 2.7rem) !important;
}

/* ── Status pedido ────────────────────────────────────────────── */
.store-order-status {
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: 1rem 1.15rem;
}
.store-order-status div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--store-border);
}
.store-order-status div:last-child { border-bottom: none; }
.store-order-status strong { font-size: .85rem; }

/* ── Botões ───────────────────────────────────────────────────── */
.btn-store-primary {
  background: var(--store-red);
  border-color: var(--store-red);
  color: #fff;
  font-weight: 700;
}
.btn-store-primary:hover { background: var(--store-red-hover); border-color: var(--store-red-hover); color: #fff; }

.btn-store-white {
  background: #fff;
  color: var(--store-red);
  border: 2px solid rgba(255,255,255,.6);
  font-weight: 700;
}
.btn-store-white:hover { background: rgba(255,255,255,.9); color: var(--store-red); }

.btn-store-outline {
  background: #fff;
  color: #565656;
  border: 1px solid var(--store-border);
  font-weight: 600;
}
.btn-store-outline:hover { background: #f5f5f5; border-color: #ccc; }

.btn-store-buy {
  background: var(--store-green);
  border-color: var(--store-green);
  color: #fff;
  font-weight: 700;
}
.btn-store-buy:hover { background: var(--store-green-hover); border-color: var(--store-green-hover); color: #fff; }

.btn-store-green {
  background: var(--store-green);
  border-color: var(--store-green);
  color: #fff;
  font-weight: 700;
}
.btn-store-green:hover { background: var(--store-green-hover); border-color: var(--store-green-hover); color: #fff; }

/* ── Benefícios ───────────────────────────────────────────────── */
.store-benefits { padding: 1.25rem 0 0; }

.store-benefit-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  box-shadow: var(--store-shadow);
}
.store-benefit-card i { color: var(--store-red); font-size: 1.4rem; flex-shrink: 0; }
.store-benefit-card strong { display: block; font-size: .88rem; color: #333; }
.store-benefit-card small  { display: block; font-size: .76rem; color: var(--store-text2); }

/* ── CTA home ─────────────────────────────────────────────────── */
.store-home-cta {
  padding: 0 0 2.5rem;
}
.store-cta-box {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  overflow: hidden;
  box-shadow: var(--store-shadow);
}
.store-cta-box-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.store-cta-box-body strong { font-size: 1rem; color: #333; }
.store-cta-box-body span   { font-size: .9rem; color: var(--store-text2); margin-top: .3rem; }

/* ── Footer ───────────────────────────────────────────────────── */
.store-footer {
  background: var(--store-red);
  color: rgba(255,255,255,.9);
  margin-top: 2.5rem;
}

.store-footer-logo { max-width: 240px; max-height: 74px; object-fit: contain; }

.store-footer-brand-text { color: #fff; font-weight: 800; font-size: 1.6rem; }
.store-footer-brand-sub  { color: rgba(255,255,255,.7); font-size: .8rem; letter-spacing: .06em; }

.store-footer-title {
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.store-footer-text { color: rgba(255,255,255,.82); font-size: .88rem; }

.store-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.store-footer-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .88rem;
  transition: color .15s;
}
.store-footer-links a:hover { color: #fff; text-decoration: underline; }

.store-footer-social {
  display: flex;
  gap: .75rem;
}
.store-footer-social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s;
}
.store-footer-social a:hover { background: rgba(255,255,255,.3); }

.store-footer-contact { display: flex; flex-direction: column; }

.store-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  padding: .55rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .88rem;
  width: fit-content;
}
.store-footer-whatsapp:hover { background: #20ba58; color: #fff; }

.store-footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,.18);
}
.store-footer-legal { color: rgba(255,255,255,.75); font-size: .82rem; }
.store-footer-legal strong { color: rgba(255,255,255,.95); }

/* ── WhatsApp flutuante ───────────────────────────────────────── */
.store-whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 54px; height: 54px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  transition: transform .2s, box-shadow .2s;
}
.store-whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.65);
  color: #fff;
}

/* ── Responsivo ───────────────────────────────────────────────── */
@media (max-width: 991px) {
  .store-header-main {
    grid-template-columns: 1fr auto;
    gap: .75rem;
    padding: .75rem 0;
  }
  .store-brand { grid-column: 1 / 2; }
  .store-header-actions { grid-column: 2 / 3; grid-row: 1; }
  .store-search { grid-column: 1 / 3; grid-row: 2; }

  .store-page-hero-box { flex-direction: column; align-items: flex-start; }
  .store-page-hero-aside { text-align: left; }

  .store-list-item { grid-template-columns: 1fr; text-align: left; }
  .store-list-meta { min-width: auto; text-align: left; }
  .store-mini-list-item { flex-direction: column; }

  .store-order-status { min-width: auto; }
}

@media (max-width: 576px) {
  .store-hero-banner { min-height: 280px; padding: 1.5rem; }
  .store-whatsapp-float { width: 46px; height: 46px; font-size: 1.3rem; }
}
