:root {
  --navy: #0b3c5d;
  --navy-dark: #082a3f;
  --orange: #ff7a1a;
  --orange-soft: #fff3e8;
  --green: #12894a;
  --green-soft: #e8f6ee;
  --red: #d92d20;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #f2f5f9;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(16, 24, 40, 0.08);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Header */
.sg-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.sg-header-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.sg-logo { display: flex; align-items: center; flex-shrink: 0; }
.sg-logo img { height: 40px; width: auto; }
.sg-loc {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.12); border: 0; color: #fff;
  border-radius: 999px; padding: 8px 14px; max-width: 340px; min-width: 0;
}
.sg-loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-loc i { color: var(--orange); }
.sg-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ink); border-radius: 999px; padding: 0 14px; height: 42px; min-width: 0;
}
.sg-search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; }
.sg-search i { color: var(--muted); }
.sg-actions { display: flex; align-items: center; gap: 8px; }
.sg-icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; height: 42px; padding: 0 14px; border-radius: 999px;
}
.sg-icon-btn:hover { background: rgba(255, 255, 255, 0.2); }
.sg-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sg-lang { display: flex; gap: 2px; background: rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 3px; }
.sg-lang button { border: 0; background: transparent; color: #fff; padding: 6px 9px; border-radius: 999px; font-size: 12px; }
.sg-lang button.active { background: #fff; color: var(--navy); font-weight: 700; }
.sg-butler-btn img { width: 30px; height: 30px; }

/* Layout */
.sg-main { max-width: 1280px; margin: 0 auto; padding: 20px; min-height: calc(100vh - var(--header-h)); }
.sg-row { display: flex; gap: 20px; align-items: flex-start; }
.sg-col { flex: 1; min-width: 0; }
.sg-side { width: 360px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 20px); }
.sg-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.sg-pad { padding: 18px; }
.sg-title { font-size: 22px; font-weight: 800; margin: 0 0 12px; }
.sg-sub { color: var(--muted); font-size: 13px; }
.sg-section-title { font-size: 18px; font-weight: 800; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 18px; font-weight: 700;
  background: var(--navy); color: #fff; transition: transform 0.08s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-orange { background: var(--orange); }
.btn-ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn-green { background: var(--green); }
.btn-red { background: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

/* Map hero */
.sg-hero-map { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-bottom: 18px; }
.sg-map { height: 300px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #dfe7ee; }
.sg-hero-info { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sg-hero-info h2 { margin: 0; font-size: 20px; }
.sg-hero-address { display: flex; gap: 10px; align-items: flex-start; }
.sg-hero-address i { color: var(--orange); margin-top: 3px; }
.sg-stat-row { display: flex; gap: 10px; }
.sg-stat { flex: 1; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.sg-stat b { display: block; font-size: 20px; color: var(--navy); }

/* Tabs and chips */
.sg-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.sg-tabs::-webkit-scrollbar { display: none; }
.sg-tab {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  border: 0; background: #fff; border-radius: 14px; padding: 10px 16px; font-weight: 700; color: var(--navy);
  box-shadow: var(--shadow);
}
.sg-tab i { font-size: 18px; color: var(--orange); }
.sg-tab.active i { color: #fff; }
.sg-tab.active { background: var(--navy); color: #fff; }
.sg-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.sg-chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600;
}
.sg-chip.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }

/* Store grid */
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sg-store {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; cursor: pointer;
}
.sg-store:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16, 24, 40, 0.12); }
.sg-store-cover { position: relative; height: 150px; background: linear-gradient(135deg, #0b3c5d, #1a6a96); }
.sg-store-cover img { width: 100%; height: 100%; object-fit: cover; }
.sg-store-cover .closed {
  position: absolute; inset: 0; background: rgba(16, 24, 40, 0.55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: 1px;
}
.sg-store-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.sg-store-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-store-meta { display: flex; gap: 10px; color: var(--muted); font-size: 13px; align-items: center; flex-wrap: wrap; }
.sg-store-meta .star { color: #f5a524; }
.sg-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--navy); }
.sg-pill.pickup { background: var(--green-soft); color: var(--green); }
.sg-pill.halal { background: #eef4ff; color: #3538cd; }
.sg-pill.orange { background: var(--orange-soft); color: var(--orange); }

.sg-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.sg-empty img { width: 120px; margin: 0 auto 12px; opacity: 0.9; }
.sg-skeleton { height: 230px; border-radius: var(--radius); background: linear-gradient(90deg, #e9eef3 25%, #f5f7fa 37%, #e9eef3 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Store page */
.sg-store-hero { position: relative; height: 260px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #0b3c5d, #1a6a96); }
.sg-store-hero img { width: 100%; height: 100%; object-fit: cover; }
.sg-store-head { margin: -60px 18px 0; position: relative; padding: 18px; }
.sg-store-head h1 { margin: 0 0 6px; font-size: 24px; }
.sg-store-head .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sg-status { font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.sg-status.open { background: var(--green-soft); color: var(--green); }
.sg-status.closed { background: #fef3f2; color: var(--red); }
.sg-vouchers { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; }
.sg-voucher {
  flex-shrink: 0; width: 260px; display: flex; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow);
  border: 1.5px dashed #ffc9a3;
}
.sg-voucher .amt { width: 88px; background: var(--orange); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; text-align: center; padding: 8px; }
.sg-voucher .amt small { font-size: 11px; font-weight: 600; opacity: 0.9; }
.sg-voucher .info { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sg-voucher .info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-voucher .info span { font-size: 12px; color: var(--muted); }

.sg-menu { display: grid; grid-template-columns: 180px 1fr; gap: 18px; margin-top: 18px; }
.sg-cats { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.sg-cats button { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.sg-cats button.active { background: var(--orange-soft); color: var(--orange); }
.sg-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sg-product { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; }
.sg-product-img { height: 140px; background: var(--bg); }
.sg-product-img img { width: 100%; height: 100%; object-fit: cover; }
.sg-product-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sg-product-name { font-weight: 700; line-height: 1.3; }
.sg-product-desc { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.sg-price { font-weight: 800; color: var(--navy); }
.sg-price del { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
.sg-add { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.sg-cat-title { font-size: 17px; font-weight: 800; margin: 18px 0 10px; scroll-margin-top: calc(var(--header-h) + 16px); }

/* Cart */
.sg-cart-items { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow: auto; }
.sg-cart-item { display: flex; gap: 10px; align-items: flex-start; }
.sg-cart-item .nm { flex: 1; min-width: 0; }
.sg-cart-item .nm b { display: block; font-size: 14px; }
.sg-cart-item .nm small { color: var(--muted); font-size: 12px; display: block; }
.sg-qty { display: flex; align-items: center; gap: 6px; }
.sg-qty button { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-weight: 800; color: var(--navy); }
.sg-qty span { min-width: 18px; text-align: center; font-weight: 700; }
.sg-sum-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); font-size: 14px; }
.sg-sum-row.total { color: var(--ink); font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.sg-sum-row.discount { color: var(--green); }
.sg-mobile-cart {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  background: var(--navy); color: #fff; border-radius: 16px; padding: 12px 16px; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.sg-mobile-cart b { flex: 1; }

/* Forms */
.sg-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sg-field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.sg-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; outline: 0;
}
.sg-input:focus { border-color: var(--navy); }
.sg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sg-seg { display: flex; background: var(--bg); padding: 4px; border-radius: 12px; gap: 4px; }
.sg-seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.sg-seg button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.sg-seg button:disabled { opacity: 0.45; cursor: not-allowed; }
.sg-option {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; background: #fff;
}
.sg-option.active { border-color: var(--orange); background: var(--orange-soft); }
.sg-option.disabled { opacity: 0.5; cursor: not-allowed; }
.sg-option .grow { flex: 1; min-width: 0; }
.sg-option small { color: var(--muted); display: block; font-size: 12px; }
.sg-error { color: var(--red); font-size: 13px; margin: 6px 0; }
.sg-note { background: var(--orange-soft); color: #b54708; border-radius: 12px; padding: 10px 12px; font-size: 13px; }

/* Modal */
.sg-modal { position: fixed; inset: 0; z-index: 100; background: rgba(16, 24, 40, 0.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sg-modal-box { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; animation: pop 0.18s ease; }
.sg-modal-box.wide { max-width: 760px; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.sg-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sg-modal-head h3 { margin: 0; font-size: 18px; }
.sg-modal-close { border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.sg-modal-body { padding: 18px; overflow: auto; }
.sg-modal-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.sg-modal-img { height: 220px; margin: -18px -18px 14px; background: var(--bg); }
.sg-modal-img img { width: 100%; height: 100%; object-fit: cover; }
.sg-group { margin-bottom: 16px; }
.sg-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sg-group-head b { font-size: 15px; }
.sg-req { font-size: 11px; font-weight: 700; background: #fef3f2; color: var(--red); padding: 2px 8px; border-radius: 999px; }
.sg-opt-tag { font-size: 11px; font-weight: 700; background: var(--bg); color: var(--muted); padding: 2px 8px; border-radius: 999px; }

/* Map picker */
.sg-pick-map { position: relative; height: 360px; border-radius: 14px; overflow: hidden; }
.sg-pick-map .map { position: absolute; inset: 0; }
.sg-center-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 500; pointer-events: none; font-size: 38px; color: var(--orange); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25)); }
.sg-pick-address { margin-top: 10px; padding: 10px 12px; background: var(--bg); border-radius: 12px; font-size: 14px; display: flex; gap: 8px; }
.sg-pick-address i { color: var(--orange); margin-top: 3px; }
.sg-suggest { border: 1.5px solid var(--line); border-radius: 12px; margin-top: 6px; max-height: 180px; overflow: auto; background: #fff; }
.sg-suggest button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 10px 12px; font-size: 14px; }
.sg-suggest button:last-child { border-bottom: 0; }
.leaflet-container { font: inherit; }
.sg-marker { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); overflow: hidden; }
.sg-marker img { width: 100%; height: 100%; object-fit: cover; }
.sg-marker.me { background: var(--orange); }
.sg-marker.rider { background: var(--green); }

/* Orders */
.sg-order-card { display: flex; gap: 14px; align-items: center; padding: 14px; cursor: pointer; }
.sg-order-card img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bg); }
.sg-order-card .grow { flex: 1; min-width: 0; }
.sg-order-status { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--navy); white-space: nowrap; }
.sg-order-status.done { background: var(--green-soft); color: var(--green); }
.sg-order-status.cancel { background: #fef3f2; color: var(--red); }
.sg-order-status.wait { background: var(--orange-soft); color: var(--orange); }
.sg-steps { display: flex; gap: 6px; margin: 14px 0; }
.sg-step { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.sg-step::before { content: ""; display: block; height: 6px; border-radius: 6px; background: var(--line); margin-bottom: 6px; }
.sg-step.done { color: var(--navy); font-weight: 700; }
.sg-step.done::before { background: var(--orange); }
.sg-track-map { height: 320px; border-radius: 14px; overflow: hidden; margin-top: 12px; }
.sg-pickup-code { font-size: 34px; font-weight: 900; letter-spacing: 4px; color: var(--navy); text-align: center; padding: 12px; background: var(--orange-soft); border-radius: 14px; }

/* Maid */
.sg-maid-card { display: flex; gap: 14px; padding: 14px; align-items: center; }
.sg-maid-card img { width: 86px; height: 86px; border-radius: 14px; object-fit: cover; background: var(--bg); }
.sg-dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.sg-date { flex-shrink: 0; width: 70px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 4px; text-align: center; }
.sg-date b { display: block; font-size: 18px; }
.sg-date small { color: var(--muted); font-size: 11px; }
.sg-date.active { border-color: var(--orange); background: var(--orange-soft); }
.sg-date:disabled { opacity: 0.35; cursor: not-allowed; }
.sg-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.sg-slot { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; font-weight: 700; }
.sg-slot.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.sg-slot:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

/* Butler */
.sg-butler-fab { position: fixed; right: 20px; bottom: 24px; z-index: 45; width: 76px; height: 76px; border: 0; background: transparent; padding: 0; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25)); }
.sg-butler-fab img { width: 100%; height: 100%; }
.sg-butler { position: fixed; right: 20px; bottom: 20px; z-index: 110; width: 400px; max-width: calc(100vw - 24px); height: 600px; max-height: calc(100vh - 40px); background: #fff; border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; overflow: hidden; }
.sg-butler-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--navy); color: #fff; }
.sg-butler-head img { width: 44px; height: 44px; }
.sg-butler-head b { flex: 1; font-size: 16px; }
.sg-butler-head button { border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; width: 32px; height: 32px; border-radius: 50%; }
.sg-butler-lines { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.sg-line { max-width: 85%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.sg-line.bot { background: #fff; align-self: flex-start; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.sg-line.me { background: var(--navy); color: #fff; align-self: flex-end; }
.sg-pick { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); cursor: pointer; align-self: stretch; }
.sg-pick img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: var(--bg); }
.sg-pick .grow { flex: 1; min-width: 0; }
.sg-pick small { color: var(--muted); display: block; font-size: 12px; }
.sg-butler-foot { border-top: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.sg-butler-langs { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.sg-butler-langs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.sg-butler-langs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.sg-butler-input { display: flex; gap: 8px; align-items: center; }
.sg-butler-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 14px; outline: 0; min-width: 0; }
.sg-mic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--orange-soft); color: var(--orange); font-size: 18px; flex-shrink: 0; }
.sg-mic.live { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.5); } 70% { box-shadow: 0 0 0 12px rgba(217, 45, 32, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, 0); } }
.sg-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; flex-shrink: 0; }
.sg-typing { align-self: flex-start; color: var(--navy); font-size: 13px; }

/* Home (marketplace layout) */
.fp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.fp-tabs::-webkit-scrollbar { display: none; }
.fp-tab { flex-shrink: 0; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 12px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.fp-tab i { color: var(--muted); }
.fp-tab:hover { color: var(--navy); }
.fp-tab.active { color: var(--navy); border-bottom-color: var(--orange); }
.fp-tab.active i { color: var(--orange); }
.fp-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.fp-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 8px; }
.fp-app { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fp-qr { background: #fff; padding: 8px; border-radius: 14px; border: 3px solid var(--orange); min-width: 132px; min-height: 132px; display: flex; align-items: center; justify-content: center; }
.fp-qr img, .fp-qr canvas { display: block; }
.fp-app b { margin-top: 6px; font-size: 15px; }
.fp-app span { font-size: 12px; opacity: 0.85; }
.fp-stores { display: flex; gap: 8px; margin-top: 8px; }
.fp-stores a { background: #fff; color: var(--navy); border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.fp-filter { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.fp-filter-head { display: flex; align-items: center; justify-content: space-between; }
.fp-filter-head h3 { margin: 0; font-size: 18px; }
.fp-filter-head button { border: 0; background: transparent; color: var(--orange); font-weight: 700; font-size: 13px; }
.fp-filter-head .fp-close { display: none; color: var(--navy); font-size: 18px; }
@media (max-width: 1024px) { .fp-filter-head .fp-close { display: block; } }
.fp-filter h4 { margin: 16px 0 8px; font-size: 14px; }
.fp-radio, .fp-check { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.fp-radio input, .fp-check input { accent-color: var(--orange); width: 17px; height: 17px; margin: 0; }
.fp-check em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); background: var(--bg); padding: 1px 8px; border-radius: 999px; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.fp-chip.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.fp-catsearch { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 12px; height: 38px; margin-bottom: 6px; }
.fp-catsearch i { color: var(--muted); font-size: 13px; }
.fp-catsearch input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; background: transparent; }
.fp-catlist { max-height: 300px; overflow-y: auto; padding-right: 4px; }
.fp-mapcard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.fp-map { height: 170px; }
.fp-mapaddr { display: flex; gap: 8px; padding: 10px 12px 4px; font-size: 13px; line-height: 1.4; }
.fp-mapaddr i { color: var(--orange); margin-top: 3px; }
.fp-mapbtns { display: flex; gap: 8px; padding: 6px 12px 12px; }
.fp-main { min-width: 0; }
.fp-hero { position: relative; min-height: 230px; border-radius: 22px; overflow: hidden; background-size: cover; background-position: right center; background-color: var(--navy); display: flex; align-items: center; }
.fp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 42, 63, 0.92) 0%, rgba(8, 42, 63, 0.75) 42%, rgba(8, 42, 63, 0) 70%); }
.fp-hero-text { position: relative; padding: 28px 32px; max-width: 520px; color: #fff; }
.fp-hero-text h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.2; }
.fp-hero-text p { margin: 0 0 18px; opacity: 0.9; line-height: 1.5; }
.fp-filter-btn { display: none; }
.fp-section { margin-top: 30px; }
.fp-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.fp-section-head h2 { margin: 0; font-size: 22px; }
.fp-arrows { display: flex; gap: 8px; }
.fp-arrows button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--navy); }
.fp-arrows button:hover { border-color: var(--orange); color: var(--orange); }
.fp-cats { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scrollbar-width: none; }
.fp-cats::-webkit-scrollbar { display: none; }
.fp-cat { flex-shrink: 0; width: 98px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 8px; scroll-snap-align: start; font-weight: 700; font-size: 13px; color: var(--navy); }
.fp-cat-img { width: 88px; height: 88px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; border: 2px solid transparent; transition: transform 0.15s ease; }
.fp-cat-img img { width: 70px; height: 70px; object-fit: contain; }
.fp-cat-img i { font-size: 30px; color: var(--orange); }
.fp-cat:hover .fp-cat-img { transform: translateY(-3px); }
.fp-cat.active .fp-cat-img { border-color: var(--orange); background: var(--orange-soft); }
.fp-cat.active { color: var(--orange); }
.fp-promos { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scrollbar-width: none; }
.fp-promos::-webkit-scrollbar { display: none; }
.fp-promo { position: relative; flex-shrink: 0; width: 330px; height: 150px; border-radius: 18px; overflow: hidden; cursor: pointer; scroll-snap-align: start; box-shadow: var(--shadow); }
.fp-promo.voucher { background: linear-gradient(120deg, var(--navy) 0%, #14598a 100%); color: #fff; display: flex; align-items: center; gap: 14px; padding: 18px; }
.fp-promo-big { min-width: 96px; height: 96px; border-radius: 18px; background: var(--orange); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; line-height: 1; }
.fp-promo-big small { font-size: 12px; font-weight: 700; margin-top: 6px; }
.fp-promo-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; z-index: 1; }
.fp-promo-info b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-promo-info span { font-size: 12px; opacity: 0.85; }
.fp-promo-fox { position: absolute; right: -12px; bottom: -14px; width: 92px; opacity: 0.95; }
.fp-promo.brand { background-size: cover; background-position: right center; color: #fff; display: flex; align-items: flex-end; }
.fp-promo.brand::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 42, 63, 0.88), rgba(8, 42, 63, 0.1) 75%); }
.fp-promo.brand div { position: relative; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; max-width: 70%; }
.fp-promo.brand b { font-size: 17px; }
.fp-promo.brand span { font-size: 12px; opacity: 0.9; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.fp-card { cursor: pointer; border-radius: 18px; background: #fff; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.fp-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12); }
.fp-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #0b3c5d, #1a6a96); }
.fp-cover > img { width: 100%; height: 100%; object-fit: cover; }
.fp-cover-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fp-cover-empty img { width: 90px; height: 90px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25)); }
.fp-deal { position: absolute; top: 12px; left: 0; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 12px 5px 10px; border-radius: 0 999px 999px 0; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); }
.fp-closed { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.55); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: 1px; font-size: 16px; }
.fp-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.fp-card-title b { font-size: 16px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-card-cats { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-card-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.fp-rate { color: var(--ink); font-weight: 700; }
.fp-rate i { color: #f5a524; }
.fp-rate em { font-style: normal; color: var(--muted); font-weight: 500; }

/* Toast */
.sg-toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 200; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }

/* Footer */
.sg-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 20px 90px; }
.sg-foot a { color: var(--navy); font-weight: 600; margin: 0 6px; }

.sg-icon-btn { white-space: nowrap; flex-shrink: 0; }
.sg-search { min-width: 180px; }
@media (max-width: 1200px) {
  .sg-icon-btn .lbl { display: none; }
  .sg-loc { max-width: 260px; }
}
@media (max-width: 1024px) {
  .fp-layout { grid-template-columns: 1fr; }
  .fp-side { position: fixed; z-index: 120; left: 0; top: 0; bottom: 0; width: 300px; max-height: none; background: var(--bg); padding: 16px; box-shadow: 0 0 40px rgba(0, 0, 0, 0.3); transform: translateX(-105%); transition: transform 0.2s ease; }
  .fp-side.open { transform: none; }
  .fp-app { display: none; }
  .fp-filter-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; color: var(--navy); }
  .sg-side { display: none; }
  .sg-mobile-cart.show { display: flex; }
  .sg-hero-map { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 112px; }
  .sg-header-inner { flex-wrap: wrap; padding: 8px 12px; gap: 8px; height: auto; }
  .sg-header { height: auto; }
  .sg-logo img { height: 30px; }
  .sg-loc { flex: 1; max-width: none; padding: 6px 12px; font-size: 13px; }
  .sg-search { order: 10; flex-basis: 100%; height: 40px; }
  .sg-icon-btn .lbl { display: none; }
  .sg-icon-btn { padding: 0 12px; height: 38px; }
  .sg-lang { display: none; }
  .sg-main { padding: 12px; }
  .sg-map { height: 220px; }
  .sg-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .sg-store-cover { height: 110px; }
  .sg-menu { grid-template-columns: 1fr; }
  .sg-cats { position: sticky; top: var(--header-h); z-index: 5; flex-direction: row; overflow-x: auto; background: #fff; border-radius: 12px; }
  .sg-cats button { flex-shrink: 0; }
  .sg-products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .sg-product-img { height: 110px; }
  .sg-store-hero { height: 180px; }
  .sg-store-head { margin: -40px 8px 0; }
  .sg-modal { padding: 0; align-items: flex-end; }
  .sg-modal-box { max-height: 92vh; border-radius: 20px 20px 0 0; }
  .sg-two { grid-template-columns: 1fr; }
  .sg-butler { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 85vh; border-radius: 20px 20px 0 0; }
  .sg-butler-fab { width: 64px; height: 64px; right: 12px; bottom: 84px; }
  .fp-hero { min-height: 190px; border-radius: 18px; }
  .fp-hero-text { padding: 20px; }
  .fp-hero-text h1 { font-size: 24px; }
  .fp-section-head h2 { font-size: 18px; }
  .fp-arrows { display: none; }
  .fp-cat { width: 78px; font-size: 12px; }
  .fp-cat-img { width: 70px; height: 70px; border-radius: 18px; }
  .fp-cat-img img { width: 54px; height: 54px; }
  .fp-promo { width: 270px; height: 130px; }
  .fp-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
  .fp-card-title b { font-size: 14px; }
  .sg-row { flex-direction: column; align-items: stretch; }
  .sg-side { width: auto; position: static; }
}
