:root {
  --blue: #1b3fa0;
  --blue-dark: #142f7a;
  --green: #47a521;
  --green-dark: #3a8718;
  --warm: #e86a2c;         /* palengke orange */
  --warm-dark: #cf541a;
  --warm-soft: #fbe6d3;
  --ink: #2c2620;
  --muted: #8a7f72;
  --line: #ece3d6;
  --bg: #fdf7ec;            /* warm cream */
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(90, 70, 40, .06);
  --radius: 16px;
  --topbar-h: 66px;
  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
/* overflow-x:clip (not hidden) stops sideways page scroll WITHOUT creating a
   scroll container — `hidden` here would break every position:sticky on the page. */
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: var(--display); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 1px 4px rgba(20,30,40,.15); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 18px; color: var(--blue); }
.brand-tag { font-size: 10px; font-weight: 700; letter-spacing: .6px; color: var(--green-dark); text-transform: uppercase; }
.search {
  flex: 1; max-width: 640px; position: relative; display: flex; align-items: center;
}
.search-icon { width: 20px; height: 20px; color: var(--muted); position: absolute; left: 14px; }
.search input {
  width: 100%; height: 44px; border: 1px solid var(--line); background: var(--bg);
  border-radius: 24px; padding: 0 44px; font-size: 15px; outline: none; transition: border-color .15s, background .15s;
}
.search input:focus { border-color: var(--blue); background: #fff; }
.clear-search {
  position: absolute; right: 12px; border: none; background: #d8dce1; color: #fff;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1;
}
.admin-link {
  flex-shrink: 0; color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
}
.admin-link:hover { background: var(--bg); color: var(--ink); }

/* Layout */
.layout {
  max-width: 1240px; margin: 0 auto; padding: 20px 18px 60px;
  display: grid; grid-template-columns: 232px 1fr; gap: 24px; align-items: start;
}
/* min-width:0 lets the icon strip scroll inside the column instead of stretching it */
.content { min-width: 0; }
.sidebar {
  position: sticky; top: calc(var(--topbar-h) + 20px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto;
}
.sidebar-title { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 4px 6px 10px; }
.category-list { list-style: none; margin: 0; padding: 0; }
.category-list li { margin: 1px 0; }
.category-list button {
  width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--ink);
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.category-list button:hover { background: var(--bg); }
.category-list button.active { background: #e8edfb; color: var(--blue); font-weight: 700; }
.category-list .cat-count { color: var(--muted); font-size: 12px; font-weight: 600; }
.category-list button.active .cat-count { color: var(--blue); }

/* Promo banner (shown when a discount is active) */
.promo-banner {
  background: linear-gradient(90deg, var(--warm), var(--green));
  color: #fff; text-align: center; font-weight: 800; font-size: 14px;
  padding: 10px 16px; letter-spacing: .2px;
}
.promo-banner[hidden] { display: none; }

/* Browse (hero + featured) */
.browse[hidden] { display: none; }
#featured-wrap[hidden] { display: none; }
.hero {
  border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #fff6ea 0%, #eef7e6 100%);
  border: 1px solid var(--warm-soft);
}
.hero-text h1 { margin: 0 0 4px; font-size: 22px; color: var(--warm-dark); }
.hero-text p { margin: 0; color: #8a7a63; font-size: 13.5px; font-weight: 600; max-width: 480px; }
.hero .wave { display: inline-block; }

.featured-title { font-size: 12px; font-weight: 700; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.featured {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 22px;
}
.tile {
  border: 1px solid var(--line); background: var(--card); border-radius: 14px; cursor: pointer;
  padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(120,90,50,.12); border-color: var(--warm); }
.tile.active { border-color: var(--warm); background: var(--warm-soft); box-shadow: inset 0 0 0 2px var(--warm); }
.tile.active .tile-emoji { background: #fff; }
.tile-emoji {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--warm-soft);
}
.tile-label {
  font-size: 12px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.2;
  white-space: normal; overflow-wrap: anywhere; hyphens: auto;
}
.tile-label.long { font-size: 11px; }
.tile-label.xlong { font-size: 10px; }
.cat-hint { display: none; }
.hero[hidden] { display: none; }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.result-info { font-size: 14px; color: var(--muted); }
.result-info strong { color: var(--ink); }
.sort { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sort select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px; background: #fff; cursor: pointer; }

.active-filter { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.active-filter .chip {
  display: inline-flex; align-items: center; gap: 8px; background: #e8edfb; color: var(--blue);
  padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 700;
}
.active-filter .chip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 15px; padding: 0; line-height: 1; }
.active-filter .clear-all {
  border: 1px solid var(--line); background: #fff; color: var(--warm-dark); cursor: pointer;
  padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 700;
}
.active-filter .clear-all:hover { border-color: var(--warm); background: var(--warm-soft); }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s; box-shadow: var(--shadow);
}
.card:hover { box-shadow: 0 6px 18px rgba(20,30,40,.12); transform: translateY(-2px); }
.card-media { aspect-ratio: 1 / 1; background: #eef1f4; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #b9c1c9; font-size: 12px; font-weight: 600; text-align: center; padding: 10px;
}
.card-body { padding: 11px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-size: 14px; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.card-unit { font-size: 12px; color: var(--muted); }
.card-priced { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.card-price { font-size: 16px; font-weight: 800; color: var(--blue); }
.card-price .cur { font-size: 12px; font-weight: 700; color: var(--blue); margin-right: 1px; }

/* Add-to-cart controls */
.add-btn {
  border: none; background: var(--green); color: #fff; width: 34px; height: 34px; border-radius: 10px;
  font-size: 22px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s, transform .1s;
}
.add-btn:hover { background: var(--green-dark); }
.add-btn:active { transform: scale(.92); }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--green); border-radius: 10px; overflow: hidden; }
.stepper button { border: none; background: transparent; color: #fff; width: 30px; height: 34px; font-size: 18px; cursor: pointer; }
.stepper button:hover { background: rgba(0,0,0,.12); }
.stepper .qty { color: #fff; font-weight: 800; font-size: 14px; min-width: 20px; text-align: center; }

/* States */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.btn {
  border: none; background: var(--blue); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 10px; cursor: pointer; margin-top: 10px;
}
.btn:hover { background: var(--blue-dark); }
.loading { text-align: center; padding: 20px; color: var(--muted); font-size: 14px; }
.sentinel { height: 1px; }

/* Skeletons */
.skeleton { pointer-events: none; }
.skeleton .card-media { background: linear-gradient(90deg,#eef1f4,#f6f8fa,#eef1f4); background-size: 200% 100%; animation: sh 1.2s infinite; }
.skeleton .sk-line { height: 12px; border-radius: 6px; background: #eef1f4; }
@keyframes sh { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,22,30,.55); }
.modal-card {
  position: relative; background: #fff; border-radius: 18px; overflow: hidden;
  width: min(760px, 100%); max-height: 90vh; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; border: none; background: rgba(255,255,255,.9);
  width: 34px; height: 34px; border-radius: 50%; font-size: 22px; cursor: pointer; line-height: 1;
}
.modal-media { background: #eef1f4; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.modal-body { padding: 26px 24px; overflow-y: auto; }
.pill { display: inline-block; background: #e8edfb; color: var(--blue); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.modal-body h3 { margin: 12px 0 6px; font-size: 22px; line-height: 1.25; }
.modal-unit { color: var(--muted); font-size: 14px; }
.modal-price { font-size: 28px; font-weight: 800; margin: 14px 0; color: var(--blue); }
.modal-price .cur { font-size: 16px; color: var(--blue); }
.modal-desc { color: #4a5560; font-size: 15px; line-height: 1.55; }
.modal-qty { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.modal-qty-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.qty-stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--green); border-radius: 12px; overflow: hidden; }
.qty-stepper button { border: none; background: transparent; color: #fff; width: 44px; height: 44px; font-size: 22px; cursor: pointer; line-height: 1; }
.qty-stepper button:hover { background: rgba(0,0,0,.12); }
.qty-stepper button:active { transform: scale(.9); }
.qty-stepper #mq-val { color: #fff; font-weight: 800; font-size: 17px; min-width: 34px; text-align: center; }
.modal-add { margin-top: 14px; width: 100%; border: none; background: var(--green); color: #fff; font-weight: 800; font-size: 15px; padding: 13px; border-radius: 12px; cursor: pointer; }
.modal-add:hover { background: var(--green-dark); }

/* Cart button in topbar */
.cart-btn {
  position: relative; flex-shrink: 0; border: none; background: var(--blue); color: #fff;
  height: 42px; padding: 0 16px 0 14px; border-radius: 22px; cursor: pointer; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.cart-btn:hover { background: var(--blue-dark); }
.cart-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--green); color: #fff;
  min-width: 20px; height: 20px; border-radius: 10px; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff;
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: cbump .32s ease; }
@keyframes cbump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.4); } }
.cart-label { }

/* Tactile tap feedback (feels responsive on touch devices) */
.add-btn:active, .tile:active, .pay-opt:active, .when-opt:active,
.stepper button:active, .filt:active { transform: scale(.94); }
.order-btn:active, .messenger-btn:active, .sms-btn:active, .btn:active,
.btn-green:active, .modal-add:active { transform: scale(.985); }
.card:active { transform: scale(.98); }
.add-btn, .tile, .pay-opt, .when-opt, .order-btn, .messenger-btn, .sms-btn,
.btn, .card, .filt, .stepper button { transition: transform .1s ease, background .15s, border-color .15s, box-shadow .15s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .add-btn:active, .tile:active, .card:active, .order-btn:active { transform: none; }
}

/* Cart drawer */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15,22,30,.5); }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: #fff;
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.2); animation: slidein .2s ease;
}
@keyframes slidein { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; color: var(--blue); }
.dh-actions { display: flex; align-items: center; gap: 10px; }
.history-link { border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 9px; cursor: pointer; }
.history-link:hover { border-color: var(--blue); color: var(--blue); }
.drawer-close { border: none; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }

/* Customer name field */
.cust-field { margin: 4px 0 12px; }
.cust-field label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 6px; }
.cust-field label span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.cust-field input, .cust-field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: #fff; resize: vertical; }
.cust-field input:focus, .cust-field textarea:focus { outline: none; border-color: var(--blue); }

/* Order history modal */
.history-card { grid-template-columns: 1fr; width: min(560px, 100%); }
.history-body { padding: 24px 22px; overflow-y: auto; max-height: 88vh; }
.history-body h3 { margin: 0 0 4px; font-size: 20px; color: var(--blue); }
.history-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.hist-empty { text-align: center; color: var(--muted); padding: 40px 10px; line-height: 1.6; }
.hist-order { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.hist-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hist-id { font-weight: 800; color: var(--blue); font-size: 15px; }
.hist-date { font-size: 12px; color: var(--muted); }
.hist-name { font-size: 13px; color: var(--ink); margin-top: 4px; }
.hist-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.hist-chip { font-size: 11px; font-weight: 700; background: #e8edfb; color: var(--blue); padding: 3px 9px; border-radius: 12px; }
.hist-chip.pay { background: var(--warm-soft); color: var(--warm-dark); }
.hist-items { margin: 6px 0 8px; padding-left: 18px; font-size: 13px; color: #4a5560; line-height: 1.6; }
.hist-total { text-align: right; font-size: 14px; color: var(--ink); }
.hist-total b { color: var(--blue); font-size: 16px; }
/* The whole cart body (items + footer) scrolls together so the order buttons
   are always reachable on small phone screens. */
.drawer-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.drawer-items { padding: 8px 12px; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.cart-row { display: flex; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.cart-row img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: #eef1f4; flex-shrink: 0; }
.cart-row .cr-info { flex: 1; min-width: 0; }
.cart-row .cr-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cart-row .cr-unit { font-size: 11px; color: var(--muted); }
.cart-row .cr-price { font-size: 13px; font-weight: 800; color: var(--blue); margin-top: 3px; }
.cart-row .stepper { background: var(--blue); }
.drawer-foot { padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fafbfe; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart-total .lbl { color: var(--muted); font-size: 14px; }
.cart-total .amt { font-size: 24px; font-weight: 800; color: var(--blue); }

/* Cart summary (subtotal / discount / total) */
.cart-summary { margin-bottom: 12px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--ink); padding: 2px 0; }
.sum-row[hidden] { display: none; }  /* the class's display:flex was overriding the hidden attribute */
.sum-row span:first-child { color: var(--muted); }
.sum-row.disc { color: var(--green-dark); font-weight: 700; }
.sum-row.disc span:first-child { color: var(--green-dark); }
.sum-row.total { margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }
.sum-row.total span:first-child { color: var(--ink); font-weight: 700; font-size: 15px; }
.sum-row.total .amt { font-size: 24px; font-weight: 800; color: var(--blue); }
.promo-hint { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--warm-dark); background: var(--warm-soft); border-radius: 8px; padding: 8px 10px; text-align: center; }
.promo-hint[hidden] { display: none; }

/* Delivery timing */
.when-field { margin: 4px 0 12px; }
.when-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.when-opts { display: flex; gap: 8px; }
.when-opt { flex: 1; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; padding: 9px 10px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 700; }
.when-opt:hover { border-color: var(--blue); }
.when-opt.active { border-color: var(--blue); background: #e8edfb; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.when-date { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.when-date[hidden] { display: none; }
.cart-note { font-size: 12px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.cart-note ul { margin: 6px 0; padding-left: 18px; }
.cart-note li { margin-bottom: 4px; }
.cart-note-deliver { display: block; margin-top: 8px; color: var(--warm-dark); font-weight: 700; }

/* Payment picker */
.pay { margin: 4px 0 12px; }
.pay-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.pay-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-opt {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  padding: 9px 12px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 700; flex: 1; min-width: 90px;
}
.pay-opt:hover { border-color: var(--blue); }
.pay-opt.active { border-color: var(--blue); background: #e8edfb; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.pay-details { margin-top: 10px; font-size: 13px; color: var(--ink); background: var(--warm-soft); border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
.pay-details[hidden] { display: none; }
.order-btn {
  width: 100%; margin-top: 10px; border: none; background: var(--green); color: #fff; font-weight: 800; font-size: 16px;
  padding: 15px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.order-btn:hover { background: var(--green-dark); }
.order-btn[disabled] { background: #c3ccd6; cursor: default; }
.messenger-btn {
  width: 100%; margin-top: 10px; border: none; color: #fff; font-weight: 800; font-size: 16px;
  padding: 15px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(90deg, #0084ff, #a033ff);
}
.messenger-btn:hover { filter: brightness(1.05); }
.messenger-btn[disabled] { background: #c3ccd6; cursor: default; filter: none; }
.messenger-btn[hidden] { display: none; }
.sms-btn {
  width: 100%; margin-top: 10px; border: none; color: #fff; font-weight: 800; font-size: 16px;
  padding: 15px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--warm);
}
.sms-btn:hover { background: var(--warm-dark); }
.sms-btn[disabled] { background: #c3ccd6; cursor: default; }
.sms-btn[hidden] { display: none; }
.clear-cart { border: 1px solid var(--line); background: #fff; color: #c0392b; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 9px; cursor: pointer; }
.clear-cart:hover { border-color: #c0392b; background: #fdecec; }
.clear-cart[hidden] { display: none; }

/* Back-to-top button */
.to-top {
  position: fixed; right: 18px; bottom: 20px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 24px; line-height: 1;
  box-shadow: 0 4px 14px rgba(20,30,40,.28); display: flex; align-items: center; justify-content: center;
  transition: opacity .2s, transform .2s;
}
.to-top:hover { background: var(--blue-dark); }
.to-top:active { transform: scale(.92); }
.to-top[hidden] { display: none; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 24px; font-size: 14px; font-weight: 600;
  z-index: 80; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Header "Contact" button (sits beside the cart) */
.contact-top {
  position: relative; flex-shrink: 0; cursor: pointer;
  height: 42px; padding: 0 15px; border-radius: 22px; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--green-dark); border: 1.5px solid var(--green);
  transition: background .15s, color .15s;
}
.contact-top:hover { background: var(--green); color: #fff; }
.contact-top svg { width: 20px; height: 20px; }

/* Contact popup (shares .modal / .modal-card) */
.contact-card { max-width: 380px; }
.contact-card-body { padding: 26px 24px 24px; text-align: center; }
.contact-card-body h3 { font-family: var(--display); font-size: 22px; color: var(--warm-dark); margin: 0 0 8px; }
.contact-card-body p { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.5; }
.contact-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; margin: 0 0 10px;
  padding: 13px 16px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #fff;
  text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .12s, box-shadow .12s;
}
.contact-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.contact-btn:active { transform: translateY(0); }
.contact-btn.fb { background: #1877f2; }
.contact-btn.call { background: var(--green); }
.contact-num { font-size: 13px; color: var(--muted); margin-top: 6px; }
.contact-num b { color: var(--ink); }

/* Footer */
.footer { margin-top: 40px; border-top: 1px solid var(--line); background: #fff; }
.footer-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 16px 18px; font-size: 12px; color: var(--muted); text-align: center;
}
.footer-base .updated { color: var(--muted); }
.footer-contact-link {
  border: none; background: none; cursor: pointer; font: inherit; font-weight: 800; font-size: 13px;
  color: var(--warm-dark); padding: 0;
}
.footer-contact-link:hover { text-decoration: underline; }

/* Empty catalog (no menu uploaded yet) */
.no-catalog { grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--muted); }
.no-catalog h2 { color: var(--ink); margin-bottom: 8px; }

/* Responsive */
/* Desktop: the text sidebar is the category nav; the icon strip is hidden. */
@media (min-width: 901px) {
  #featured-wrap { display: none; }
}
/* Tablet & phone: no sidebar — all categories are a single swipeable icon strip. */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .active-filter { display: none; }  /* the highlighted icon already shows the selection */
  /* Freeze only the header + category strip while the products scroll underneath
     (the sort bar scrolls away with the list — it returns at the top). #browse
     (not the inner strip) is the sticky element because a sticky box can only
     travel within its direct parent, and #browse is a tall child of .content. */
  #browse {
    position: sticky; top: var(--topbar-h); z-index: 20;
    background: var(--bg); padding-top: 10px; padding-bottom: 4px;
    box-shadow: 0 6px 8px -6px rgba(30, 40, 60, .18);
  }
  .featured {
    display: flex; gap: 8px; margin-bottom: 4px; padding: 2px 2px 6px;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x;
  }
  .featured::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 auto; width: 80px; padding: 9px 5px; }
  .tile-emoji { width: 40px; height: 40px; font-size: 21px; }
  .tile-label { font-size: 10.5px; }
  .tile-label.long { font-size: 9.5px; }
  .tile-label.xlong { font-size: 8.5px; }
  .cat-hint { display: block; text-align: right; font-size: 11px; color: var(--muted); font-weight: 600; margin: 0 2px 12px; }
  .cat-hint.hide { display: none; }
  .modal-card { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .modal-media img { min-height: 220px; max-height: 300px; }
}
@media (max-width: 560px) {
  .brand-text { display: none; }
  .admin-link { display: none; }
  .cart-label { display: none; }
  .contact-top-label { display: none; }
  .cart-btn { padding: 0 12px; }
  .contact-top { padding: 0 11px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .topbar-inner { gap: 10px; padding: 0 12px; }
}
