/* ==========================================================================
   KAWTAR — Commander en ligne (menu · panier · caisse) + écran cuisine
   Reuses the site tokens from styles.css
   ========================================================================== */
.order-page { background: var(--bg); min-height: 100vh; }
.order-page .stage, .order-page .track { display: block; }

/* ---------- top bar ---------- */
.obar {
  position: sticky; top: 0; z-index: 120; display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--pad-x); background: rgba(17, 12, 9, .86); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.obar__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.obar__right { display: flex; align-items: center; gap: 18px; }
.cartbtn {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 13px; border-radius: 40px;
  background: var(--gold); color: #1c130b; border: 0; cursor: pointer; font-family: var(--sans); font-weight: 500;
  font-size: 13px; letter-spacing: .06em; transition: transform .3s var(--ease), background .3s var(--ease);
}
.cartbtn:hover { background: var(--gold-lt); transform: translateY(-1px); }
.cartbtn svg { width: 18px; height: 18px; }
.cartbtn__count { min-width: 20px; height: 20px; border-radius: 10px; background: #1c130b; color: var(--gold-lt); display: inline-grid; place-items: center; font-size: 11px; padding: 0 6px; }
.cartbtn.is-bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); } }

/* ---------- header / mode ---------- */
.owrap { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 5vh, 56px) var(--pad-x) 140px; }
.ohead { text-align: center; }
.ohead .order__lede { max-width: 560px; margin: 22px auto 0; }
.modeseg { display: inline-flex; gap: 8px; margin-top: 30px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 60px; background: rgba(0,0,0,.25); }
.modeseg__btn {
  display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 50px; border: 0; cursor: pointer;
  background: transparent; color: var(--taupe-2); font-family: var(--sans); text-align: left;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.modeseg__btn svg { width: 20px; height: 20px; flex: none; }
.modeseg__btn span { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.modeseg__btn small { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }
.modeseg__btn.is-on { background: var(--gold); color: #1c130b; }
.modeseg__btn.is-on small { color: rgba(28,19,11,.7); }
.ohead__closed { margin: 20px auto 0; max-width: 520px; padding: 12px 16px; border: 1px solid rgba(158,43,37,.5); background: rgba(158,43,37,.14); border-radius: 8px; color: #f0d9d2; font-size: 14px; }
.ohead__closed a { color: var(--gold-lt); }

/* ---------- category tabs ---------- */
.cattabs { position: sticky; top: 64px; z-index: 110; display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 12px; margin-top: 34px;
  background: linear-gradient(var(--bg), var(--bg) 82%, transparent); scrollbar-width: none; }
.cattabs::-webkit-scrollbar { display: none; }
.cattabs a { flex: none; padding: 8px 14px; border-radius: 30px; border: 1px solid var(--line); color: var(--taupe-2); text-decoration: none;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transition: all .3s var(--ease); }
.cattabs a.is-on, .cattabs a:hover { color: var(--gold-lt); border-color: var(--gold); background: rgba(201,162,75,.08); }

/* ---------- menu ---------- */
.menu__loading { color: var(--dim); text-align: center; padding: 60px 0; }
.mcat { padding-top: 34px; scroll-margin-top: 130px; }
.mcat__h { display: flex; align-items: baseline; gap: 14px; margin: 0 0 6px; }
.mcat__h h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); color: var(--cream); }
.mcat__note { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mcat__closed { font-size: 13px; color: var(--taupe); margin: 0 0 8px; font-style: italic; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 16px; }
.mitem {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 16px 16px 16px 18px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.mitem:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.mitem.is-off { opacity: .45; }
.mitem__name { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--cream); line-height: 1.15; }
.mitem__desc { margin: 4px 0 0; font-size: 13px; color: var(--dim); line-height: 1.45; }
.mitem__price { margin: 8px 0 0; font-family: var(--serif); font-size: 17px; color: var(--gold-lt); }
.mitem__price small { font-family: var(--sans); font-size: 11px; color: var(--dim); letter-spacing: .06em; margin-left: 6px; }
.mitem__add {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold-lt);
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; position: relative;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.mitem__add:hover { background: var(--gold); color: #1c130b; transform: scale(1.06); }
.mitem__add[data-in]:not([data-in="0"])::after { content: attr(data-in); position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--gold); color: #1c130b; font-size: 11px; font-family: var(--sans); font-weight: 600; display: grid; place-items: center; padding: 0 5px; }
.mitem.is-off .mitem__add { pointer-events: none; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 300; display: none; }
.drawer.is-open { display: block; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(8, 5, 3, .72); backdrop-filter: blur(4px); animation: fade .3s var(--ease); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg)); border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 90px -30px rgba(0,0,0,.9); animation: slidein .4s var(--ease);
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.drawer__head .modal__close { position: static; }
.drawer__title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; color: var(--cream); }
.drawer__body { flex: 1; overflow: auto; padding: 8px 24px 20px; }
.drawer__foot { padding: 14px 24px 22px; border-top: 1px solid var(--line); background: rgba(0,0,0,.25); }
.drawer__pay { width: 100%; --by: 16px; margin-top: 10px; }
.drawer__pay b { font-weight: 600; }

.cart { display: flex; flex-direction: column; }
.cline { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cline__name { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--cream); }
.cline__note { margin: 2px 0 0; font-size: 12px; color: var(--dim); font-style: italic; }
.cline__price { margin: 6px 0 0; font-size: 14px; color: var(--gold-lt); }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 30px; height: 34px; align-self: start; }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--gold-lt); font-size: 18px; cursor: pointer; border-radius: 50%; }
.qty button:hover { background: rgba(201,162,75,.12); }
.qty span { min-width: 22px; text-align: center; font-size: 14px; color: var(--cream); }
.cart__empty { text-align: center; color: var(--dim); padding: 40px 10px; }

.oform { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.oform__sec { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.oform__h { margin: 0 0 2px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-pale); font-weight: 500; }
.oform__zone { margin: 0; font-size: 13px; min-height: 18px; }
.oform__zone.ok { color: #9fd3a8; } .oform__zone.bad { color: #f0a49c; } .oform__zone.wait { color: var(--dim); }
.oform__err { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: #f0d9d2; background: rgba(158,43,37,.14); border: 1px solid rgba(158,43,37,.5); }
.tips { display: flex; gap: 8px; flex-wrap: wrap; }
.tips button { padding: 8px 14px; border-radius: 30px; border: 1px solid var(--line-strong); background: transparent; color: var(--taupe-2); cursor: pointer; font-family: var(--sans); font-size: 13px; }
.tips button.is-on { background: var(--gold); color: #1c130b; border-color: var(--gold); }
.totals { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; color: var(--taupe); }
.totals dt, .totals dd { margin: 0; }
.totals__total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; color: var(--cream) !important; font-family: var(--serif); font-size: 20px; }
.totals__total dd { color: var(--gold-lt); }

/* ---------- picker modal ---------- */
.modal__dialog--sm { width: min(440px, calc(100vw - 32px)); text-align: left; }
.pick__title { margin: 6px 0 4px; font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--cream); }
.pick__desc { margin: 0 0 16px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.pick__variants { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pick__variants label { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--cream); }
.pick__variants label.is-on { border-color: var(--gold); background: rgba(201,162,75,.08); }
.pick__variants input { display: none; }
.pick__variants b { color: var(--gold-lt); font-weight: 500; }
.pick__qty { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 16px 0; }
.pick__qty button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold-lt); font-size: 20px; cursor: pointer; }
.pick__qty span { font-family: var(--serif); font-size: 22px; color: var(--cream); min-width: 28px; text-align: center; }
.pick__add { width: 100%; }

@media (max-width: 640px) {
  .modeseg { display: flex; width: 100%; }
  .modeseg__btn { flex: 1; justify-content: center; padding: 10px 12px; }
  .modeseg__btn small { display: none; }
  .cattabs { top: 60px; }
  .drawer__panel { width: 100vw; }
  .cartbtn__total { display: none; }
}
