/* ===========================
   VARIÁVEIS DE TEMA
   =========================== */
:root {
  --brand: #8a443f;
  --bg: #fff;
  --text: #222;
  --line: #ddd;
  --radius: 14px;
  --transition: all .25s ease;
  --adicional-border: #640404;
  --adicional-border-w: 5px;
}

/* ===========================
   BASE
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture {
  max-width: 100%;
  display: block;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}
.page-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   CABEÇALHO E STEPS
   =========================== */
.page-header h1 {
  margin: 0 0 6px;
}
.page-header .subtitle {
  margin: 0 0 16px;
  color: #666;
}
.step {
  margin-bottom: 28px;
}
.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.step-index {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.step-title h2 {
  margin: 0;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--brand);
}
.step-title p {
  margin: 2px 0 0;
  color: #666;
}

/* ===========================
   BOTÕES
   =========================== */
.btn {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s, background-color .2s;
  text-align: center;
}
.btn:disabled {
  background: #e0e0e0;
  color: #a0a0e0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  border-color: transparent;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

/* ===========================
   PASSO 1 — CARDS DOS CARDÁPIOS
   =========================== */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 980px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
.menu-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  isolation: isolate;
}
.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.menu-card .menu-radio {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.menu-card .card-figure {
  display: block;
  position: relative;
}
.menu-card.img-only .img-wrap {
  aspect-ratio: 5 / 8
  overflow: hidden;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
}
.menu-card.img-only img,
.menu-thumb {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--line);
  border-radius: 12px;
}
.menu-card.active .menu-thumb {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand), transparent 60%) inset, 0 6px 18px rgba(0,0,0,.12);
}
.card-info-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

/* ===========================
   SIDEBAR
   =========================== */
.summary-sticky {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-inputs {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-inputs h4 {
  margin: 0 0 4px;
  text-transform: uppercase;
  color: var(--brand);
}
.calc-summary,
.menu-itens-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}
.calc-summary h4,
.menu-itens-card h4 {
  margin: 0 0 8px;
  text-transform: uppercase;
  color: var(--brand);
}
.summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 13px;
}
.summary-row:last-child {
  border-bottom: 0;
}
.total-row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding-top: 8px;
  font-size: 16px;
  font-weight: 800;
}
#aviso-minimo {
  color: #8a443f;
  font-weight: 600;
  display: block;
  margin-top: 8px;
}
.menu-itens-content .menu-cat {
  margin: 10px 0 6px;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  font-size: 12px;
}
.menu-itens-content ul {
  margin: 0 0 8px;
  padding-left: 16px;
}
.sidebar-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-sidebar-next,
.btn-sidebar-back {
  width: 100%;
}
.sidebar-next:has(.btn-sidebar-back[hidden]) {
  grid-template-columns: 1fr;
}

/* ===========================
   PASSO 2 — ADICIONAIS
   =========================== */
.adicionais-wrapper {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.adicional-col h4 {
  margin: 0 0 8px;
  text-transform: uppercase;
  color: var(--brand);
}
.adicional-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.adicional-item {
  position: relative;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.adicional-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.adicional-item .thumb-wrap {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f2f2f2;
}
.adicional-item .adicional-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.adicional-item:hover .adicional-thumb {
  transform: scale(1.05);
}
.adicional-item .checkbox {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: rgba(0,0,0,0.25);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  transition: var(--transition);
  padding-bottom: 34px;
}
.adicional-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.adicional-item .checkbox > span {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  color: #fff;
  padding: 0 8px;
  pointer-events: none;
}
.adicional-item .price {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: rgba(0,0,0,0.45);
  padding: 4px 0;
  letter-spacing: .02em;
  pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.adicional-item:has(input[type="checkbox"]:checked) {
  border-color: var(--adicional-border);
  box-shadow: 0 0 0 var(--adicional-border-w) color-mix(in srgb, var(--adicional-border), transparent 0%), 0 6px 24px rgba(255,0,0,0.473);
  transform: translateY(-2px);
}
.adicional-item:has(input[type="checkbox"]:checked) .checkbox {
  background: rgba(0,0,0,0.38);
}
details > summary {
  cursor: pointer;
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details .adicional-col h4::after {
  content: ' ▼';
  display: inline-block;
  font-size: 0.8em;
  margin-left: 4px;
}
details[open] .adicional-col h4::after {
  content: ' ▲';
}

/* ===========================
   FORMULÁRIOS E CAMPOS
   =========================== */
.divider {
  height: 1px;
  background: #eee;
  margin: 20px 0;
}
.bebidas h3,
.pedidos-especiais h3 {
  margin: 0 0 6px;
  text-transform: uppercase;
  color: var(--brand);
}
.bebidas .hint {
  margin: 0 0 8px;
  color: #666;
  font-size: 13px;
}
.bebida-item {
  padding: 6px 0;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.pedido-especial-box {
  margin-top: 8px;
}
.textarea-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--brand);
}
.form-section {
  margin-bottom: 16px;
}
.pretty-form {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.form-col h4,
.form-section h4 {
  margin: 0 0 10px;
  text-transform: uppercase;
  color: var(--brand);
}
.form-full-width {
  margin-top: 12px;
}
.field {
  display: block;
  margin-bottom: 12px;
}
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--brand);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid transparent;
  background-color: #eef5fa;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  font-family: "Poppins", sans-serif;
}

/* === INÍCIO DA ALTERAÇÃO DE ACESSIBILIDADE (FOCO) === */
/* Substituído :focus por :focus-visible */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand), transparent 75%);
  background-color: #fff;
}
/* === FIM DA ALTERAÇÃO DE ACESSIBILIDADE (FOCO) === */

.pretty-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 2px dashed color-mix(in srgb, var(--brand), transparent 50%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand), white 92%);
}
.externo-box {
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed #e9d4d2;
  border-radius: 12px;
  background: #fff8f7;
}
.billing-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #eee;
}
.terms-box {
  border: 1px solid #eee;
  border-radius: 12px;
  height: 320px;
  overflow: auto;
  background: #fff;
  padding: 0;
}
.terms-loading {
  padding: 14px;
  font-weight: 600;
}
.terms-accept {
  margin: 12px 0 8px;
}
.final-buttons {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.ul-clean {
  list-style: none;
  margin: 0;
  padding: 0;
}
.is-invalid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192,57,43,.18) !important;
}
.field-error {
  color: #c0392b;
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-top: 4px;
}
}

/* ===========================
   CSS ADICIONAL
   =========================== */

/* Configuração de Pessoas/Local movida para o Passo 1 */
.step-1-config {
  margin-top: 24px;
}

/* Ajusta o layout dos inputs movidos para 2 colunas em telas maiores */
@media (min-width: 600px) {
  .step-1-config {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: end;
  }
  .step-1-config .field {
    margin-bottom: 0;
  }
}