/* ============================================
   صفحة العميل — order.html
   ============================================ */

body { min-height: 100vh; }

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--s2);
  display: flex;
  flex-direction: column;
}

/* ── STEPS BAR ── */
.steps-bar {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 16px; background: var(--s);
  border-bottom: 0.5px solid var(--b);
  position: sticky; top: 0; z-index: 30;
}
.sb-step { display: flex; align-items: center; }
.sb-wrap { display: flex; flex-direction: column; align-items: center; }
.sb-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--b2); background: var(--s);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--t3);
  transition: all .3s; flex-shrink: 0;
}
.sb-dot.done { background: var(--green-mid); border-color: var(--green-mid); color: #fff; }
.sb-dot.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sb-lbl { font-size: 9px; color: var(--t3); margin-top: 3px; text-align: center; white-space: nowrap; }
.sb-lbl.active { color: var(--brand); font-weight: 600; }
.sb-lbl.done { color: var(--green-mid); }
.sb-line { width: 24px; height: 1.5px; background: var(--b2); transition: background .3s; margin: 0 2px; }
.sb-line.done { background: var(--green-mid); }

/* ── HERO ── */
.hero {
  background: linear-gradient(145deg, #7a0a1c, var(--brand));
  padding: 28px 20px 22px; text-align: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.hero::after {
  content: '🍗'; position: absolute; font-size: 130px; opacity: .07;
  bottom: -25px; left: -20px; transform: rotate(-20deg);
}
.h-logo { font-size: 46px; margin-bottom: 6px; }
.h-name { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: .02em; }
.h-sub { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 3px; }
.h-chips { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.h-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.12); border: 0.5px solid rgba(255,255,255,.25);
  border-radius: 20px; padding: 5px 12px; font-size: 12px; color: rgba(255,255,255,.9);
}

/* ── SECTIONS ── */
.sec { padding: 14px 16px; flex-shrink: 0; }
.sec-card { background: var(--s); border-radius: var(--rl); border: 0.5px solid var(--b); overflow: hidden; }
.sec-head { padding: 13px 14px; border-bottom: 0.5px solid var(--b); display: flex; align-items: center; gap: 8px; }
.sec-head h2 { font-size: 14px; font-weight: 600; color: var(--t); flex: 1; }
.sec-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sec-body { padding: 14px; }

/* ── INPUTS ── */
.inp {
  width: 100%; padding: 11px 12px; border: 1px solid var(--b2); border-radius: var(--r);
  font-size: 15px; color: var(--t); background: var(--s2); transition: border .15s;
}
.inp:focus { outline: none; border-color: var(--brand); }
.inp-lbl { font-size: 12px; color: var(--t2); margin-bottom: 6px; font-weight: 500; }
.inp-group { margin-bottom: 12px; }
.inp-group:last-child { margin-bottom: 0; }
.primary-btn {
  width: 100%; padding: 12px; background: var(--brand); color: #fff; border: none;
  border-radius: var(--r); font-size: 14px; font-weight: 600; cursor: pointer;
  margin-top: 12px; transition: opacity .15s;
}
.primary-btn:hover { opacity: .88; }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; }
.verified-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px;
  background: var(--green-light); border-radius: var(--r); font-size: 13px;
  color: var(--green); font-weight: 500; margin-top: 10px;
}

/* ── ORDER TYPE ── */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.type-card {
  border: 1.5px solid var(--b); border-radius: var(--r); padding: 16px 10px;
  text-align: center; cursor: pointer; transition: all .15s; background: var(--s);
}
.type-card.on { border-color: var(--brand); background: var(--brand-light); }
.type-card .tc-icon { font-size: 26px; margin-bottom: 5px; }
.type-card .tc-name { font-size: 13px; font-weight: 600; color: var(--t); }
.type-card .tc-desc { font-size: 11px; color: var(--t2); margin-top: 2px; }
.type-card.on .tc-name { color: var(--brand); }

.delivery-options {
  background: var(--s2); border-radius: var(--r); padding: 14px;
  border: 0.5px solid var(--b); display: none;
}
.delivery-options.show { display: block; }
.gps-btn {
  width: 100%; padding: 10px; background: var(--blue-light); border: 0.5px solid var(--blue);
  border-radius: var(--r); font-size: 13px; color: var(--blue); cursor: pointer; font-weight: 500;
  margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.gps-btn:disabled { opacity: .7; }
.gps-result {
  font-size: 12px; color: var(--t2); padding: 8px 10px; background: var(--s);
  border-radius: var(--r); border: 0.5px solid var(--b); margin-top: 6px; display: none; line-height: 1.6;
}
.zone-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.zone-btn {
  padding: 11px; border: 1.5px solid var(--b2); border-radius: var(--r); text-align: center;
  cursor: pointer; background: var(--s); transition: all .15s;
}
.zone-btn.on { border-color: var(--green-mid); background: var(--green-light); }
.zone-btn .zb-name { font-size: 13px; font-weight: 600; color: var(--t); }
.zone-btn .zb-price { font-size: 14px; font-weight: 700; color: var(--brand); margin-top: 2px; }
.zone-btn.on .zb-name { color: var(--green); }
.zone-btn.on .zb-price { color: var(--green-mid); }

/* ── PAYMENT ── */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pay-card {
  border: 1.5px solid var(--b); border-radius: var(--r); padding: 13px 8px;
  text-align: center; cursor: pointer; transition: all .15s; background: var(--s);
}
.pay-card.on { border-color: var(--brand); background: var(--brand-light); }
.pay-card .pc-icon { font-size: 24px; margin-bottom: 4px; }
.pay-card .pc-name { font-size: 12px; font-weight: 600; color: var(--t); }
.pay-card.on .pc-name { color: var(--brand); }
.transfer-info {
  background: var(--gold-light); border: 0.5px solid var(--gold-mid); border-radius: var(--r);
  padding: 11px 12px; margin-top: 12px; font-size: 12px; color: #633806; display: none; line-height: 1.8;
}
.transfer-info.show { display: block; }

/* ── MENU ── */
.search-row { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 0.5px solid var(--b); background: var(--s); }
.s-inp { flex: 1; padding: 9px 14px; border: 1px solid var(--b2); border-radius: 20px; font-size: 14px; color: var(--t); background: var(--s2); }
.s-inp:focus { outline: none; border-color: var(--brand); }
.cats-scroll {
  display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto;
  background: var(--s); border-bottom: 0.5px solid var(--b);
}
.cats-scroll::-webkit-scrollbar { display: none; }
.cpill {
  flex-shrink: 0; padding: 6px 16px; border-radius: 20px; border: 1px solid var(--b2);
  background: var(--s2); font-size: 13px; cursor: pointer; color: var(--t2);
  transition: all .12s; white-space: nowrap; font-weight: 500;
}
.cpill.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.menu-body { padding: 0 16px; background: var(--s); }
.cat-hdr {
  font-size: 11px; font-weight: 700; color: var(--brand); letter-spacing: .05em;
  padding: 4px 12px; background: var(--brand-light); border-radius: 20px;
  display: inline-block; margin: 14px 0 8px;
}
.m-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 0.5px solid var(--b); }
.m-item:last-child { border-bottom: none; }
.m-info { flex: 1; }
.m-name { font-size: 14px; font-weight: 500; color: var(--t); margin-bottom: 2px; }
.m-desc { font-size: 12px; color: var(--t2); line-height: 1.4; }
.m-tags { display: flex; gap: 4px; margin-top: 4px; }
.mtag { font-size: 10px; padding: 1px 7px; border-radius: 8px; }
.mtag-hot { background: #FFF0F0; color: #A32D2D; border: 0.5px solid #F09595; }
.mtag-new { background: var(--gold-light); color: #633806; border: 0.5px solid #FAC775; }
.m-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.m-price { font-size: 15px; font-weight: 700; color: var(--brand); }
.m-ctrl { display: flex; align-items: center; gap: 7px; }
.mqb {
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--brand-border);
  background: var(--brand-light); cursor: pointer; font-size: 17px; color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
  transition: all .12s; flex-shrink: 0;
}
.mqb.add { background: var(--brand); color: #fff; border-color: var(--brand); }
.mqn { font-size: 14px; font-weight: 700; color: var(--t); min-width: 18px; text-align: center; }
.m-note-wrap { padding: 0 0 10px; display: none; }
.m-note {
  width: 100%; padding: 7px 10px; border: 0.5px solid var(--b2); border-radius: var(--r);
  font-size: 12px; color: var(--t); background: var(--s2);
}
.m-note:focus { outline: none; border-color: var(--brand); }

/* ── FLOAT CART ── */
.float-cart { position: sticky; bottom: 12px; margin: 0 16px; display: none; z-index: 20; }
.fc-btn {
  width: 100%; padding: 14px 18px; background: var(--brand); color: #fff; border: none;
  border-radius: var(--rl); font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 6px 24px rgba(155,13,35,.35);
}
.fc-chip { background: rgba(255,255,255,.2); border-radius: 12px; padding: 4px 12px; font-size: 13px; }

/* ── CART REVIEW ── */
.cart-review { background: var(--s); border-radius: var(--rl); border: 0.5px solid var(--b); overflow: hidden; margin: 14px 16px; }
.cr-head { padding: 13px 14px; border-bottom: 0.5px solid var(--b); font-size: 14px; font-weight: 600; color: var(--t); display: flex; justify-content: space-between; align-items: center; }
.cr-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 0.5px solid var(--b); }
.cr-name { flex: 1; font-size: 13px; color: var(--t); line-height: 1.3; }
.cr-note { font-size: 11px; color: var(--t3); font-style: italic; }
.cr-ctrl { display: flex; align-items: center; gap: 6px; }
.crqb {
  width: 24px; height: 24px; border-radius: 50%; border: 0.5px solid var(--b2);
  background: var(--s2); cursor: pointer; font-size: 14px; color: var(--t);
  display: flex; align-items: center; justify-content: center;
}
.crqn { font-size: 13px; font-weight: 700; min-width: 14px; text-align: center; }
.cr-price { font-size: 13px; color: var(--t2); min-width: 48px; text-align: left; }
.del-btn { color: var(--t3); cursor: pointer; font-size: 14px; padding: 2px; }
.cr-totals { padding: 11px 14px; border-top: 0.5px solid var(--b); }
.tot-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--t2); padding: 3px 0; }
.tot-row.grand { font-size: 16px; font-weight: 700; color: var(--t); padding-top: 8px; margin-top: 5px; border-top: 0.5px solid var(--b); }
.tot-row.delivery { color: var(--green); font-weight: 500; }
.g-note {
  width: 100%; padding: 9px 12px; border: 0.5px solid var(--b2); border-radius: var(--r);
  font-size: 13px; color: var(--t); background: var(--s2); resize: none; margin: 10px 0 0;
}
.g-note:focus { outline: none; border-color: var(--brand); }
.order-summary-info {
  background: var(--s2); border-radius: var(--r); padding: 11px 12px;
  margin: 12px 16px 8px; font-size: 12px; color: var(--t2); line-height: 1.8;
}
.send-wrap { padding: 6px 16px 16px; }
.send-btn {
  width: 100%; padding: 14px; background: var(--brand); color: #fff; border: none;
  border-radius: var(--rl); font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 18px rgba(155,13,35,.25); transition: opacity .15s;
}
.send-btn:hover { opacity: .88; }
.send-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── TRACKER ── */
.tracker-card { background: var(--s); border-radius: var(--rl); border: 0.5px solid var(--b); margin: 14px 16px; overflow: hidden; }
.tr-hero { background: linear-gradient(135deg, #7a0a1c, var(--brand)); padding: 20px; text-align: center; }
.tr-hero .trh-num { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.75); margin-bottom: 4px; }
.tr-hero .trh-total { font-size: 32px; font-weight: 700; color: #fff; }
.tr-hero .trh-time { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; }
.tr-banner { padding: 13px 14px; text-align: center; font-size: 14px; font-weight: 600; }
.trb-pending { background: #FAEEDA; color: #633806; border-bottom: 0.5px solid #FAC775; }
.trb-preparing { background: var(--blue-light); color: var(--blue); border-bottom: 0.5px solid #B3D4F5; }
.trb-ready { background: var(--gold-light); color: #633806; border-bottom: 0.5px solid var(--gold-mid); font-size: 16px; }
.trb-done { background: var(--green-light); color: var(--green); border-bottom: 0.5px solid var(--green-mid); }
.trb-cancelled { background: var(--brand-light); color: var(--brand); border-bottom: 0.5px solid var(--brand-border); }
.tr-steps { display: flex; align-items: flex-start; padding: 16px 18px; }
.tr-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.tr-line { position: absolute; top: 14px; left: 50%; right: -50%; height: 2px; background: var(--b); z-index: 0; transition: background .5s; }
.tr-line.done { background: var(--green-mid); }
.tr-step:last-child .tr-line { display: none; }
.tr-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--b2); background: var(--s);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  position: relative; z-index: 1; transition: all .4s;
}
.tr-dot.done { background: var(--green-mid); border-color: var(--green-mid); color: #fff; }
.tr-dot.active { background: var(--gold-light); border-color: var(--gold-mid); animation: tpulse 1.5s infinite; }
@keyframes tpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,159,39,.4); }
  50% { box-shadow: 0 0 0 6px rgba(239,159,39,0); }
}
.tr-lbl { font-size: 11px; color: var(--t2); text-align: center; line-height: 1.3; }
.tr-lbl.done { color: var(--green-mid); }
.tr-lbl.active { color: var(--gold); font-weight: 600; }
.tr-items { padding: 13px 14px; border-top: 0.5px solid var(--b); }
.tr-item-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--t2); padding: 3px 0; }
.tr-total-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; color: var(--t); padding-top: 8px; margin-top: 5px; border-top: 0.5px dashed var(--b); }
.tr-delivery-info { background: var(--s2); border-radius: var(--r); padding: 9px 12px; margin: 0 14px 12px; font-size: 12px; color: var(--t2); border: 0.5px solid var(--b); line-height: 1.7; }
.tr-actions { display: flex; gap: 8px; padding: 10px 14px 16px; }
.tr-action-btn {
  flex: 1; padding: 10px; border: 0.5px solid var(--b2); border-radius: var(--r);
  font-size: 13px; color: var(--t); background: var(--s2); cursor: pointer; text-align: center; font-weight: 500;
}
.tr-action-btn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
