* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --blue: #1a5fd4; --blue-d: #1550b8; --blue-soft: #e8effc; --bg: #f5f6f8; --card: #fff;
  --text: #10151f; --muted: #8a94a3; --line: #eef1f5; --tab-h: 62px;
}
body { font-family: 'Tajawal', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text);
  min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }

/* ---- top bar + chips ---- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  background: var(--card); padding: 10px 14px; }
.brand { font-size: 1.1rem; font-weight: 800; }
.top-actions { display: flex; gap: 6px; }
.icon-btn { position: relative; background: none; border: none; color: var(--text); cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 23px; height: 23px; }
.cart-chip { background: var(--blue-soft); color: var(--blue); }
.count { position: absolute; top: 0; inset-inline-start: 0; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--blue); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 9px;
  display: grid; place-items: center; opacity: 0; transform: scale(.4); transition: .18s; }
.count.has { opacity: 1; transform: scale(1); }
.chips { position: sticky; top: 62px; z-index: 9; display: none; gap: 6px; overflow-x: auto; scrollbar-width: none;
  background: var(--card); padding: 4px 14px 10px; border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: none; border: none; font: inherit; font-weight: 700; color: var(--muted);
  padding: 7px 12px; border-radius: 12px; cursor: pointer; border-bottom: 2.5px solid transparent; }
.chip.on { color: var(--text); border-bottom-color: var(--blue); }

main { max-width: 720px; margin: 0 auto; padding: 8px 16px 24px; }
.page-title { font-size: 1.5rem; font-weight: 800; margin: 14px 4px 16px; }
.sec-title { font-size: 1.15rem; font-weight: 800; margin: 22px 4px 12px; }

/* ---- welcome ---- */
.welcome { text-align: center; padding-top: 10px; }
.w-head { font-size: 1.45rem; font-weight: 800; line-height: 1.6; margin: 14px 8px 6px; }
.w-stage { background: var(--card); border-radius: 26px; margin: 14px 0; box-shadow: 0 10px 34px rgba(20,40,80,.10); overflow: hidden; }
.w-stage model-viewer, .w-stage img { width: 100%; height: clamp(260px, 40vh, 380px); background: transparent; object-fit: contain; }
.w-stage .w-hero { height: auto; aspect-ratio: 1024 / 572; object-fit: cover; }
.w-sub { color: var(--muted); line-height: 1.7; margin: 8px 12px 16px; }
.w-btn { width: 100%; }
.w-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }
.w-logo { width: 40px; height: 40px; display: grid; place-items: center; background: var(--blue); color: #fff; border-radius: 12px; font-weight: 800; letter-spacing: .5px; }
.w-title { font-size: 1.5rem; font-weight: 800; }
.w-feats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 8px 16px; }
.w-feat { background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: .82rem; padding: 8px 12px; border-radius: 12px; }
.w-featured { text-align: right; margin-top: 22px; }

/* ---- hero carousel ---- */
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.hero-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; padding: 2px; }
.hero-card { position: relative; background: var(--card); border-radius: 26px; padding: 10px;
  box-shadow: 0 10px 34px rgba(20,40,80,.10); overflow: hidden; }
.hero-card .stage { position: relative; width: 100%; }
.hero-card model-viewer { width: 100%; height: clamp(280px, 42vh, 400px); background: transparent; }
.hero-card .parts-grid model-viewer { height: clamp(140px, 22vh, 195px); }
.hero-img { width: 100%; height: clamp(280px, 42vh, 400px); object-fit: contain; display: block; }
.badge3d { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 3; background: var(--blue); color: #fff;
  font-size: .72rem; font-weight: 800; padding: 5px 12px; border-radius: 12px; box-shadow: 0 3px 10px rgba(26,95,212,.4); }
.badge3d.sm { top: 8px; inset-inline-start: 8px; font-size: .62rem; padding: 3px 8px; border-radius: 9px; }
.interact-tag { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 3; background: rgba(232,239,252,.92);
  color: var(--blue); font-size: .72rem; font-weight: 800; padding: 5px 12px; border-radius: 12px; }
.hint { position: absolute; bottom: 10px; inset-inline-start: 50%; transform: translateX(50%); z-index: 3;
  background: rgba(16,21,31,.72); color: #fff; font-size: .74rem; padding: 5px 12px; border-radius: 14px;
  pointer-events: none; white-space: nowrap; }
.parts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; }
.part .pname { text-align: center; font-size: .82rem; font-weight: 600; padding: 4px 0; }
.qtytag { background: var(--blue); color: #fff; border-radius: 9px; padding: 1px 7px; font-size: .72rem; }
.dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #cfd6e0; transition: .2s; }
.dot.on { width: 22px; border-radius: 4px; background: var(--blue); }

/* ---- hero info ---- */
.hero-info { padding: 6px 4px; }
.p-name { font-size: 1.2rem; font-weight: 800; line-height: 1.5; }
.p-price { font-size: 1.35rem; font-weight: 800; color: var(--blue); margin: 8px 0 6px; }
.p-price .cur { font-size: .95rem; font-weight: 700; }
.p-trust { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.hero-actions { display: flex; align-items: center; gap: 10px; }
.round-btn { width: 52px; height: 52px; flex: 0 0 auto; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 16px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.round-btn svg { width: 22px; height: 22px; }
.round-btn.fav.on { color: #e0245e; border-color: #f6c9d6; background: #fff2f6; }
.round-btn.copied { color: var(--blue); border-color: var(--blue); }
.btn-primary { flex: 1; background: var(--blue); color: #fff; border: none; padding: 15px; border-radius: 16px;
  font-size: 1.02rem; font-weight: 800; cursor: pointer; font-family: inherit; box-shadow: 0 6px 18px rgba(26,95,212,.28); }
.btn-primary:hover { background: var(--blue-d); }
.btn-primary:disabled { opacity: .5; }
.btn-primary.added, .grid-add.added { background: #1e9e4a; box-shadow: none; }
.btn-link { background: none; border: none; color: var(--blue); cursor: pointer; font-family: inherit;
  padding: 12px 0; font-weight: 700; width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-link svg { width: 18px; height: 18px; }

/* ---- home sections ---- */
.h-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
.h-scroll::-webkit-scrollbar { display: none; }
.mini-card { flex: 0 0 150px; background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(20,40,80,.06); cursor: pointer; }
.mini-card .media { position: relative; }
.mini-card img, .mini-card .noimg { width: 100%; aspect-ratio: 1.15; object-fit: cover; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #b3c2d1; }
.mini-card .media { position: relative; }
.mini-name { font-size: .78rem; font-weight: 700; padding: 8px 9px 2px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.mini-price { color: var(--blue); font-weight: 800; font-size: .85rem; padding: 0 9px 8px; }
.mini-add { display: block; width: calc(100% - 18px); margin: 0 9px 9px; padding: 8px; font-size: .82rem; }
.sec-title.first { margin-top: 10px; }

/* ---- product detail page ---- */
.back-btn { background: none; border: none; color: var(--blue); font: inherit; font-weight: 700;
  cursor: pointer; padding: 10px 2px; margin-top: 6px; }
.prod-card { margin-bottom: 16px; }
.prod-info { padding: 0 2px; }
.prod-info .p-name { font-size: 1.25rem; font-weight: 800; line-height: 1.5; }
.prod-info .p-price { font-size: 1.4rem; font-weight: 800; color: var(--blue); margin: 8px 0 6px; }
.prod-info .p-desc { color: var(--muted); font-size: .92rem; line-height: 1.8; margin: 8px 0; }
.prod-info .p-trust { color: var(--muted); font-size: .85rem; margin: 6px 0 16px; }
.wide-card { position: relative; display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: 18px; padding: 12px; box-shadow: 0 4px 16px rgba(20,40,80,.06); cursor: pointer; }
.wide-img, .wide-card .noimg { width: 108px; height: 108px; flex: 0 0 auto; object-fit: cover; border-radius: 14px;
  background: #eef2f7; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #b3c2d1; }
.wide-info .name { font-weight: 700; font-size: .95rem; line-height: 1.5; }
.wide-info .price { color: var(--blue); font-weight: 800; margin-top: 6px; }

/* ---- brands ---- */
.brand-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
.brand-row::-webkit-scrollbar { display: none; }
.brand-card { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 16px; cursor: pointer; font: inherit; font-weight: 800; color: var(--text); }
.brand-card:hover { border-color: var(--blue); color: var(--blue); }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 800; }
.brand-name { font-size: .95rem; }
/* per-category brand pills + search brand filter */
.cat-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 2px 6px; }
.products-brands { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cb-label { font-size: .85rem; font-weight: 800; color: var(--muted); margin-inline-end: 2px; }
.search-brands { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.brand-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 8px 13px; font: inherit; font-weight: 700; font-size: .85rem; color: var(--text); cursor: pointer; }
.brand-pill svg { width: 15px; height: 15px; color: var(--muted); }
.brand-pill:hover { border-color: var(--blue); color: var(--blue); }
.brand-pill:hover svg { color: var(--blue); }
.brand-pill.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.brand-pill.on svg { color: #fff; }

.menu-sec { color: var(--muted); font-size: .78rem; font-weight: 800; padding: 16px 4px 6px; }
.menu-row.sub { padding-inline-start: 8px; font-weight: 700; }
.menu-row.sub .m-ic svg { width: 18px; height: 18px; }

/* ---- products grid ---- */
.list-head { display: flex; align-items: center; justify-content: space-between; }
.sort-btn { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.sort-btn svg { width: 18px; height: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
.card { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 16px rgba(20,40,80,.06);
  display: flex; flex-direction: column; cursor: pointer; }
.card .media { position: relative; }
.card img, .card .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #b3c2d1; transition: transform .25s; }
.card:hover img { transform: scale(1.04); }
.heart-btn { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 36px; height: 36px; border: none;
  background: rgba(255,255,255,.92); border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.heart-btn svg { width: 18px; height: 18px; }
.heart-btn.on { color: #e0245e; }
.card .body { padding: 11px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-weight: 700; font-size: .9rem; line-height: 1.4; }
.card .price { color: var(--blue); font-weight: 800; }
.grid-add { margin-top: auto; background: var(--blue); color: #fff; border: none; padding: 9px; border-radius: 12px;
  cursor: pointer; font-family: inherit; font-weight: 700; }
.grid-add.added, .add-cart.added { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.grid-add.added svg, .add-cart.added svg { width: 1.05em; height: 1.05em; }

/* ---- search ---- */
.search-wrap { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 14px; margin-bottom: 16px; }
.search-wrap svg { width: 20px; height: 20px; color: var(--muted); flex: 0 0 auto; }
.search-wrap input { flex: 1; border: none; outline: none; font: inherit; background: none; min-width: 0; }
.t-go { flex: 0 0 auto; padding: 9px 18px; border-radius: 12px; font-size: .9rem; }

/* ---- cart page ---- */
.cart-row { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 18px;
  padding: 10px; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(20,40,80,.05); }
.c-media { position: relative; width: 96px; flex: 0 0 auto; border-radius: 14px; overflow: hidden; cursor: pointer; }
.c-media img, .c-media .noimg { width: 96px; height: 96px; object-fit: cover; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #b3c2d1; }
.c-info { flex: 1; min-width: 0; }
.c-name { font-weight: 700; font-size: .88rem; line-height: 1.45; }
.c-price { color: var(--muted); font-size: .82rem; margin: 3px 0 8px; }
.c-controls { display: flex; align-items: center; gap: 12px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 30px; height: 30px; border: 1.5px solid var(--line); background: #fff; border-radius: 9px;
  cursor: pointer; font-size: 1.05rem; }
.rm-btn { display: flex; align-items: center; gap: 4px; background: none; border: none; color: #c0392b;
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.rm-btn svg { width: 16px; height: 16px; }
.c-line-total { font-weight: 800; white-space: nowrap; }
.summary { margin-top: 14px; }
.summary .btn-primary { width: 100%; margin-top: 8px; }
.s-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); font-weight: 600; }
.s-row.total-row { color: var(--text); font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.free { color: #1e9e4a; font-weight: 800; }
.empty-cart { text-align: center; padding: 30px 16px; }
.empty-cart .big { font-size: 3rem; margin-bottom: 6px; }
.empty-cart .big svg { width: 52px; height: 52px; color: var(--muted); }
.empty-cart .btn-primary { width: 100%; margin-top: 14px; }

/* ---- panels / forms ---- */
.panel { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: 0 4px 16px rgba(20,40,80,.06); }
.panel h2 { margin-bottom: 10px; font-size: 1.05rem; }
.co-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: var(--bg); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.checkout-panel .btn-primary { width: 100%; margin-top: 6px; }
.err { color: #c0392b; font-size: .9rem; margin: 8px 0; }
.total { display: flex; justify-content: space-between; font-weight: 800; padding: 14px 0 4px; font-size: 1.1rem; }
.pay-line { color: var(--muted); font-weight: 700; margin-bottom: 12px; }

/* ---- auth ---- */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: #fff; color: #3c4043; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px;
  font: inherit; font-weight: 700; cursor: pointer; }
.google-btn:hover { background: #f8f9fb; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 14px 0; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.checkout-panel .btn-link { margin-top: 2px; }

/* ---- map ---- */
.map-block { margin: 14px 0; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; margin-bottom: 8px; flex-wrap: wrap; }
.loc-btn { display: flex; align-items: center; gap: 6px; background: var(--blue-soft); color: var(--blue); border: none;
  border-radius: 12px; padding: 9px 12px; font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; }
.loc-btn svg { width: 17px; height: 17px; }
.map-box { border-radius: 16px; overflow: hidden; background: #e8edf3; min-height: 170px; }
.map-box iframe { width: 100%; height: 220px; border: 0; display: block; }
.map-empty { display: grid; place-items: center; min-height: 170px; color: var(--muted); font-size: .9rem; padding: 12px; text-align: center; }

/* ---- success ---- */
.success { text-align: center; padding-top: 18px; }
.success .shield { width: 110px; height: 110px; margin: 0 auto 10px; filter: drop-shadow(0 10px 22px rgba(216,165,32,.35)); }
.success h1 { font-size: 1.35rem; margin-bottom: 20px; }
.steps { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.step .s-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  box-shadow: 0 3px 12px rgba(20,40,80,.08); }
.step .s-ic svg { width: 21px; height: 21px; }
.step.done { color: var(--blue); }
.step.done .s-ic { background: var(--blue-soft); }
.s-bar { width: 34px; height: 3px; border-radius: 2px; background: var(--line); margin-bottom: 22px; }
.o-meta { text-align: center; margin-bottom: 14px; line-height: 2; }
.o-meta span { color: var(--muted); }
.pay-summary { text-align: start; margin-bottom: 16px; }
.success .btn-primary { width: 100%; }

/* ---- tracking ---- */
.order-row { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--card); border: none;
  border-radius: 16px; padding: 13px; margin-bottom: 9px; box-shadow: 0 4px 14px rgba(20,40,80,.05);
  cursor: pointer; font: inherit; text-align: start; }
.o-ic { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; }
.o-ic svg { width: 20px; height: 20px; }
.o-body { flex: 1; display: flex; flex-direction: column; }
.o-body small { color: var(--muted); }
.o-total { font-weight: 800; }
.track-panel { margin-bottom: 18px; }
.timeline { padding: 4px 6px; }
.t-step { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--muted); }
.t-step::before { content: ''; position: absolute; top: 44px; inset-inline-start: 15px; width: 2px; height: calc(100% - 40px); background: var(--line); }
.t-step:last-child::before { display: none; }
.t-ic { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: var(--bg); display: grid; place-items: center; z-index: 1; }
.t-ic svg { width: 16px; height: 16px; }
.t-step.done { color: var(--text); font-weight: 700; }
.t-step.done .t-ic { background: var(--blue); color: #fff; }
.t-now { margin-inline-start: auto; background: var(--blue-soft); color: var(--blue); font-size: .72rem; font-weight: 800;
  padding: 4px 10px; border-radius: 10px; }
.cancelled { text-align: center; color: #c0392b; font-weight: 800; padding: 14px; }

/* ---- account ---- */
.account { text-align: center; }
.avatar { width: 72px; height: 72px; margin: 4px auto 10px; border-radius: 50%; background: var(--blue-soft);
  color: var(--blue); font-size: 1.7rem; font-weight: 800; display: grid; place-items: center; }
.acc-name { font-weight: 800; font-size: 1.15rem; }
.acc-sub { color: var(--muted); font-size: .85rem; margin: 4px 0 16px; }
.dash { display: flex; gap: 8px; }
.dash-chip { flex: 1; background: var(--bg); border: none; border-radius: 14px; padding: 12px 6px; cursor: pointer;
  font: inherit; display: flex; flex-direction: column; gap: 2px; }
.dash-chip b { font-size: 1.15rem; color: var(--blue); }
.dash-chip span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.addr { margin-bottom: 4px; }
.addr-line { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.addr-line svg { width: 20px; height: 20px; color: var(--blue); flex: 0 0 auto; }
.logout { color: #c0392b; margin-top: 18px; }
.about p { line-height: 1.9; margin-bottom: 10px; }

/* ---- drawer (menu) ---- */
#backdrop { position: fixed; inset: 0; background: rgba(10,15,25,.42); opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s; z-index: 20; }
#backdrop.show { opacity: 1; visibility: visible; }
#drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(340px, 86vw);
  background: var(--card); z-index: 21; padding: 18px; overflow-y: auto;
  transform: translateX(-105%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 30px rgba(0,0,0,.2);
  border-start-start-radius: 0; border-end-start-radius: 0; }
#drawer.open { transform: none; }
.close-x { position: absolute; top: 14px; inset-inline-start: 14px; background: none; border: none; font-size: 1.3rem;
  cursor: pointer; color: var(--text); width: 36px; height: 36px; border-radius: 50%; }
.close-x:hover { background: var(--bg); }
.menu-brand { text-align: center; padding: 18px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.m-logo { width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; background: var(--blue-soft);
  display: grid; place-items: center; font-size: 2rem; }
.m-name { font-weight: 800; font-size: 1.05rem; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; background: none; border: none;
  border-bottom: 1px solid var(--line); padding: 15px 4px; font: inherit; font-weight: 700; cursor: pointer; color: var(--text); }
.menu-row .m-ic { color: var(--muted); display: grid; place-items: center; }
.menu-row .m-ic svg { width: 21px; height: 21px; }
.menu-row:hover { color: var(--blue); }
.menu-row:hover .m-ic { color: var(--blue); }

/* ---- bottom tabs ---- */
.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 15; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
.tab { flex: 1; background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-family: inherit; }
.tab svg { width: 24px; height: 24px; }
.tab .tl { font-size: .68rem; font-weight: 700; }
.tab.on { color: var(--blue); }
.tab.on .ti { background: var(--blue-soft); border-radius: 14px; padding: 4px 14px; }

/* ---- motion / misc ---- */
.fade-in { animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
button { transition: transform .12s ease, background .15s ease, color .15s ease; }
button:active { transform: scale(.95); }
/* inline SVG icons embedded in text (replace old emoji) */
.p-trust svg, .pay-line svg, .interact-tag svg, .map-empty svg, .hint svg, .about p svg,
.prod-info .p-trust svg { width: 1.05em; height: 1.05em; vertical-align: -0.18em; display: inline-block; flex: 0 0 auto; }
.hint { display: flex; align-items: center; gap: 5px; }
.interact-tag { display: inline-flex; align-items: center; gap: 5px; }
.map-empty svg { width: 1.2em; height: 1.2em; }
.noimg svg { width: 40%; height: 40%; opacity: .55; }
.m-logo svg { width: 34px; height: 34px; color: var(--blue); }
.empty-cart .big svg { width: 54px; height: 54px; color: var(--muted); }

.notice { text-align: center; color: var(--muted); padding: 36px 0; }
