:root{
  --bg:#f6f7fb;
  --card:#fff;
  --text:#111827;
  --muted:#6b7280;
  --border:#ececf1;
  --brand:#ffbd00;
  --accent:#ff3d00;
  --ok:#16a34a;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --radius:18px;
  --chipH:40px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,sans-serif;
  color:var(--text);
  background:var(--bg);
}
img{display:block; max-width:100%}

/* HERO */
.hero{
  position:relative;
  height:260px;
  background:#000 url('hero.png') center/cover no-repeat;
  z-index:1;
}
.hero::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-36px;
  height:72px;
  z-index:2;
  background:radial-gradient(135% 82px at 50% -10px, transparent 62px, var(--bg) 63px);
}

/* HEADER */
header{
  position:sticky;
  top:0;
  z-index:40;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--border);
}
.wrap{
  max-width:980px;
  margin:0 auto;
  padding:0 16px;
}
.brand-card{
  position:relative;
  z-index:3;
  margin-top:-46px;
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  border-radius:24px;
  padding:14px;
}
.brand-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand-left{
  display:flex;
  align-items:center;
  gap:12px;
}
.logo{
  width:56px;
  height:56px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
  display:grid;
  place-items:center;
}
.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.title{
  font-weight:900;
  font-size:20px;
}
.sub{
  color:var(--muted);
  font-size:13px;
}
.pill{
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  background:#fff;
  font-weight:700;
  font-size:13px;
}

/* CATEGORY CHIPS */
.chips{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:12px 2px 2px;
}
.chip{
  flex:0 0 auto;
  height:var(--chipH);
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:800;
  cursor:pointer;
}
.chip.active{
  background:var(--brand);
  border-color:var(--brand);
}

/* LAYOUT */
main{
  padding:14px 0 160px;
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}
.grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
}
@media (max-width:960px){
  .grid{grid-template-columns:1fr}
}
.sec-title{
  font-weight:800;
  font-size:18px;
  margin:12px 4px;
}
.sec-note{
  margin:4px 6px 0;
  color:#6b7280;
  font-size:12.5px;
}
.menu{
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* ITEM CARDÁPIO */
.item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
}
.item img{
  width:80px;
  height:80px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid var(--border);
}
.item h3{
  margin:0;
  font-size:16px;
  font-weight:500;
}
.item p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}
.price{
  font-weight:900;
}

/* BUTTONS */
.btn{
  height:42px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}
.btn-primary{
  background:var(--brand);
  border-color:var(--brand);
}
.btn-added{
  background:#eaffea!important;
  border-color:#b7f7bf!important;
}

/* CART */
.cart{
  position:sticky;
  top:86px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.cart-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  background:#fff;
}
.qbtn{
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}
.total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:900;
  font-size:18px;
}
.muted{
  color:var(--muted);
  font-size:13px;
}
.cart-line-small{
  font-size:12.5px;
  color:#6b7280;
  margin-top:2px;
}

/* FLOATING CART */
.floating-cart{
  position:fixed;
  left:16px;
  right:16px;
  bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:60;
  display:none;
}
.floating-cart>button{
  width:100%;
  height:52px;
  border-radius:16px;
  border:1px solid var(--border);
  background:linear-gradient(180deg,var(--brand),#ffcf33);
  box-shadow:var(--shadow);
  font-weight:900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 14px;
}
.floating-cart small{
  font-weight:700;
  color:#7a4d00;
}

/* SHEETS (MODAIS) */
.sheet{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  padding:20px;
  z-index:70;
  overflow-y:auto;            /* permite rolar quando o conteúdo fica maior que a tela */
}
.sheet.show{display:block}
.sheet-wrap{
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:var(--shadow);
  max-width:520px;
  margin:0 auto;
  padding:16px;
  max-height:calc(100vh - 40px);  /* garante que nunca passe da viewport */
  overflow-y:auto;                 /* scroll interno no card (checkout, etc.) */
}
.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.grid2>div{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

/* FORM ELEMENTS */
input,select,textarea{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  font-size:15px;
  width:100%;
  max-width:100%;
}
textarea{
  min-height:80px;
  resize:vertical;
  width:100%;
  max-width:100%;
}

/* FOOTER */
footer{
  text-align:center;
  color:var(--muted);
  padding:32px 0;
}

/* TOAST */
.toast{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:90;
  background:rgba(0,0,0,.45);
}
.toast.show{display:flex}
.toast-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:18px 16px;
  max-width:360px;
  width:92%;
  text-align:center;
}
.toast-title{
  font-weight:900;
  font-size:18px;
  margin-bottom:6px;
}
.toast-ok{color:#15803d}
.toast-bad{color:#b91c1c}
.toast-close{margin-top:10px}

/* =====================
   ADDONS — layout fixo
   ===================== */

/* lista em coluna; em tela maior pode virar 2 colunas */
.addon-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

@media (min-width:640px){
  .addon-list{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}

/* cada adicional fica com texto à esquerda e preço fixo à direita */
.addon{
  position:relative;
  display:flex;
  align-items:center;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
  padding-right:72px; /* espaço pro preço não sobrepor o texto */
  gap:10px;
}

.addon label{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1 1 auto;
  font-size:14px;
  font-weight:600;
  color:#0f172a;
}

.addon label input{
  width:18px;
  height:18px;
}

/* preço sempre grudado na direita, centralizado na linha */
.addon strong{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:14px;
  font-weight:800;
  color:#0f172a;
  white-space:nowrap;
}

.req{
  font-size:12px;
  color:#b91c1c;
  font-weight:700;
}

.profile-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:32vh;
  overflow:auto;
  margin-top:6px;
}
.profile-item{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

/* =====================
   CAMPOS BONITINHOS
   ===================== */
.input,
.select,
.textarea{
  background:#fff;
  color:var(--text);
  border:1.5px solid var(--brand);
  border-radius:14px;
  padding:12px 14px;
  font-size:15px;
  width:100%;
  max-width:100%;
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
}
.input:focus,
.select:focus,
.textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(255,189,0,.28);
}
.select{
  -webkit-appearance:none;
  appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='%23111827'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat:no-repeat;
  background-position:right 12px center;
  padding-right:40px;
}
.textarea{
  min-height:96px;
  resize:vertical;
}
form label,
#prod-sheet label,
#prefill-sheet label{
  font-weight:800;
  color:#0f172a;
}

/* OBS CHECKBOXES (pedido completo / não preciso de troco) */
.obs-check{
  cursor:pointer;
}
.obs-check input{
  width:16px;
  height:16px;
}

/* SELECT REFRI */
#ps-soda{width:100%;}

/* =====================
   FORMAS DE PAGAMENTO
   ===================== */
.pay-options{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:4px;
}
.pay-opt{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-size:14px;
}
.pay-opt input{
  width:18px;
  height:18px;
}
.pay-opt span{
  flex:1;
}
.pay-opt input:checked + span{
  font-weight:800;
  color:#111827;
}
#cash-change-wrap{
  margin-top:6px;
}
#cash-change-wrap .input{
  border-color:var(--border);
}

/* STATUS VIEW BUTTON */
#status-view .btn{
  margin-top:10px;
}
