/* Uber Eats-inspired ORDER UX layer.
   Scope: food/drinks/orderable products only. Booking flows remain unchanged. */

body.wigo-order-ubereats-v1 {
  --wigo-order-ink:#111;
  --wigo-order-muted:#6b6b6b;
  --wigo-order-line:#ececec;
  --wigo-order-soft:#f3f3f3;
}

body.wigo-order-ubereats-v1 .wigo-orderable-card {
  position:relative;
  overflow:visible;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

body.wigo-order-ubereats-v1 .wigo-orderable-card .product-art,
body.wigo-order-ubereats-v1 .wigo-orderable-card .rc8-row-product-media,
body.wigo-order-ubereats-v1 .wigo-orderable-card .rc8-row-product-image {
  position:relative;
  overflow:hidden;
  border-radius:16px;
}

body.wigo-order-ubereats-v1 .product-card.wigo-orderable-card .product-art {
  height:150px;
}

body.wigo-order-ubereats-v1 .wigo-orderable-card .card-copy {
  padding:10px 0 12px;
}

body.wigo-order-ubereats-v1 .wigo-orderable-card .card-copy h3 {
  margin:0 0 5px;
  color:var(--wigo-order-ink);
  font-size:17px;
  font-weight:560;
  line-height:1.18;
  letter-spacing:-.02em;
}

body.wigo-order-ubereats-v1 .wigo-orderable-card .card-copy p,
body.wigo-order-ubereats-v1 .wigo-orderable-card .availability {
  display:none!important;
}

body.wigo-order-ubereats-v1 .wigo-orderable-card .price {
  margin-top:0;
  color:#1c1c1c;
  font-size:15px;
  font-weight:500;
}

body.wigo-order-ubereats-v1 .featured-card.wigo-orderable-card {
  flex-basis:min(46vw,240px);
  scroll-snap-align:start;
}

body.wigo-order-ubereats-v1 .featured-card.wigo-orderable-card .product-art {
  height:160px;
}

.wigo-order-quick-add {
  position:absolute;
  right:10px;
  top:10px;
  bottom:auto;
  z-index:8;
  display:grid;
  grid-template-columns:36px 28px 36px;
  align-items:center;
  justify-items:center;
  min-width:42px;
  height:42px;
  overflow:visible;
  border:1px solid rgba(0,0,0,.05);
  border-radius:999px;
  background:#fff;
  color:#111;
  box-shadow:0 3px 12px rgba(0,0,0,.14);
  line-height:1;
  -webkit-tap-highlight-color:transparent;
}

.wigo-order-quick-add[data-qty="0"] {
  grid-template-columns:42px;
  width:42px;
}

.wigo-order-quick-add[data-qty="0"] .wigo-order-qty-minus,
.wigo-order-quick-add[data-qty="0"] .wigo-order-qty-value {
  display:none;
}

.wigo-order-qty-step {
  appearance:none;
  -webkit-appearance:none;
  border:0;
  padding:0;
  background:transparent;
  color:inherit;
  font-family:inherit;
  line-height:1;
  position:relative;
  display:grid;
  place-items:center;
  width:36px;
  height:40px;
  border-radius:999px;
  font-size:25px;
  font-weight:430;
  cursor:pointer;
  user-select:none;
  touch-action:manipulation;
}

.wigo-order-qty-value {
  min-width:28px;
  color:#111;
  text-align:center;
  font-size:15px;
  font-weight:650;
  pointer-events:none;
}

.wigo-order-qty-step:active {
  background:#efefef;
  transform:scale(.94);
}

body.wigo-order-ubereats-v1 .cart-bar {
  left:50%;
  right:auto;
  bottom:calc(103px + env(safe-area-inset-bottom));
  z-index:92;
  width:auto;
  min-width:190px;
  max-width:calc(100vw - 42px);
  min-height:58px;
  padding:0 24px;
  transform:translateX(-50%);
  border-radius:999px;
  background:#050505;
  color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.28);
}

body.wigo-order-ubereats-v1 .cart-bar-copy {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
}

body.wigo-order-ubereats-v1 .cart-bar-copy strong {
  display:flex;
  align-items:center;
  gap:8px;
  color:#fff;
  font-size:17px;
  font-weight:560;
  white-space:nowrap;
}

body.wigo-order-ubereats-v1 .cart-bar-copy strong::before {
  content:"🛒";
  font-size:20px;
  filter:grayscale(1) brightness(4);
}

body.wigo-order-ubereats-v1 .cart-bar-copy small,
body.wigo-order-ubereats-v1 #cart-bar-total {
  display:none!important;
}

body.wigo-order-ubereats-v1:has(.cart-bar:not([hidden])) .wigo-ongoing-order-card {
  bottom:calc(175px + env(safe-area-inset-bottom));
}

.wigo-order-search-screen {
  position:fixed;
  inset:0;
  z-index:1700;
  overflow-y:auto;
  padding:max(16px,env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  background:#fff;
  color:#111;
  overscroll-behavior:contain;
}

.wigo-order-search-screen[hidden] {
  display:none!important;
}

.wigo-order-search-head {
  position:sticky;
  top:0;
  z-index:2;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:8px;
  align-items:center;
  padding:2px 0 16px;
  background:#fff;
}

.wigo-order-search-back {
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:29px;
  line-height:1;
}

.wigo-order-search-box {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:56px;
  padding:0 6px 0 18px;
  border-radius:999px;
  background:#f1f1f1;
}

.wigo-order-search-box input {
  flex:1 1 auto;
  min-width:0;
  width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#111;
  font:inherit;
  font-size:20px;
}

.wigo-order-search-dismiss {
  flex:0 0 44px;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#e4e4e6;
  color:#111;
  font:inherit;
  font-size:29px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.wigo-order-search-dismiss:focus-visible {
  outline:2px solid #222;
  outline-offset:2px;
}

.wigo-order-search-section {
  margin-top:24px;
}

.wigo-order-search-section h2 {
  margin:0 0 16px;
  font-size:28px;
  font-weight:560;
  letter-spacing:-.035em;
}

.wigo-order-search-dishes {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:104px;
  gap:12px;
  overflow-x:auto;
  padding-bottom:6px;
  scrollbar-width:none;
}

.wigo-order-search-dishes::-webkit-scrollbar {
  display:none;
}

.wigo-order-search-dish {
  display:block;
  border:0;
  padding:0;
  background:transparent;
  color:#111;
  text-align:left;
}

.wigo-order-search-thumb {
  position:relative;
  display:grid;
  place-items:center;
  width:104px;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:17px;
  background:#f4f4f4;
}

.wigo-order-search-thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
}

.wigo-order-search-thumb span {
  font-size:40px;
}

.wigo-order-search-dish strong {
  display:-webkit-box;
  margin-top:8px;
  overflow:hidden;
  color:#111;
  font-size:14px;
  font-weight:520;
  line-height:1.25;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.wigo-order-search-categories {
  border-top:1px solid var(--wigo-order-line);
}

.wigo-order-search-category {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 24px;
  gap:14px;
  align-items:center;
  width:100%;
  min-height:72px;
  padding:0;
  border:0;
  border-bottom:1px solid var(--wigo-order-line);
  background:#fff;
  color:#111;
  text-align:left;
}

.wigo-order-search-category-emoji {
  font-size:27px;
  text-align:center;
}

.wigo-order-search-category strong {
  font-size:20px;
  font-weight:540;
}

.wigo-order-search-category b {
  color:#9a9a9a;
  font-size:22px;
  font-weight:400;
}

.wigo-order-search-results {
  display:grid;
  gap:0;
  border-top:1px solid var(--wigo-order-line);
}

.wigo-order-search-result {
  display:grid;
  grid-template-columns:minmax(0,1fr) 88px;
  gap:14px;
  align-items:center;
  min-height:112px;
  padding:14px 0;
  border-bottom:1px solid var(--wigo-order-line);
  color:#111;
  cursor:pointer;
}

.wigo-order-search-result h3 {
  margin:0 0 7px;
  font-size:18px;
  font-weight:560;
}

.wigo-order-search-result p {
  margin:0;
  color:#666;
  font-size:14px;
}

.wigo-order-search-result-media {
  position:relative;
  width:88px;
  height:88px;
  overflow:hidden;
  border-radius:15px;
  background:#f3f3f3;
}

.wigo-order-search-result-media img {
  width:100%;
  height:100%;
  object-fit:cover;
}

.wigo-order-search-result-media .wigo-order-quick-add {
  right:6px;
  top:6px;
  bottom:auto;
  transform:scale(.88);
  transform-origin:right top;
}

@media(max-width:420px){
  body.wigo-order-ubereats-v1 .featured-card.wigo-orderable-card{flex-basis:46vw}
  body.wigo-order-ubereats-v1 .wigo-orderable-card .card-copy h3{font-size:16px}
  .wigo-order-search-screen{padding-left:16px;padding-right:16px}
}

/* Invisible mobile hit targets; retain the existing 42px visible circle.
   An inset of -12px adds 24px to the finger target's overall dimension. */
.wigo-order-qty-step::before {
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:999px;
}
.wigo-order-quick-add[data-qty="0"] .wigo-order-qty-plus::before {
  inset:-12px;
}

/* Quick-add receives the tap above its decorative media without changing the UI. */
body.wigo-order-ubereats-v1 .wigo-orderable-card .product-art::before,
body.wigo-order-ubereats-v1 .wigo-orderable-card .product-art::after,
body.wigo-order-ubereats-v1 .wigo-orderable-card .product-photo,
.wigo-order-search-result-media img {
  pointer-events:none;
}
.wigo-order-quick-add,
.wigo-order-qty-step {
  pointer-events:auto;
}

/* Product cards are non-button containers with independent real + controls. */
article[role="button"].wigo-orderable-card,
article[role="button"].rc8-row-product-card { cursor:pointer; }
article[role="button"].wigo-orderable-card:focus-visible,
article[role="button"].rc8-row-product-card:focus-visible { outline:3px solid #ff792b; outline-offset:2px; }
.wigo-order-qty-step:focus-visible { outline:2px solid #ff792b; outline-offset:1px; }

/* Break Point: accessible, independent size selector for "From TZS" products.
   Above the search layer and category page, without changing the card +/- UI. */
.wigo-variant-layer {
  position:fixed;
  inset:0;
  z-index:2200;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  background:rgba(0,0,0,.4);
  -webkit-backdrop-filter:blur(2px);
  backdrop-filter:blur(2px);
}
.wigo-variant-layer[hidden] { display:none!important; }
.wigo-variant-sheet {
  box-sizing:border-box;
  width:min(100%,680px);
  max-height:calc(94dvh - env(safe-area-inset-top,0px));
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:24px 20px calc(22px + env(safe-area-inset-bottom,0px));
  border-radius:28px 28px 0 0;
  background:#fff;
  color:#171717;
  box-shadow:0 -18px 48px rgba(0,0,0,.15);
}
.wigo-variant-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.wigo-variant-header small { font-size:12px; font-weight:800; color:#f46b20; letter-spacing:.05em; }
.wigo-variant-title { margin:8px 0 0; font-size:25px; line-height:1.14; font-weight:750; }
.wigo-variant-close {
  flex:0 0 44px;
  width:44px;
  height:44px;
  border:0;
  border-radius:50%;
  background:#f2f2f2;
  color:#222;
  font:inherit;
  font-size:28px;
  cursor:pointer;
}
.wigo-variant-help { margin:14px 0 16px; color:#777; font-size:14px; }
.wigo-variant-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:74px;
  padding:12px 0;
  border-bottom:1px solid #ededed;
}
.wigo-variant-copy { min-width:0; display:grid; gap:6px; }
.wigo-variant-copy strong { font-size:16px; overflow-wrap:anywhere; }
.wigo-variant-copy span { font-size:14px; color:#686868; }
.wigo-variant-quantity {
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
.wigo-variant-quantity button {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:0;
  border-radius:50%;
  background:#f3f3f3;
  color:#111;
  font:inherit;
  font-size:26px;
  cursor:pointer;
  touch-action:manipulation;
}
.wigo-variant-quantity button:last-child { background:#111; color:#fff; }
.wigo-variant-quantity button:disabled { opacity:.35; cursor:default; }
.wigo-variant-quantity strong { min-width:14px; text-align:center; font-size:16px; }
.wigo-variant-done {
  width:100%;
  min-height:52px;
  margin-top:20px;
  border:0;
  border-radius:999px;
  background:#ff7425;
  color:white;
  font:inherit;
  font-size:17px;
  font-weight:750;
  cursor:pointer;
}
@media (max-width:360px) {
 .wigo-variant-quantity { gap:6px; }
 .wigo-variant-copy strong { font-size:15px; }
}

/* Fullscreen menu search is also a shopping screen: keep the same Cart and
   four bottom tabs here, while never intercepting dish +/- touch targets. */
.wigo-order-search-screen{padding-bottom:calc(206px + env(safe-area-inset-bottom,0px))}
.wigo-order-search-screen .wigo-search-guest-dock{
 position:fixed;
 z-index:19;
 left:50%;
 right:auto;
 bottom:calc(12px + env(safe-area-inset-bottom,0px));
 transform:translateX(-50%);
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 align-items:center;
 gap:2px;
 width:min(calc(100% - 28px),680px);
 max-width:calc(100vw - 28px);
 box-sizing:border-box;
 padding:10px 9px;
 border-radius:28px;
 border:1px solid rgba(0,0,0,.04);
 background:rgba(255,255,255,.97);
 box-shadow:0 12px 32px rgba(20,20,20,.12);
 backdrop-filter:blur(14px);
 -webkit-backdrop-filter:blur(14px);
}
.wigo-order-search-screen .wigo-search-guest-dock .dock-action{
 min-width:0;
 min-height:60px;
 padding:8px 2px;
}
.wigo-order-search-screen .wigo-search-cart-shortcut{
 position:fixed;
 z-index:20;
 left:50%;
 right:auto;
 bottom:calc(105px + env(safe-area-inset-bottom,0px));
 transform:translateX(-50%);
 max-width:calc(100vw - 42px);
 box-sizing:border-box;
 display:flex;
 align-items:center;
 justify-content:center;
 gap:10px;
 padding:12px 22px;
 min-height:56px;
 border:0;
 border-radius:999px;
 background:#050505;
 color:#fff;
 box-shadow:0 10px 28px rgba(0,0,0,.25);
 white-space:nowrap;
 cursor:pointer;
 touch-action:manipulation;
 font:inherit;
}
.wigo-order-search-screen .wigo-search-cart-shortcut strong{font-size:17px;font-weight:650}
.wigo-order-search-screen .wigo-search-cart-shortcut[hidden]{display:none!important}
@media(max-width:360px){
 .wigo-order-search-screen .wigo-search-guest-dock{
  width:calc(100% - 16px);
  max-width:calc(100vw - 16px);
  padding:8px 4px;
 }
 .wigo-order-search-screen .wigo-search-guest-dock .dock-action small{font-size:10px}
 .wigo-order-search-screen .wigo-search-cart-shortcut{bottom:calc(99px + env(safe-area-inset-bottom,0px))}
}
