/* ==========================================================
   كبابجي كارم — ordering page (menu.html)
   Loaded after style.css.
   ========================================================== */

a:focus-visible,button:focus-visible{outline:3px solid #214C6F;outline-offset:3px}
.page-hero a:focus-visible,.page-hero button:focus-visible{outline-color:#FFFFFF}

.order-wrap{max-width:1280px;margin:0 auto;padding:40px clamp(20px,4vw,40px) clamp(56px,7vw,88px);box-sizing:border-box}
.order-row{display:flex;flex-wrap:wrap;gap:32px;align-items:flex-start}
.panel{flex:1 1 560px;min-width:0;display:flex;flex-direction:column;gap:32px}

/* ---------- category tabs ---------- */
.tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-bottom:40px}
/* search across the whole menu */
.msearch{display:flex;align-items:center;gap:10px;max-width:560px;margin:0 auto 18px;padding:0 16px;min-height:52px;border:2px solid rgba(43,18,0,.18);border-radius:999px;background:#fff;color:#6B3F26}
.msearch:focus-within{border-color:#FF7B17}
.msearch input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:17px;color:#2B1200;padding:12px 0}
.res-head{margin:0 0 12px;font-size:17px;font-weight:700;color:#6B3F26}
.mc-cat{font-size:14px;color:#6B3F26}
.line-note{display:block;font-size:14px;color:#6B3F26;font-weight:600}
.dlg-noteln{display:flex;flex-direction:column;gap:6px;font-weight:700}
.dlg-noteln textarea{font:inherit;font-size:16px;font-weight:400;min-height:56px;padding:10px 12px;border-radius:12px;border:2px solid rgba(43,18,0,.18);resize:vertical}
.opt[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
.tab{min-height:52px;padding:0 26px;border-radius:999px;border:2px solid #214C6F;background:transparent;color:#214C6F;font-family:'Cairo',system-ui,sans-serif;font-size:19px;font-weight:700;cursor:pointer;transition:background-color .15s ease,color .15s ease}
.tab:hover,.tab[aria-pressed="true"]{background:#214C6F;color:#FFFFFF}

/* ---------- category banner and groups ---------- */
.banner{position:relative;height:clamp(150px,17vw,210px);border-radius:24px;overflow:hidden;background:#2A1204}
.banner img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.banner::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(26,11,3,.8) 0%,rgba(26,11,3,0) 70%)}
.banner h2{position:absolute;z-index:1;right:28px;bottom:18px;margin:0;color:#FFFFFF;font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:clamp(30px,3.6vw,46px);line-height:1.3;text-shadow:0 2px 20px rgba(0,0,0,.5)}
.grp{display:flex;flex-direction:column;gap:16px}
.grp-head{display:flex;flex-direction:column;gap:4px}
.grp h3{margin:0;font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:28px;line-height:1.4}
.grp-note{margin:0;font-size:17px;color:#5A3420}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}

/* ---------- item cards ---------- */
.mc{display:flex;flex-direction:column;gap:10px;box-sizing:border-box;min-width:0;padding:18px 20px;border-radius:22px;background:#FFFFFF;border:1px solid rgba(43,18,0,.12);text-align:start;color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:17px;line-height:1.6;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.mc:hover{transform:translateY(-2px);border-color:#214C6F;box-shadow:0 10px 26px rgba(43,18,0,.12)}
.mc:hover .mc-add{background:#214C6F;color:#FFFFFF}
.mc-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.mc-name{flex:1;font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:19px;line-height:1.5}
.mc-badge{flex:none;background:#FF7B17;color:#2B1200;border-radius:999px;padding:2px 12px;font-size:14.5px;font-weight:700;white-space:nowrap}
.mc-note{font-size:15px;line-height:1.65;color:#6B3F26;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:4px}
.mc-price{font-weight:700;font-size:18px;color:#214C6F}
.mc-add{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 18px;border-radius:999px;border:2px solid #214C6F;color:#214C6F;font-size:17px;font-weight:700;transition:background-color .15s ease,color .15s ease}

/* ---------- item popup ---------- */
.ovl{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box;background:rgba(26,11,3,.66);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.dlg{position:relative;display:flex;flex-direction:column;width:min(560px,100%);max-height:min(92vh,880px);border-radius:28px;overflow:hidden;background:#FFF7EE;color:#2B1200;box-shadow:0 30px 80px rgba(0,0,0,.45);outline:0}
.dlg-x{position:absolute;top:14px;left:14px;z-index:3;width:46px;height:46px;padding:0;border-radius:50%;border:0;background:#FFFFFF;color:#2B1200;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 12px rgba(0,0,0,.28);transition:transform .15s ease}
.dlg-x:hover{transform:scale(1.06)}
.dlg-scroll{flex:1;min-height:0;overflow-y:auto}
.dlg-pic{position:relative;height:clamp(140px,26vh,200px);background:#2A1204;overflow:hidden}
.dlg-pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.dlg-pic::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(26,11,3,.55) 0%,rgba(26,11,3,0) 65%)}
.dlg-body{display:flex;flex-direction:column;gap:16px;padding:22px 24px 26px}
.dlg-head{display:flex;flex-direction:column;gap:6px}
.dlg-title{margin:0;font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:clamp(26px,5vw,32px);line-height:1.35}
.dlg-price{font-weight:700;font-size:22px;color:#214C6F}
.dlg-note{margin:0;font-size:17px;line-height:1.75;color:#5A3420}
.req{display:flex;flex-direction:column;gap:12px}
.req-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.req-title{font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:21px}
.req-tag{background:#FFE5D0;color:#8A3A00;border-radius:999px;padding:2px 14px;font-size:15px;font-weight:700}
.opts-list{display:flex;flex-direction:column;gap:10px}
.dlg-foot{display:flex;align-items:center;gap:12px;padding:16px 20px;background:#FFFFFF;border-top:1px solid rgba(43,18,0,.12)}
.opt{display:flex;align-items:center;gap:14px;width:100%;box-sizing:border-box;min-height:64px;padding:0 18px;border-radius:18px;background:#FFFFFF;border:2px solid rgba(43,18,0,.14);color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:19px;font-weight:700;text-align:start;cursor:pointer;transition:border-color .15s ease,background-color .15s ease}
.opt:hover{border-color:#214C6F}
.opt-on{border-color:#214C6F;background:#FFE5D0}
.radio{flex:none;width:26px;height:26px;box-sizing:border-box;border-radius:50%;border:2px solid #214C6F;background:#FFFFFF;display:flex;align-items:center;justify-content:center}
.radio i{display:block;width:12px;height:12px;border-radius:50%;background:#FF7B17}
.addbtn{flex:1;min-width:0;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:14px;min-height:60px;padding:0 22px;border-radius:999px;border:0;font-family:'Cairo',system-ui,sans-serif;font-size:19px;font-weight:700;transition:transform .15s ease,filter .15s ease}
.addbtn-on{background:#FF7B17;color:#2B1200;cursor:pointer}
.addbtn-off{background:rgba(43,18,0,.12);color:#6B3F26;cursor:not-allowed}
.addbtn:not([disabled]):hover{transform:translateY(-2px);filter:brightness(1.06)}
.addbtn .sep{width:1px;height:26px;background:rgba(43,18,0,.35)}
.qs{flex:none;display:flex;align-items:center;gap:6px;padding:5px;border-radius:999px;border:2px solid rgba(43,18,0,.14);background:#FFFFFF}
.qty{min-width:30px;text-align:center;font-weight:700;font-size:20px}

/* ---------- cart (side panel on desktop, bottom sheet on phones) ---------- */
.cart{flex:0 1 400px;min-width:min(100%,320px);box-sizing:border-box;position:sticky;top:24px;align-self:flex-start;max-height:calc(100vh - 48px);overflow:auto;padding:28px;border-radius:26px;background:#FF7B17;color:#2B1200;display:flex;flex-direction:column;gap:18px}
.cart:focus{outline:0}
.cart-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cart h2{margin:0;font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:30px;line-height:1.3}
.cart-tools{display:flex;align-items:center;gap:10px}
.cart-count{background:#2B1200;color:#FFFFFF;border-radius:999px;padding:2px 14px;font-size:16px;font-weight:700}
.lines{display:flex;flex-direction:column;gap:14px}
.line{display:flex;flex-direction:column;gap:10px;padding-bottom:14px;border-bottom:1px solid rgba(43,18,0,.28)}
.line-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.line-name{font-weight:700;font-size:18px;line-height:1.5}
.line-label{font-weight:600;color:#4A2410}
.line-total{font-weight:700;font-size:18px;white-space:nowrap}
.line-ctl{display:flex;align-items:center;gap:12px}
.line-qty{min-width:28px;text-align:center;font-weight:700;font-size:19px}
.line-unit{margin-inline-start:auto;font-size:15.5px;color:#4A2410}
.sum{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:20px;font-weight:700}
.qb{width:44px;height:44px;padding:0;border-radius:50%;border:2px solid rgba(43,18,0,.6);background:transparent;color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:22px;font-weight:700;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .15s ease}
.qb:hover{background:rgba(43,18,0,.12)}
.details{display:flex;flex-direction:column;gap:18px}
.details h3:focus{outline:0}
.details h3{margin:0;font-family:'Kufam','Cairo',sans-serif;font-weight:800;font-size:24px;line-height:1.4;scroll-margin-top:22px}
.segs{display:flex;gap:10px}
.seg{flex:1;min-height:48px;border-radius:999px;border:2px solid rgba(43,18,0,.6);background:transparent;color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:17px;font-weight:700;cursor:pointer}
.seg:hover{background:rgba(43,18,0,.12)}
.seg[aria-pressed="true"]{background:#2B1200;border-color:#2B1200;color:#FFFFFF}
.totals{display:flex;flex-direction:column;gap:8px;padding:14px 0;border-top:1px solid rgba(43,18,0,.28);border-bottom:1px solid rgba(43,18,0,.28)}
.tot-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:18px;font-weight:600}
.tot-row.grand{font-size:22px;font-weight:700}
.lbl{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:15.5px;color:#4A2410}
.in{width:100%;box-sizing:border-box;min-height:48px;padding:10px 14px;border-radius:14px;border:2px solid transparent;background:#FFFFFF;color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:17px;font-weight:600;line-height:1.5}
.in:focus{outline:3px solid #2B1200;outline-offset:1px}
textarea.in{resize:vertical;min-height:72px}
.send{display:flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;width:100%;min-height:60px;padding:0 24px;border-radius:999px;border:0;font-family:'Cairo',system-ui,sans-serif;font-size:20px;font-weight:700;transition:transform .15s ease,filter .15s ease}
.send:not([disabled]):hover{transform:translateY(-2px);filter:brightness(1.06)}
.send-dark{background:#2B1200;color:#FFFFFF;cursor:pointer}
.send-off{background:rgba(43,18,0,.15);color:#4A2410;cursor:not-allowed}
.back{min-height:44px;padding:0 8px;border:0;background:transparent;color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:17px;font-weight:700;text-decoration:underline;cursor:pointer}

/* floating order bar + cart sheet controls: hidden on desktop.
   #barHost must not create its own box, or the bar could not stick to the screen bottom. */
#barHost{display:contents}
.cart-x,.cart-ovl,.mbar{display:none}

/* ---------- small laptops / tablets landscape: cart stays beside the list ---------- */
@media (min-width:901px) and (max-width:1071px){
  .order-row{flex-wrap:nowrap}
  .panel{flex:1 1 0}
  .cart{flex:0 0 340px;min-width:0}
}

/* ---------- tablets and phones ---------- */
@media (max-width:900px){
  .tabs{position:sticky;top:0;z-index:20;flex-wrap:nowrap;justify-content:flex-start;gap:10px;overflow-x:auto;scrollbar-width:none;margin-bottom:20px;margin-inline:calc(-1 * clamp(20px,4vw,40px));padding:12px clamp(20px,4vw,40px);background:#FFF7EE;border-bottom:1px solid rgba(43,18,0,.12)}
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:none;white-space:nowrap;min-height:46px;padding:0 20px;font-size:17px}
  .panel{scroll-margin-top:84px}

  .mbar{display:flex;align-items:center;gap:12px;position:sticky;bottom:12px;z-index:30;box-sizing:border-box;width:100%;margin-top:24px;min-height:62px;padding:0 10px 0 22px;border:0;border-radius:999px;background:#FF7B17;color:#2B1200;font-family:'Cairo',system-ui,sans-serif;font-size:18px;font-weight:700;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.35)}
  .mbar-n{flex:none;display:flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 6px;box-sizing:border-box;border-radius:999px;background:#2B1200;color:#FFFFFF;font-size:19px}
  .mbar-t{flex:1;min-width:0;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mbar-p{flex:none;white-space:nowrap}

  .cart{display:none}
  .cart[data-sheet="open"]{display:flex;position:fixed;top:auto;right:0;left:0;bottom:0;z-index:90;box-sizing:border-box;width:100%;min-width:0;max-height:90vh;border-radius:28px 28px 0 0;padding:22px 20px calc(28px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(0,0,0,.4)}
  .cart-ovl{display:block;position:fixed;inset:0;z-index:89;background:rgba(26,11,3,.62)}
  .cart-x{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border-radius:50%;border:2px solid rgba(43,18,0,.6);background:transparent;color:#2B1200;cursor:pointer}
}
@media (max-width:360px){
  .dlg-foot{flex-wrap:wrap}
  .addbtn{flex:1 1 100%;order:-1}
  .qs{margin-inline:auto}
}
@media (max-width:600px){
  .ovl{align-items:flex-end;padding:0}
  .dlg{width:100%;max-height:92vh;border-radius:28px 28px 0 0}
  .dlg-foot{padding:14px 16px;gap:10px}
  .addbtn{font-size:17px;gap:10px;padding:0 12px}
  .qs .qb{width:40px;height:40px}
}

/* owner switches: closed restaurant, sold-out dishes, sign-in step */
.closed-note{margin:0 0 28px;padding:16px 24px;border-radius:24px;background:#2B1200;color:#FFFFFF;font-size:19px;font-weight:700;line-height:1.7;text-align:center}
.mc[aria-disabled="true"]{opacity:.62;cursor:not-allowed}
.mc[aria-disabled="true"]:hover{transform:none;border-color:rgba(43,18,0,.12);box-shadow:none}
.mc[aria-disabled="true"]:hover .mc-add{background:transparent;color:#214C6F}
.mc-gone{border-color:#A84828 !important;color:#A84828 !important}
.step-note{margin:0;font-size:17px;line-height:1.7;font-weight:600}
.step-err{margin:0;padding:10px 14px;border-radius:14px;background:#FFFFFF;color:#A84828;font-size:16px;font-weight:700;line-height:1.6}
.send[disabled]{cursor:not-allowed;opacity:.7}
a.send{text-decoration:none}
/* order again */
.reorder{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:18px}
.reorder-t{font-weight:800;font-size:18px;color:#6B3F26}
.reorder-b{min-height:46px;padding:0 18px;border-radius:999px;border:2px solid #FF7B17;background:#FFFFFF;color:#6B3F26;font-family:'Cairo',system-ui,sans-serif;font-size:16px;font-weight:700;cursor:pointer}
.reorder-b:hover{background:#FF7B17;color:#214C6F}
.promo-bar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.promo-b{min-height:50px;padding:8px 18px;border-radius:18px;border:2px solid #FF7B17;background:#FF7B17;color:#214C6F;font-family:'Cairo',system-ui,sans-serif;font-size:17px;font-weight:800;cursor:pointer;text-align:start}

/* phones: smaller banner, tabs, cards */
@media (max-width:600px){
  .order-wrap{padding:16px 14px 48px}
  .panel{gap:18px}
  .tabs{gap:8px;margin-bottom:18px;margin-inline:-14px;padding-inline:14px}   /* match .order-wrap's 14px sides, or the page scrolls sideways */
  .tab{min-height:40px;padding:0 16px;font-size:15px}
  .banner{height:110px;border-radius:18px}
  .banner h2{right:16px;bottom:10px;font-size:24px}
  .grp{gap:10px}
  .grp h3{font-size:21px}
  .grp-note{font-size:14px}
  .grid{grid-template-columns:1fr;gap:10px}
  .mc{padding:12px 14px;gap:6px;border-radius:16px}
  .mc-name{font-size:16.5px}
  .mc-note{font-size:13.5px}
  .mc-price{font-size:16px}
  .mc-add{min-height:38px;padding:0 14px;font-size:15px}
  .dlg-body{padding:16px;gap:12px}
  .dlg-title{font-size:22px}
  .dlg-note{font-size:15px}
  .req-title{font-size:17px}
}

/* card = two parts: the details area (opens the popup) and the "+" button (adds) */
.mc{padding:0;gap:0;cursor:default;overflow:hidden}
.mc:hover .mc-add{background:transparent;color:#214C6F}
.mc-open{display:flex;flex-direction:column;gap:8px;width:100%;box-sizing:border-box;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}
.mc > .mc-open{padding:18px 20px 6px}
.mc-foot{padding:0 20px 16px 20px;margin-top:0}
.mc-foot .mc-pr{width:auto;flex:1;padding:6px 0}
.mc-add{cursor:pointer;background:transparent}
.mc-add:hover{background:#214C6F;color:#FFFFFF}
.mc[aria-disabled="true"] .mc-open{cursor:not-allowed}
.dlg-comp{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:12px;background:#FFE5D0}
.dlg-comp .dlg-note{margin:0}
@media (max-width:600px){
  .mc{padding:0;gap:0}
  .mc > .mc-open{padding:12px 14px 4px}
  .mc-foot{padding:0 14px 12px}
}
