/* ============================================================
   Suisse Brownie — Cardápio Digital
   global.css — estilos globais
   ============================================================ */

:root {
  --accent: #C4652E;
  --accent-dark: #9c4a1c;
  --accent-soft: rgba(196, 101, 46, 0.12);
  --bg: #e8dcc6;
  --paper: #F5EFE2;
  --ink: #3d2a1e;
  --ink-strong: #4E3226;
  --muted: #8a7663;
  --label: #a0836f;
  --border: rgba(120, 80, 50, 0.14);
  --border-strong: rgba(120, 80, 50, 0.22);
  --wa: #25D366;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-display: 'Caveat', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

img { display: block; }

/* ---- Estrutura da página (coluna central estilo app) ---- */
.app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(60, 40, 25, 0.18);
  position: relative;
}

/* ---- Cabeçalho ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--border);
}
.header__logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 1px;
}
.header__titles { line-height: 1; }
.header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  color: var(--ink-strong);
  letter-spacing: 0.3px;
  margin: 0;
}
.header__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2px 0 0;
}

/* ---- Barra de categorias ---- */
.chips {
  position: sticky;
  top: 81px;
  z-index: 19;
  background: var(--paper);
  padding: 11px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 100px;
  transition: all 0.15s;
  background: #fff;
  color: #6b4a34;
  border: 1.5px solid var(--border-strong);
}
.chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---- Menu ---- */
.menu { padding: 0 0 96px; }

.group-banner {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  text-align: center;
  padding: 14px 18px;
  letter-spacing: 0.5px;
  line-height: 1;
}

.section { padding: 20px 18px 6px; scroll-margin-top: 130px; }
.section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--ink-strong);
  margin: 0;
  line-height: 1;
}
.section__rule {
  flex: 1;
  height: 0;
  border-bottom: 2px dotted rgba(196, 101, 46, 0.5);
}
.section__items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Item ---- */
.item { display: flex; gap: 13px; align-items: flex-start; }
.item__photo {
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--accent-soft);
  border: 1px solid rgba(196, 101, 46, 0.2);
}
.item__photo.is-big { width: 96px; height: 96px; }
.item__photo img { width: 100%; height: 100%; object-fit: cover; }

.item__body { flex: 1; min-width: 0; padding-top: 2px; }
.item__row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.item__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.25;
}
.item__leader {
  flex: 1;
  height: 0;
  border-bottom: 1.5px dotted var(--border-strong);
  margin-bottom: 4px;
  min-width: 14px;
}
.item__price {
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  white-space: nowrap;
}
.item__desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 400;
}
.item__action { flex: 0 0 auto; align-self: center; }

/* ---- Botão adicionar / stepper ---- */
.add-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--accent);
  border-radius: 100px;
  padding: 3px;
}
.stepper__btn {
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper__qty {
  min-width: 20px;
  text-align: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

/* ---- Rodapé ---- */
.footer {
  background: var(--ink-strong);
  color: var(--paper);
  padding: 26px 20px 30px;
  text-align: center;
}
.footer__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: #fff;
  line-height: 1;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}
.footer__links a { color: #f0c9ad; }
.footer__links > div { color: #d8c4b2; }
.footer__note {
  margin-top: 18px;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: #b39d8a;
}

/* ---- Barra flutuante do carrinho ---- */
.cartbar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(480px, 100vw) - 28px);
  z-index: 30;
}
.cartbar__btn {
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border-radius: 16px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 28px rgba(78, 50, 38, 0.34);
  font-family: inherit;
}
.cartbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
}
.cartbar__count {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.cartbar__total { font-weight: 800; font-size: 16px; }

/* ---- Modal ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(40, 26, 18, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.modal__sheet {
  width: min(480px, 100vw);
  max-height: 92vh;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal__head {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--ink-strong);
  line-height: 1;
}
.modal__close {
  width: 34px;
  height: 34px;
  border: none;
  background: #eadfce;
  color: var(--ink-strong);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal__body { overflow-y: auto; padding: 16px 20px 8px; }

.lines { display: flex; flex-direction: column; gap: 14px; }
.line { display: flex; align-items: center; gap: 10px; }
.line__body { flex: 1; min-width: 0; }
.line__name { font-weight: 700; font-size: 14px; color: var(--ink); }
.line__each { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.line .stepper__btn { width: 28px; height: 28px; font-size: 18px; }
.line .stepper__qty { min-width: 18px; font-size: 14px; }
.line__total {
  min-width: 66px;
  text-align: right;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-strong);
}

.empty {
  text-align: center;
  padding: 40px 10px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}

.fields { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.fields__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 7px;
}
.seg { display: flex; gap: 8px; }
.seg__btn {
  flex: 1;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 11px 8px;
  border-radius: 12px;
  transition: all 0.15s;
  background: #fff;
  color: #6b4a34;
  border: 1.5px solid var(--border-strong);
}
.seg__btn.is-on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.input:focus { border-color: var(--accent); }

.modal__foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--paper);
}
.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.subtotal span:first-child { font-weight: 700; color: #6b4a34; font-size: 14px; }
.subtotal span:last-child { font-weight: 800; color: var(--ink-strong); font-size: 20px; }
.btn-wa {
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--wa);
  color: #fff;
  border-radius: 14px;
  padding: 15px;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
}
.btn-wa__note {
  text-align: center;
  font-size: 11px;
  color: #a08a78;
  margin-top: 9px;
  font-weight: 600;
}

[hidden] { display: none !important; }
