/* ==========================================================================
   Trusty — Bento menu
   ========================================================================== */
:root {
  --bg: #F4F7F1;
  --forest: #0B4A3A;
  --ink: #0B3D31;
  --mint: #DDEFD9;
  --sage: #ADDBAA;
  --cream: #F6F1E4;
  --lime: #E4EDC4;
  --olive: #7E9A2B;
  --sand: #C7A86A;
  --gold: #E2A623;
  --mu: #5F7D70;
  --tx: #3F5E52;
  --line: #E2EBDF;
  --danger: #B3412F;
  --danger-bg: #FDECEA;
  --r-xl: 28px;
  --r-lg: 22px;
  --shadow: 0 16px 34px -22px rgba(11, 74, 58, .45);
  --plate: 0 14px 24px -10px rgba(11, 61, 49, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --top: 68px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'IBM Plex Sans Arabic', 'Jost', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2.5px solid var(--olive); outline-offset: 2px; }
[hidden] { display: none !important; }
html[dir="ltr"] .flip-ltr, html[dir="ltr"] .back svg, html[dir="ltr"] .item-media [data-close] svg { transform: scaleX(-1); }

.num, .price, .featured-price, .macro b, .bar-price b, .mods-total b, .stepper output, .qty output, .rating-avg { font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: grid; place-items: center; transition: opacity .6s var(--ease), visibility .6s; }
.splash img { width: 190px; animation: splashIn 1s var(--ease) both; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash.hide img { transform: scale(1.08); transition: transform .6s var(--ease); }
@keyframes splashIn { from { opacity: 0; transform: scale(.82) rotate(-6deg); } to { opacity: 1; transform: none; } }

/* ---------- layout ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 0 18px calc(40px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top);
  display: flex; align-items: center; gap: 10px;
  margin: 0 -18px; padding: 0 18px;
  background: rgba(244, 247, 241, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand img { height: 62px; width: 62px; object-fit: contain; margin: -4px -6px; }
.topbar-title { flex: 1; font-size: 19px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-home .topbar-title { visibility: hidden; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 15px; background: #fff; display: grid; place-items: center; font-size: 19px; color: var(--forest); font-family: 'Jost', sans-serif; font-weight: 600; box-shadow: 0 1px 0 var(--line); transition: transform .2s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.92); }
.icon-btn#langBtn { font-size: 14px; }
.icon-btn.glass { background: rgba(255, 255, 255, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.view.enter > * { animation: viewIn .5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- home ---------- */
.hello { padding: 6px 2px 18px; }
.hello p { font-size: 15px; color: var(--mu); font-weight: 500; }
.hello h2 { font: 300 46px/1.05 'Jost', sans-serif; color: var(--forest); letter-spacing: .5px; }
.hello-sub { display: inline-flex; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--forest); background: var(--mint); padding: 6px 12px; border-radius: 12px; }

.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 92px; grid-auto-flow: dense; gap: 14px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 16px;
  background: #fff; color: var(--ink); isolation: isolate;
  animation: tileIn .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile:active { transform: scale(.97); }
.size-tall { grid-row: span 2; }
.tile-text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2px; max-width: 70%; }
.tile-text b { font-size: 17px; line-height: 1.3; font-weight: 700; }
.tile-text small { font-size: 12px; opacity: .72; }
.tile-img {
  position: absolute; z-index: 1; border-radius: 50%; object-fit: cover; box-shadow: var(--plate);
  animation: plateIn .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 260ms);
  transition: transform .6s var(--ease);
}
.tile:hover .tile-img { transform: rotate(-10deg) scale(1.04); }
.size-tall .tile-img { width: 140px; height: 140px; bottom: -26px; inset-inline-end: -26px; }
.size-short .tile-img { width: 86px; height: 86px; top: 50%; margin-top: -43px; inset-inline-end: -18px; }
.size-short .tile-text { max-width: 62%; }
.tone-white { background: #fff; }
.tone-mint { background: var(--mint); }
.tone-cream { background: var(--cream); }
.tone-lime { background: var(--lime); }
.tone-sage { background: var(--sage); }
.tone-forest { background: var(--forest); color: #fff; }

.featured { grid-column: 1 / -1; grid-row: span 2; background: var(--forest); color: #fff; padding: 20px; }
.featured .tile-text { max-width: 52%; gap: 4px; }
.featured .eyebrow { font: 500 10.5px 'Jost', sans-serif; letter-spacing: 3px; color: var(--sage); opacity: 1; text-transform: uppercase; }
.featured .tile-text b { font-size: 22px; }
.featured .rating-mini { color: #fff; }
.featured-price { position: absolute; z-index: 2; bottom: 18px; inset-inline-start: 20px; font-weight: 600; font-size: 19px; }
.featured-price small { font: 400 12px 'IBM Plex Sans Arabic', sans-serif; opacity: .8; }
.featured .tile-img { width: 210px; height: 210px; top: -8px; inset-inline-end: -38px; animation: plateIn .9s var(--ease) both .35s, floaty 7s ease-in-out 1.4s infinite; }
.dietitian .tile-icon { position: absolute; top: 14px; inset-inline-end: 14px; font-size: 26px; color: var(--sage); }
.dietitian .tile-text { max-width: 80%; }
.dietitian .tile-text b { font-size: 14px; }

@keyframes tileIn { from { opacity: 0; transform: translateY(22px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes plateIn { from { opacity: 0; transform: rotate(-35deg) scale(.55); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(6deg) translateY(-4px); } }

.info { margin-top: 18px; background: #fff; border-radius: var(--r-xl); padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; animation: tileIn .7s var(--ease) both .9s; }
.info ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 22px; }
.info li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--tx); }
.info li svg { font-size: 22px; color: var(--forest); }
.info li small { display: block; font-size: 11px; color: var(--mu); }
.info .links { display: flex; gap: 8px; }
.round-link { width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--forest); display: grid; place-items: center; font-size: 21px; transition: transform .2s var(--ease); }
.round-link:hover { transform: translateY(-2px); }

/* ---------- category ---------- */
.tabs {
  position: sticky; top: var(--top); z-index: 10;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  background: #fff; border-radius: 18px; padding: 5px; box-shadow: 0 1px 0 var(--line);
  scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 15px; border-radius: 14px; font-size: 13.5px; font-weight: 500; color: var(--mu); white-space: nowrap; scroll-snap-align: center; transition: background .3s var(--ease), color .3s; }
.tab.on { background: var(--forest); color: #fff; font-weight: 600; }
.list { display: grid; gap: 14px; margin-top: 18px; padding-inline-end: 6px; }

.card {
  position: relative; display: flex; min-height: 156px; border-radius: var(--r-xl);
  padding: 18px; padding-inline-end: 150px; background: #fff; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card:active { transform: scale(.98); }
.card-img { position: absolute; width: 152px; height: 152px; top: 50%; margin-top: -76px; inset-inline-end: -14px; border-radius: 50%; object-fit: cover; box-shadow: var(--plate); transition: transform .6s var(--ease); }
.card:hover .card-img { transform: rotate(-10deg) scale(1.03); }
.card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.card-title { font-size: 17px; line-height: 1.35; font-weight: 700; }
.card-desc { font-size: 12.5px; line-height: 1.6; opacity: .78; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.card .price { font-size: 16px; font-weight: 600; }
.price small { font: 400 11.5px 'IBM Plex Sans Arabic', sans-serif; opacity: .75; }
.pill { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 10px; background: rgba(255, 255, 255, .7); }
.card.tone-white .pill { background: var(--bg); }
.card.tone-forest .pill { background: rgba(255, 255, 255, .14); }
.card.tone-forest .rating-mini { color: #fff; }

.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal .card-img { transform: rotate(-30deg) scale(.7); opacity: 0; }
.reveal.in .card-img { transform: none; opacity: 1; transition: transform .9s var(--ease), opacity .6s; transition-delay: calc(var(--i, 0) * 70ms + 150ms); }
.reveal.in:hover .card-img { transform: rotate(-10deg) scale(1.03); transition-delay: 0s; }

/* ---------- ratings ---------- */
.rating-mini { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink); }
.rating-mini b { font: 600 12.5px 'Jost', sans-serif; }
.rating-mini-star svg { fill: var(--gold); stroke: none; font-size: 13px; display: block; }
.rating-count { opacity: .7; font-family: 'Jost', sans-serif; }
.rating-new { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: rgba(226, 166, 35, .16); color: #8A5F06; }
.tone-forest .rating-new, .featured .rating-new { color: #FBE3A6; background: rgba(226, 166, 35, .22); }
.stars { position: relative; display: inline-flex; font-size: 17px; line-height: 0; }
.stars-base, .stars-fill { display: inline-flex; gap: 1px; white-space: nowrap; }
.stars-base svg { fill: #D9E3D5; stroke: none; }
.stars-fill { position: absolute; top: 0; inset-inline-start: 0; overflow: hidden; }
.stars-fill svg { fill: var(--gold); stroke: none; }
.rating-skel { display: inline-block; width: 130px; height: 16px; border-radius: 8px; background: linear-gradient(90deg, #E7EEE4, #F3F7F1, #E7EEE4); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; }
#modsOverlay { z-index: 120; }
#searchOverlay { z-index: 110; }
.overlay-bg { position: absolute; inset: 0; background: rgba(8, 36, 28, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .35s var(--ease); }
.overlay.open .overlay-bg { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 94dvh; outline: none;
  background: var(--bg); border-radius: 28px 28px 0 0; overflow: hidden;
  transform: translateY(104%); transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.overlay.open .sheet { transform: none; }

/* dish */
.item-sheet { top: max(10px, env(safe-area-inset-top)); max-height: none; }
.item-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.item-media { position: relative; margin: 12px 12px 0; height: 300px; border-radius: var(--r-xl); background: var(--mint); display: grid; place-items: center; overflow: hidden; }
.item-media::before { content: ''; position: absolute; width: 330px; height: 330px; border-radius: 50%; border: 1px dashed rgba(11, 74, 58, .25); animation: spin 40s linear infinite; }
.item-img { position: relative; width: 252px; height: 252px; border-radius: 50%; object-fit: cover; box-shadow: 0 22px 34px -14px rgba(11, 61, 49, .55); }
.overlay.open .item-img { animation: spinIn 1s var(--ease) both .1s; }
.item-media .icon-btn { position: absolute; top: 14px; z-index: 2; }
.item-media [data-close] { inset-inline-start: 14px; }
.item-media .share { inset-inline-end: 14px; }
.item-tag { position: absolute; bottom: 14px; inset-inline-start: 14px; background: #fff; border-radius: 12px; padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--forest); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinIn { from { opacity: 0; transform: rotate(-120deg) scale(.6); } to { opacity: 1; transform: none; } }

.item-info { padding: 16px 22px 22px; }
.item-info > * { animation: viewIn .6s var(--ease) both; }
.item-info > *:nth-child(2) { animation-delay: .05s; } .item-info > *:nth-child(3) { animation-delay: .1s; } .item-info > *:nth-child(4) { animation-delay: .15s; }
.item-info > *:nth-child(5) { animation-delay: .2s; } .item-info > *:nth-child(6) { animation-delay: .25s; } .item-info > *:nth-child(n+7) { animation-delay: .3s; }
.item-info h2 { font-size: 23px; line-height: 1.35; font-weight: 700; }
.item-sub { font: 400 13.5px 'Jost', 'IBM Plex Sans Arabic', sans-serif; color: var(--mu); }
.rating-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 20px; font-size: 12.5px; color: var(--mu); }
.rating-avg { font-size: 16px; font-weight: 600; color: var(--ink); }
.item-desc { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--tx); }

.macros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.macro { border-radius: var(--r-lg); padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.macro span { font-size: 12.5px; font-weight: 500; }
.macro b { font-size: 26px; font-weight: 500; line-height: 1; direction: ltr; text-align: end; align-self: flex-start; }
.macro i { display: block; height: 6px; border-radius: 6px; background: rgba(11, 74, 58, .1); overflow: hidden; margin-top: auto; }
.macro em { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1.1s var(--ease) .35s; }
.bars-in .macro em { width: var(--w); }
.macro.kcal { background: var(--forest); color: #fff; justify-content: space-between; }
.macro.kcal span { color: var(--sage); }
.macro.tone-lime { background: var(--lime); }
.macro.tone-cream { background: var(--cream); }

.mods-btn { width: 100%; margin-top: 16px; display: flex; align-items: center; gap: 12px; text-align: start; padding: 12px 14px; background: #fff; border: 1.5px dashed var(--sage); border-radius: var(--r-lg); transition: transform .2s var(--ease), border-color .2s; }
.mods-btn:hover { border-color: var(--forest); }
.mods-btn:active { transform: scale(.98); }
.mods-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--mint); color: var(--forest); display: grid; place-items: center; font-size: 21px; flex: none; }
.mods-txt { flex: 1; display: flex; flex-direction: column; }
.mods-txt b { font-size: 15px; }
.mods-txt small { font-size: 12px; color: var(--mu); }
.mods-badge { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--forest); color: #fff; font: 600 12px/24px 'Jost', sans-serif; text-align: center; animation: pop .4s var(--ease); }
.mods-chev { color: var(--mu); font-size: 18px; transform: scaleX(-1); }
html[dir="ltr"] .mods-chev { transform: none; }
.mods-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mods-summary:empty { display: none; }
.chg { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 10px; animation: pop .35s var(--ease); }
.chg.add { background: var(--mint); color: var(--forest); }
.chg.less { background: var(--cream); color: #7A5B1E; }
.chg.rm { background: var(--danger-bg); color: var(--danger); }

.rate-box { margin-top: 18px; background: #fff; border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rate-box b { font-size: 14.5px; }
.rate-stars { display: flex; gap: 2px; }
html[dir="rtl"] .rate-stars { flex-direction: row-reverse; justify-content: flex-end; }
.rate-star { width: 38px; height: 38px; display: grid; place-items: center; font-size: 26px; border-radius: 12px; transition: transform .2s var(--ease); }
.rate-star svg { fill: #D9E3D5; stroke: none; transition: fill .2s; }
.rate-star.on svg { fill: var(--gold); }
.rate-star:hover { transform: scale(1.12); }
.rate-star.pop { animation: pop .4s var(--ease); }
.rate-note { width: 100%; font-size: 12px; color: var(--mu); }
.rate-note:empty { display: none; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

.item-bar { display: flex; align-items: center; gap: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -10px 30px -20px rgba(11, 61, 49, .35); }
.qty { display: flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 16px; padding: 4px; flex: none; }
.qty button { width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; color: var(--forest); background: #fff; }
.qty output { min-width: 24px; text-align: center; font-weight: 600; font-size: 16px; }
.bar-price { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bar-price small { font-size: 11px; color: var(--mu); }
.bar-price b { font-size: 17px; font-weight: 600; white-space: nowrap; }
.bar-price b small { font: 400 11.5px 'IBM Plex Sans Arabic', sans-serif; color: var(--mu); }
.wa-btn { display: inline-flex; align-items: center; gap: 7px; padding: 13px 13px; border-radius: 18px; background: var(--forest); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; flex: none; transition: transform .2s var(--ease), background .2s; }
.wa-btn svg { font-size: 19px; }
.wa-btn .short { display: none; }
.wa-btn:hover { background: #083A2D; }
.wa-btn:active { transform: scale(.96); }
.bump { animation: bump .35s var(--ease); display: inline-block; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* edits & add-ons */
.mods-sheet { max-height: 88dvh; }
.mods-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 20px 12px; }
.mods-head .grab { position: absolute; top: 8px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 4px; background: #CFDCCB; }
.mods-head h3 { font-size: 19px; }
.mods-head p { font-size: 13px; color: var(--mu); }
.mods-body { flex: 1; overflow-y: auto; padding: 0 20px 10px; overscroll-behavior: contain; }
.mods-body h4 { font-size: 13px; color: var(--mu); font-weight: 600; margin: 12px 0 4px; }
.mod-list { background: #fff; border-radius: var(--r-lg); padding: 2px 14px; }
.mod-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); animation: viewIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.mod-row:last-child { border-bottom: 0; }
.mod-row.changed { animation: flash .6s var(--ease); }
@keyframes flash { 0% { background: rgba(173, 219, 170, .45); } 100% { background: transparent; } }
.mod-name { display: flex; flex-direction: column; min-width: 0; }
.mod-name b { font-size: 14.5px; font-weight: 600; transition: opacity .2s; }
.mod-name small { font-size: 11.5px; color: var(--mu); }
.mod-row.removed .mod-name b { text-decoration: line-through; opacity: .45; }
.mod-row.added .mod-name b { color: var(--forest); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 11px; background: var(--mint); color: var(--forest); display: grid; place-items: center; font-size: 16px; transition: transform .15s var(--ease), opacity .2s; }
.stepper button:active:not(:disabled) { transform: scale(.88); }
.stepper button:disabled { opacity: .32; cursor: default; }
.stepper output { min-width: 22px; text-align: center; font-weight: 600; font-size: 15px; }
.rm-btn { width: 34px; height: 34px; border-radius: 11px; background: var(--danger-bg); color: var(--danger); display: grid; place-items: center; font-size: 17px; }
.mod-row.removed .rm-btn { background: var(--mint); color: var(--forest); }
.lock-tag { font-size: 10.5px; font-weight: 600; color: var(--mu); background: var(--bg); border-radius: 8px; padding: 4px 7px; }
.mods-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: #fff; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -10px 30px -20px rgba(11, 61, 49, .35); }
.mods-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mods-total small { font-size: 13px; color: var(--mu); }
.mods-total .per { font-size: 11px; }
.mods-total b { font-size: 22px; font-weight: 600; }
.mods-total b small { font: 400 12px 'IBM Plex Sans Arabic', sans-serif; }
.diff { font: 500 13px 'Jost', 'IBM Plex Sans Arabic', sans-serif; color: var(--olive); }
.mods-actions { display: flex; gap: 10px; }
.mods-actions button { flex: 1; padding: 14px; border-radius: 16px; font-weight: 600; font-size: 15px; }
.mods-actions .ghost { background: var(--bg); color: var(--forest); flex: .6; }
.mods-actions .primary { background: var(--forest); color: #fff; }

/* search */
.search-sheet { height: 86dvh; }
.search-bar { display: flex; align-items: center; gap: 10px; margin: 16px 16px 8px; padding: 6px 6px 6px 14px; padding-inline-start: 14px; background: #fff; border-radius: 18px; }
.search-bar > svg { font-size: 20px; color: var(--mu); }
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-bar input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); min-width: 0; }
.search-bar .icon-btn { background: var(--bg); box-shadow: none; width: 40px; height: 40px; }
.search-results { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.s-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; animation: viewIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.s-row:hover { background: #fff; }
.s-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.s-row b { display: block; font-size: 14.5px; }
.s-row small { font-size: 12px; color: var(--mu); }
.s-row em { font: 600 14px 'Jost', sans-serif; font-style: normal; white-space: nowrap; }
.s-row em small { font-family: 'IBM Plex Sans Arabic', sans-serif; font-weight: 400; }
.empty { text-align: center; color: var(--mu); padding: 40px 0; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 13.5px; box-shadow: var(--shadow); transition: opacity .3s, transform .3s var(--ease); max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 400px) {
  .wa-btn .long { display: none; }
  .wa-btn .short { display: inline; }
  .wa-btn { padding: 13px 18px; }
  .card { padding-inline-end: 132px; }
  .card-img { width: 136px; height: 136px; margin-top: -68px; }
}
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 104px; }
  .featured { grid-column: span 2; }
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  :root { --top: 76px; }
  .app { padding: 0 28px 60px; }
  .topbar { margin: 0 -28px; padding: 0 28px; }
  .hello { padding: 18px 2px 26px; }
  .hello h2 { font-size: 58px; }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 120px; gap: 18px; }
  .featured .tile-img { width: 270px; height: 270px; }
  .featured .tile-text b { font-size: 28px; }
  .size-tall .tile-img { width: 176px; height: 176px; }
  .size-short .tile-img { width: 100px; height: 100px; margin-top: -50px; }
  .tile-text b { font-size: 19px; }
  .list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .tabs { justify-content: center; }

  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; border-radius: 30px; transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .45s var(--ease), opacity .35s; }
  .overlay.open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .item-sheet { width: min(980px, 92vw); height: min(680px, 88vh); top: 50%; }
  .item-scroll { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
  .item-media { height: auto; margin: 14px; }
  .item-media::before { width: 420px; height: 420px; }
  .item-img { width: 340px; height: 340px; }
  .item-info { overflow-y: auto; padding: 26px 26px 26px 18px; }
  .mods-sheet { width: min(560px, 92vw); max-height: 84vh; }
  .mods-head .grab { display: none; }
  .search-sheet { width: min(640px, 92vw); height: min(640px, 84vh); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
html[dir="ltr"] .qty, html[dir="ltr"] .stepper { flex-direction: row-reverse; }
