:root{
  --cream:#F6F1E7;
  --cream-2:#EFE7D8;
  --espresso:#2E2119;
  --espresso-2:#4A362A;
  --copper:#B36A3C;
  --copper-dark:#8F4F27;
  --sage:#5C7A5E;
  --line:#E4D9C8;
  --white:#FFFFFF;
  --danger:#B94A3A;
  --radius:14px;
  --font-display:'Fraunces', serif;
  --font-body:'Work Sans', sans-serif;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--cream);
  color:var(--espresso);
  font-family:var(--font-body);
  padding-bottom:110px;
  -webkit-font-smoothing:antialiased;
}

/* ---------- Fixed header block (topbar + tabs together) ---------- */
.app-header{
  position:sticky;
  top:0;
  z-index:20;
  background:var(--cream);
}

/* ---------- Topbar ---------- */
.topbar{
  background:var(--espresso);
  color:var(--cream);
}
.topbar-inner{
  max-width:640px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
}
.brand{display:flex;align-items:center;gap:12px;}
.brand-mark{
  width:40px;height:40px;border-radius:50%;
  border:1.5px solid var(--copper);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-display);
  font-weight:600;
  font-size:14px;
  letter-spacing:0.5px;
  color:var(--copper);
}
.brand-text{display:flex;flex-direction:column;line-height:1.1;}
.brand-name{
  font-family:var(--font-display);
  font-weight:600;
  font-size:17px;
  letter-spacing:0.5px;
}
.brand-sub{
  font-size:11px;
  color:#C9BBA6;
  letter-spacing:1.5px;
  text-transform:uppercase;
}
.topbar-status{
  font-size:12px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(179,106,60,0.18);
  color:#E8C9A6;
  border:1px solid rgba(179,106,60,0.4);
  white-space:nowrap;
}
.topbar-status.closed{
  background:rgba(185,74,58,0.18);
  color:#E7A99C;
  border-color:rgba(185,74,58,0.4);
}
.schedule-bar{
  max-width:640px;
  margin:0 auto;
  padding:0 18px 10px;
  font-size:12px;
  color:#C9BBA6;
  letter-spacing:0.3px;
}

/* ---------- Tabs ---------- */
.tabs{
  background:var(--cream);
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:12px 18px;
  border-bottom:1px solid var(--line);
  max-width:640px;
  margin:0 auto;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none;}
.tab-pill{
  flex:0 0 auto;
  padding:9px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--white);
  color:var(--espresso-2);
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  white-space:nowrap;
  transition:all .15s ease;
}
.tab-pill.active{
  background:var(--espresso);
  border-color:var(--espresso);
  color:var(--cream);
}

/* ---------- Menu ---------- */
.menu{
  max-width:640px;
  margin:0 auto;
  padding:8px 18px 40px;
}
.cat-heading{
  font-family:var(--font-display);
  font-size:13px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--copper-dark);
  margin:28px 0 12px;
}
.product-card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 4px;
  border-bottom:1px solid var(--line);
  cursor:pointer;
}
.product-card:active{background:var(--cream-2);}
.product-icon{
  flex:0 0 auto;
  width:52px;height:52px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:22px;
  background:var(--cream-2);
  border:1px solid var(--line);
}
.product-info{flex:1;min-width:0;}
.product-name{
  font-family:var(--font-display);
  font-weight:600;
  font-size:16.5px;
  margin:0 0 3px;
}
.product-price{
  font-size:14px;
  color:var(--copper-dark);
  font-weight:600;
}
.product-note{
  font-size:12.5px;
  color:#8A7A68;
  margin-top:2px;
}
.product-add{
  flex:0 0 auto;
  width:32px;height:32px;
  border-radius:50%;
  background:var(--espresso);
  color:var(--cream);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;
  font-weight:600;
}

/* ---------- Cart FAB ---------- */
.cart-fab{
  position:fixed;
  right:20px;
  bottom:24px;
  width:58px;height:58px;
  border-radius:50%;
  background:var(--copper);
  color:var(--white);
  border:none;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 20px rgba(46,33,25,0.28);
  z-index:25;
  cursor:pointer;
}
.cart-count{
  position:absolute;
  top:-4px;right:-4px;
  background:var(--danger);
  color:white;
  font-size:11px;
  font-weight:700;
  min-width:20px;height:20px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--cream);
}

/* ---------- Overlays / Sheets ---------- */
.overlay{
  position:fixed;inset:0;
  background:rgba(46,33,25,0.45);
  display:none;
  align-items:flex-end;
  justify-content:center;
  z-index:30;
}
.overlay.open{display:flex;}
.sheet{
  background:var(--cream);
  width:100%;
  max-width:640px;
  max-height:88vh;
  overflow-y:auto;
  border-radius:20px 20px 0 0;
  padding:20px 20px 28px;
  animation:slideUp .22s ease;
}
@keyframes slideUp{from{transform:translateY(30px);opacity:0;}to{transform:translateY(0);opacity:1;}}

.sheet-handle{
  width:40px;height:4px;background:var(--line);border-radius:99px;
  margin:0 auto 16px;
}
.sheet-title{
  font-family:var(--font-display);
  font-weight:600;
  font-size:20px;
  margin:0 0 4px;
}
.sheet-sub{
  font-size:13.5px;
  color:#8A7A68;
  margin-bottom:18px;
}

.option-group{margin-bottom:18px;}
.option-label{
  font-size:12.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:1px;
  color:var(--espresso-2);
  margin-bottom:8px;
  display:block;
}
.option-row{display:flex;flex-wrap:wrap;gap:8px;}
.option-btn{
  padding:9px 14px;
  border-radius:10px;
  border:1.5px solid var(--line);
  background:var(--white);
  font-size:13.5px;
  font-family:var(--font-body);
  cursor:pointer;
  color:var(--espresso-2);
}
.option-btn.selected{
  border-color:var(--copper);
  background:rgba(179,106,60,0.12);
  color:var(--copper-dark);
  font-weight:600;
}
.option-extra{font-size:11.5px;color:#96876f;margin-left:4px;}

.notas-input{
  width:100%;
  padding:12px 13px;
  border-radius:10px;
  border:1.5px solid var(--line);
  font-family:var(--font-body);
  font-size:14px;
  background:var(--white);
  color:var(--espresso);
  resize:vertical;
  min-height:56px;
}

.qty-row{
  display:flex;align-items:center;justify-content:space-between;
  margin:22px 0 6px;
}
.qty-control{display:flex;align-items:center;gap:14px;}
.qty-btn{
  width:34px;height:34px;border-radius:50%;
  border:1.5px solid var(--line);
  background:var(--white);
  font-size:18px;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.qty-value{font-size:16px;font-weight:600;min-width:18px;text-align:center;}

.primary-btn{
  width:100%;
  padding:15px;
  border:none;
  border-radius:12px;
  background:var(--espresso);
  color:var(--cream);
  font-size:15.5px;
  font-weight:600;
  font-family:var(--font-body);
  cursor:pointer;
  margin-top:16px;
}
.primary-btn:disabled{opacity:0.5;cursor:not-allowed;}
.secondary-btn{
  width:100%;
  padding:13px;
  border:1.5px solid var(--line);
  border-radius:12px;
  background:transparent;
  color:var(--espresso-2);
  font-size:14.5px;
  font-weight:500;
  cursor:pointer;
  margin-top:10px;
}

/* ---------- Cart drawer ---------- */
.cart-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.cart-item-name{font-weight:600;font-size:15px;}
.cart-item-meta{font-size:12.5px;color:#8A7A68;margin-top:2px;}
.cart-item-price{font-weight:600;font-size:14.5px;white-space:nowrap;}
.cart-item-remove{
  font-size:12px;color:var(--danger);cursor:pointer;margin-top:6px;display:inline-block;
}
.cart-empty{
  text-align:center;
  padding:40px 20px;
  color:#8A7A68;
}

/* ---------- Confirmación de pedido ---------- */
.confirm-sheet{
  text-align:center;
  padding-top:32px;
}
.confirm-icon{
  width:64px;height:64px;
  border-radius:50%;
  background:rgba(92,122,94,0.15);
  color:var(--sage);
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 18px;
}
.confirm-title{
  font-family:var(--font-display);
  font-weight:600;
  font-size:21px;
  margin:0 0 8px;
}
.confirm-text{
  font-size:14.5px;
  color:#8A7A68;
  margin-bottom:26px;
  line-height:1.5;
}
.field{margin-bottom:14px;}
.field label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:1px;
  color:var(--espresso-2);
  margin-bottom:6px;
}
.field input, .field textarea{
  width:100%;
  padding:12px 13px;
  border-radius:10px;
  border:1.5px solid var(--line);
  font-family:var(--font-body);
  font-size:14.5px;
  background:var(--white);
  color:var(--espresso);
}
.field textarea{resize:vertical;min-height:60px;}
.total-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:14px 0 4px;
  font-size:17px;
  font-weight:700;
}

/* ---------- Toast ---------- */
.toast{
  position:fixed;
  left:50%;
  bottom:30px;
  transform:translateX(-50%) translateY(20px);
  background:var(--espresso);
  color:var(--cream);
  padding:13px 20px;
  border-radius:12px;
  font-size:14px;
  opacity:0;
  pointer-events:none;
  transition:all .25s ease;
  z-index:40;
  max-width:88%;
  text-align:center;
}
.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

@media (max-width:380px){
  .brand-sub{display:none;}
}
