/* ============================================================
   utilities.css — Grid + utilitários responsivos (v1.0)
   Regra permanente de responsividade: 360 / 576 / 768 / 992 / 1440+
   Bootstrap NÃO está no projeto. Este arquivo define as classes usadas
   no HTML: row, col-*, g-*, d-*, w-100, table-responsive, btn-block,
   modal-dialog-centered/scrollable.
   Carregar DEPOIS de index.css e checkout.css para ter precedência.
   ============================================================ */

/* ---------- Grid ---------- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(var(--nx-gutter, 12px) * -0.5);
  margin-right: calc(var(--nx-gutter, 12px) * -0.5);
}
.row > * {
  width: 100%;
  max-width: 100%;
  padding-left: calc(var(--nx-gutter, 12px) * 0.5);
  padding-right: calc(var(--nx-gutter, 12px) * 0.5);
  flex-shrink: 0;
}

/* gutter spacing between rows (g-3) */
.g-3 { --nx-gutter: 24px; }
.g-2 { --nx-gutter: 16px; }
.g-4 { --nx-gutter: 32px; }

/* colunas base (mobile-first: 1 coluna) */
.col-6  { flex: 0 0 auto; width: 50%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* ---------- Breakpoints ---------- */
/* >=576px (SM) */
@media (min-width: 576px) {
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.66666667%; }
  .d-sm-inline { display: inline !important; }
  .d-sm-flex { display: flex !important; }
}
/* >=768px (MD) */
@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
}
/* >=992px (LG) */
@media (min-width: 992px) {
  .col-lg-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .d-lg-table-cell { display: table-cell !important; }
  .mb-lg-0 { margin-bottom: 0 !important; }
}
/* >=1200px (XL) */
@media (min-width: 1200px) {
  .col-xl-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .d-xl-table-cell { display: table-cell !important; }
  .mb-xl-0 { margin-bottom: 0 !important; }
}

/* ---------- Display / espaçamento utilitários ---------- */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mt-3 { margin-top: 16px !important; }

/* ---------- Botões ---------- */
.btn-block {
  display: block;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
@media (min-width: 576px) {
  .btn-block-sm-down-auto { width: auto; }
}

/* Valores monetários nunca quebram linha */
.nowrap, .money { white-space: nowrap; }

/* ---------- Tabelas ---------- */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive > table { margin-bottom: 0; }

/* ---------- Modal (lightboxes herdam este layout) ---------- */
.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}
.modal-dialog-scrollable {
  max-height: calc(100% - 1rem);
  overflow: hidden;
}
@media (min-width: 576px) {
  .modal-dialog-centered { min-height: calc(100% - 3.5rem); }
  .modal-dialog-scrollable { max-height: calc(100% - 3.5rem); }
}
.modal-dialog-scrollable .modal-content { max-height: inherit; overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
