/* Эко Эрүүл Мэнд — "Лангуу 247": snow, ink, cranberry. Market stickers, price tags, receipts. */
:root {
  --snow: #F3F5F7;
  --white: #FFFFFF;
  --ink: #16181B;
  --ink-2: #4A5058;
  --cranberry: #B4113A;
  --cranberry-dark: #8E0C2D;
  --cranberry-tint: #FBE3E9;
  --frost: #DCE6EC;
  --rule: #D5DBE0;
  --ok: #1F6B4A;

  --cond: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --gutter: 16px;
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cranberry); }
:focus-visible { outline: 3px solid var(--cranberry); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--cond); font-weight: 800; line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; margin-bottom: 18px; }

.demo-banner {
  background: var(--ink); color: var(--white);
  font-size: .85rem; padding: 8px var(--gutter); text-align: center;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(var(--gutter), calc(50% - var(--max) / 2 + var(--gutter)));
  background: rgba(243,245,247,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  color: var(--ink); text-decoration: none;
  font-family: var(--cond); font-weight: 800; font-size: 1.12rem; line-height: 1; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.brand-mark { display: none; }
.cart-btn {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--white);
  border: 0; border-radius: 999px;
  padding: 9px 16px 9px 14px;
  cursor: pointer; font-weight: 700; font-size: .95rem;
}
.cart-btn:hover { background: #000; }
.cart-count {
  position: absolute; right: -6px; top: -8px;
  min-width: 24px; height: 24px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--cranberry); color: var(--white);
  border: 2px solid var(--snow);
  border-radius: 999px; font-size: .8rem; font-weight: 800;
}
.cart-count.bump { animation: bump .35s ease; }
.cart-count.zero { display: none; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: 40px var(--gutter) 28px;
}
.hero h1 {
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 10.5em;
  text-wrap: balance;
}
.hero h1 .h-sub { display: block; }
.sticker {
  position: absolute;
  right: max(var(--gutter), calc(50% - var(--max) / 2 + var(--gutter)));
  top: 26px;
  width: clamp(116px, 24vw, 176px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cranberry); color: var(--white);
  display: grid; place-content: center; text-align: center;
  transform: rotate(-12deg);
  font-family: var(--cond); font-weight: 800; line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 0 0 3px var(--cranberry), inset 0 0 0 5px rgba(255,255,255,.55);
  animation: slap .55s cubic-bezier(.2,1.5,.4,1) .15s both;
}
.sticker b { display: block; font-size: clamp(1.9rem, 5.4vw, 2.9rem); letter-spacing: -0.03em; margin: 1px 0; }
.sticker span { display: block; font-size: clamp(.68rem, 1.9vw, .9rem); font-weight: 700; max-width: 7.5em; margin: 0 auto; line-height: 1.15; }
@media (max-width: 900px) {
  .sticker { position: relative; right: auto; top: auto; float: right; margin: -8px -4px 6px 10px; width: 104px; shape-outside: circle(50%); }
  .hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .sticker b { font-size: 1.85rem; }
  .sticker span { font-size: .68rem; }
  .hero-sub { clear: both; }
}
@keyframes slap { from { transform: rotate(-40deg) scale(1.8); opacity: 0; } }

.hero-sub {
  margin: 22px 0 0; max-width: 34em;
  font-size: 1.1rem; color: var(--ink-2);
}
.steps {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  counter-reset: step;
  border-top: 2px solid var(--ink);
}
.steps li {
  counter-increment: step;
  padding: 12px 14px 0 0;
  font-size: .95rem; color: var(--ink-2);
}
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--cond); font-weight: 800; font-size: 1.4rem; line-height: 1;
  color: var(--cranberry); margin-bottom: 6px;
}
.steps b { color: var(--ink); display: block; font-size: 1.05rem; }
.steps span { display: block; }

/* ---------- Pending order banner ---------- */
.pending-banner { background: var(--cranberry); color: var(--white); padding: 12px var(--gutter); }
.pending-banner .inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
}
.pending-banner .btn.primary { background: var(--white); color: var(--cranberry); border-color: var(--white); }

/* ---------- Catalog ---------- */
.catalog { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 64px; }
.chips {
  display: flex; gap: 22px; overflow-x: auto;
  margin-bottom: 22px; border-bottom: 1px solid var(--rule);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  background: none; border: 0; padding: 10px 0 9px;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  cursor: pointer;
  font-weight: 700; font-size: 1rem; color: var(--ink-2);
}
.chip:hover { color: var(--ink); }
.chip[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--cranberry); }

.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 20px;
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; } }

.tile { display: flex; flex-direction: column; min-width: 0; }
.tile-img {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 5;
  border: 0; padding: 0; cursor: pointer;
  background: var(--frost);
  border-radius: var(--r-md);
  overflow: hidden;
}
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile-img:hover img { transform: scale(1.03); }
.tile-img .soldout {
  position: absolute; left: 8px; top: 8px;
  background: var(--ink); color: var(--white);
  font-size: .8rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.tile h3 {
  font-family: var(--body); font-weight: 700; font-size: 1.02rem; line-height: 1.25;
  margin: 12px 0 2px;
}
.tile h3 button { all: unset; cursor: pointer; }
.tile h3 button:focus-visible { outline: 3px solid var(--cranberry); outline-offset: 2px; }
.tile .meta { color: var(--ink-2); font-size: .9rem; margin: 0; line-height: 1.35; }
.tile .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }

/* price tag: the shop's sticker language */
.price {
  position: relative;
  display: inline-block;
  font-family: var(--cond); font-weight: 800; font-size: 1.1rem; line-height: 1;
  white-space: nowrap; letter-spacing: -0.01em;
  color: var(--cranberry);
}
.add {
  border: 0; cursor: pointer;
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--ink); color: var(--white);
  font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center;
}
.add:hover { background: var(--cranberry); }
.add:disabled { background: var(--rule); color: var(--ink-2); cursor: not-allowed; }
.add.added { background: var(--cranberry); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent; color: var(--ink);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn.primary { background: var(--cranberry); border-color: var(--cranberry); color: var(--white); }
.btn.primary:hover { background: var(--cranberry-dark); border-color: var(--cranberry-dark); }
.btn.big { width: 100%; min-height: 58px; font-size: 1.12rem; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn.ghost { border-color: var(--rule); color: var(--ink-2); }
.btn.ghost:hover { background: var(--snow); color: var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.linkish {
  background: none; border: 0; padding: 10px 0; cursor: pointer;
  color: var(--ink-2); text-decoration: underline; font-size: .95rem;
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--white); cursor: pointer; font-size: 1rem;
}

/* ---------- Narrow views ---------- */
.narrow { max-width: 580px; width: 100%; margin: 0 auto; padding: 28px var(--gutter) 64px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--ink-2); text-decoration: none; font-weight: 700; }
.back:hover { color: var(--ink); }
.lead { margin: -6px 0 22px; color: var(--ink-2); }

/* ---------- Summary ---------- */
.summary, #pay-summary { font-size: .97rem; }
.summary {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 28px;
}
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum-line.muted { color: var(--ink-2); }
.sum-line.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 1.1rem; }

/* ---------- Form ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
legend { font-family: var(--cond); font-weight: 800; font-size: 1.2rem; line-height: 1.1; margin-bottom: 14px; padding: 0; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; font-size: .93rem; margin-bottom: 5px; }
.field small { color: var(--ink-2); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  border: 2px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--white);
  padding: 12px;
  font-size: 1rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.invalid input, .field.invalid textarea { border-color: var(--cranberry); background: #FFF8FA; }
.err { display: block; color: var(--cranberry); font-style: normal; font-weight: 600; font-size: .88rem; margin-top: 4px; }
.err:empty { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--ink-2); font-size: .93rem; margin: 0 0 14px; }

.radios { display: grid; gap: 8px; margin-bottom: 14px; }
.radio {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--rule); border-radius: var(--r-md);
  background: var(--white);
  padding: 13px 14px; cursor: pointer;
}
.radio:has(input:checked) { border-color: var(--ink); }
.radio input { accent-color: var(--cranberry); width: 20px; height: 20px; margin: 0; flex: none; }
.radio .r-label { flex: 1; font-weight: 700; }
.radio .r-fee { color: var(--ok); font-weight: 700; font-size: .92rem; white-space: nowrap; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.total-bar {
  position: sticky; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--snow);
  border-top: 2px solid var(--ink);
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
}
.total-bar span { display: block; font-size: .88rem; color: var(--ink-2); }
.total-bar strong { font-family: var(--cond); font-weight: 800; font-size: 1.45rem; line-height: 1; }

/* ---------- Pay: a paper receipt ---------- */
.bank {
  position: relative;
  background: var(--white);
  padding: 8px 18px 22px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  margin-bottom: 18px;
  filter: drop-shadow(0 1px 0 var(--rule));
}
.bank::after {   /* torn receipt edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background:
    linear-gradient(-45deg, transparent 8px, var(--white) 0) 0 0 / 16px 12px repeat-x,
    linear-gradient(45deg, transparent 8px, var(--white) 0) 0 0 / 16px 12px repeat-x;
}
.bank-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0;
  border-bottom: 1.5px dashed var(--rule);
}
.bank-row:last-child { border-bottom: 0; }
.bank-row .k { font-size: .86rem; color: var(--ink-2); }
.bank-row .v { font-weight: 700; font-size: 1.12rem; word-break: break-all; }
.bank-row.amount .v, .bank-row.code .v {
  font-family: var(--cond); font-weight: 800; font-size: 1.7rem; line-height: 1.1; margin-top: 2px; letter-spacing: -0.01em;
}
.bank-row.code .v { color: var(--cranberry); letter-spacing: .02em; }
.copy {
  flex: none;
  border: 2px solid var(--ink); background: var(--white);
  border-radius: 999px; padding: 6px 14px;
  font-size: .86rem; font-weight: 700; cursor: pointer;
}
.copy:hover { background: var(--ink); color: var(--white); }
.copy.ok { border-color: var(--ok); background: var(--ok); color: var(--white); }

.must {
  margin: 26px 0 16px;
  padding: 14px 16px;
  background: var(--cranberry-tint);
  border-radius: var(--r-md);
  font-size: .97rem;
}
.must strong { display: block; color: var(--cranberry-dark); }

.order-details { margin: 8px 0 24px; }
.order-details summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.order-details #pay-summary { padding: 8px 0; }
.cust { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink-2); }
.cust p { margin: 2px 0; }

.send-area { text-align: center; }
.send-error {
  text-align: left;
  color: var(--cranberry-dark); background: var(--cranberry-tint);
  border-radius: var(--r-md);
  padding: 12px 14px; margin: 12px 0 0;
  font-size: .96rem;
}

/* ---------- Done ---------- */
.done { text-align: center; padding-top: 28px; }
.done-mark { color: var(--ok); margin-bottom: 12px; display: flex; justify-content: center; }
.done-mark svg { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done h2 { font-size: 2.2rem; }
.done p { margin: 12px auto; max-width: 40ch; }
.done .code-inline { font-family: var(--cond); font-weight: 800; font-size: 1.05em; color: var(--cranberry); white-space: nowrap; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* ---------- Track ---------- */
.track-result {
  margin-top: 22px; padding: 16px 18px;
  background: var(--white); border-radius: var(--r-md);
  border-left: 6px solid var(--rule);
}
.track-result strong { display: block; font-family: var(--cond); font-weight: 800; font-size: 1.3rem; line-height: 1.15; margin-top: 8px; }
.track-result p { margin: 6px 0 0; color: var(--ink-2); }
.track-result .code-inline { font-weight: 700; }
.track-result.st-transferred, .track-result.st-pending { border-left-color: #E0A100; }
.track-result.st-paid, .track-result.st-delivered { border-left-color: var(--ok); }
.track-result.st-cancelled, .track-result.st-none { border-left-color: var(--cranberry); }

/* ---------- Cart drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(22,24,27,.5); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(430px, 100%);
  background: var(--snow);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s ease, visibility .28s;
  visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  border-bottom: 2px solid var(--ink);
}
.drawer-head h2 { margin: 0; font-size: 1.5rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px var(--gutter); }
.drawer-foot { padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom)); background: var(--white); }
.drawer-foot .sum-line { font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; align-items: baseline; }
.drawer-foot .sum-line span:last-child { font-family: var(--cond); font-size: 1.3rem; }
.drawer-foot .btn { width: 100%; }
.empty { text-align: center; color: var(--ink-2); padding: 48px 8px; grid-column: 1 / -1; }
.empty .btn { margin-top: 12px; }

.line-item {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.line-item img { width: 58px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--frost); }
.line-item .li-name { font-weight: 700; line-height: 1.25; }
.line-item .li-price { color: var(--ink-2); font-size: .92rem; }
.qty { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); }
.qty button { width: 34px; height: 34px; border: 0; background: none; cursor: pointer; font-size: 1.15rem; border-radius: 50%; }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }

/* ---------- Product dialog ---------- */
.product-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border: 0; border-radius: var(--r-md);
  padding: 0;
  background: var(--white); color: var(--ink);
}
.product-dialog::backdrop { background: rgba(22,24,27,.6); }
.pd-img { aspect-ratio: 16 / 11; background: var(--frost); position: relative; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-img .icon-btn { position: absolute; right: 12px; top: 12px; }
.pd-body { padding: 22px; }
.pd-body h3 { font-size: 1.6rem; }
.pd-body .meta { color: var(--ink-2); margin: 8px 0 16px; }
.pd-body h4 { margin: 18px 0 4px; font-size: 1rem; }
.pd-body p { margin: 0; }
.pd-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 2px solid var(--ink); }
.pd-actions .price { font-size: 1.5rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  transform: translate(-50%, 20px);
  background: var(--ink); color: var(--white);
  padding: 11px 20px; border-radius: 999px;
  font-weight: 700; font-size: .93rem;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer: the stall itself ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 40px var(--gutter) 32px; font-size: .95rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer .place {
  font-family: var(--cond); font-weight: 800; color: var(--white);
  font-size: clamp(1.6rem, 4.6vw, 2.8rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 18px; max-width: 16em;
}
.footer .place em { font-style: normal; color: var(--cranberry-tint); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; border-top: 1px solid rgba(255,255,255,.2); padding-top: 16px; }
.footer strong { color: var(--white); }
.footer p { margin: 0; }
.footer a { color: var(--white); font-weight: 700; }
.disclaimer { max-width: 46ch; font-size: .84rem; color: rgba(255,255,255,.5); }

@media (max-width: 480px) {
  h2 { font-size: 1.55rem; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 34px 1fr; padding: 10px 0 0; }
  .steps li::before { grid-row: span 2; font-size: 1.3rem; margin: 2px 0 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .bank-row.amount .v, .bank-row.code .v { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Big catalog: search, subcategories, paging, badges ---------- */
.catalog-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 24px; margin-bottom: 18px;
}
.catalog-title { margin: 0; font-size: 1.75rem; }
.search-box {
  position: relative; flex: 1 1 320px; max-width: 520px;
  display: flex; align-items: center;
  background: var(--white);
  border: 2px solid var(--rule);
  border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:hover { border-color: #B9C2C9; }
.search-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(180,17,58,.12); }
.search-icon { position: absolute; left: 18px; color: var(--ink-2); pointer-events: none; }
.search-box:focus-within .search-icon { color: var(--cranberry); }
.search-box input {
  flex: 1; min-width: 0; height: 52px;
  border: 0; background: transparent; outline: none;
  padding: 0 48px 0 50px;
  font-size: 1rem; font-weight: 500; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.search-box input::placeholder { color: #8A929A; font-weight: 500; }
.search-box input::-webkit-search-cancel-button, .search-box input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-clear {
  position: absolute; right: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--snow); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer;
}
.search-clear:hover { background: var(--ink); color: var(--white); }
@media (max-width: 640px) {
  .catalog-head { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; flex-basis: auto; }
}

/* pickup: call before coming */
.pickup-note {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 6px 0 18px; padding: 16px 18px;
  background: #FFF6D6;
  border: 2px solid #E8B400;
  border-radius: var(--r-md);
  text-align: left;
}
.pn-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #FFD84D;
  display: grid; place-items: center;
  animation: ring 1.4s ease .3s 2;
}
@keyframes ring { 0%,100% { transform: rotate(0); } 15%,45% { transform: rotate(-14deg); } 30%,60% { transform: rotate(14deg); } 75% { transform: rotate(0); } }
.pn-body strong { display: block; font-size: 1.08rem; line-height: 1.3; color: var(--ink); }
.pn-body p { margin: 6px 0 0; font-size: .95rem; color: #3D3A2A; }
.pn-body .pn-addr { font-weight: 700; color: var(--ink); }
.pn-call { margin-top: 12px; }
.done .pickup-note { margin: 18px auto; max-width: 480px; }
.subchips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 16px; }
.subchip {
  border: 1.5px solid var(--rule); background: var(--white); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.subchip:hover { border-color: var(--ink); color: var(--ink); }
.subchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.result-count { color: var(--ink-2); font-size: .9rem; margin: 0 0 14px; }
.more-btn { display: flex; margin: 36px auto 0; min-width: 220px; }
.tile-img { background: var(--white); }
.tile-img img { object-fit: contain; }
.tile h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .96rem; }
.tile-img .soldout.sale { background: var(--cranberry); }
.tile-img .soldout.new { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.price s { display: block; margin-top: 3px; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.pd-actions .price s { display: inline; margin: 0 0 0 8px; font-size: .95rem; }
.pd-img { background: var(--white); aspect-ratio: 1 / 1; max-height: 52vh; margin: 0 auto; }
.pd-img img { object-fit: contain; }
.pd-actions { margin: 14px 0 6px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.pd-text { white-space: pre-line; margin: 12px 0 0 !important; font-size: .95rem; line-height: 1.6; }
.pd-more { margin-top: 16px; }
.pd-more summary { cursor: pointer; font-weight: 700; }
.pd-more .pd-text { font-size: .86rem; color: var(--ink-2); }

/* ---------- Cart bar (bottom of screen once the cart has items) ---------- */
.cart-bar {
  position: fixed; z-index: 30;
  left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 16px;
  background: var(--ink); color: var(--white);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(22,24,27,.28);
  animation: barIn .35s cubic-bezier(.2,1.2,.4,1);
}
@keyframes barIn { from { transform: translate(-50%, 120%); } }
.cart-bar.pulse { animation: barPulse .4s ease; }
@keyframes barPulse { 50% { transform: translateX(-50%) scale(1.04); } }
.cb-info {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; color: inherit; cursor: pointer; text-align: left; padding: 4px 0;
}
.cb-info > span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
#cb-count { font-size: .82rem; color: rgba(255,255,255,.72); }
#cb-total { font-size: 1.12rem; font-weight: 800; }
.cb-go {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: 999px;
  background: var(--cranberry); color: var(--white);
  font-weight: 800; text-decoration: none;
}
.cb-go:hover { background: var(--cranberry-dark); }
body.has-cart-bar .footer { padding-bottom: 110px; }
body.has-cart-bar .toast { bottom: 96px; }

/* ---------- order lookup with several results ---------- */
.track-list { margin-top: 22px; }
.track-list .track-result { margin-top: 12px; }
.track-result .muted { color: var(--ink-2); font-size: .9rem; }

/* ---------- Shelves: sale / popular / new ---------- */
.shelves { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; }
.shelf { margin: 28px 0 8px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shelf-head h2 { margin: 0; font-size: 1.4rem; }
.shelf-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.shelf-arrow {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--rule); background: var(--white); color: var(--ink);
  font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.shelf-arrow:hover { border-color: var(--ink); }
.shelf-all {
  border: 0; background: none; cursor: pointer; padding: 8px 2px 8px 8px;
  color: var(--cranberry); font-weight: 700; font-size: .92rem; white-space: nowrap;
}
.shelf-all:hover { text-decoration: underline; }
.shelf-row {
  list-style: none; margin: 0; padding: 0 0 10px;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 20px) / 4.3);
  gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0;
  scrollbar-width: thin;
}
.shelf-row > .tile { scroll-snap-align: start; }
@media (max-width: 960px) { .shelf-row { grid-auto-columns: calc((100% - 2 * 16px) / 3.3); gap: 16px; } }
@media (max-width: 640px) {
  .shelf-row { grid-auto-columns: 44%; gap: 12px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .shelf-arrow { display: none; }
  .shelf-head h2 { font-size: 1.2rem; }
}
.tile-img .soldout.hit { background: #E8B400; color: var(--ink); }
.chip-special { color: var(--cranberry); }

/* ---------- Header: order lookup next to the cart ---------- */
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.track-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 15px;
  border: 2px solid var(--ink); border-radius: 999px;
  color: var(--ink); background: var(--white);
  font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.track-link:hover, .track-link[aria-current="page"] { background: var(--ink); color: var(--white); }
.track-link .tl-short { display: none; }
.cart-btn { height: 42px; }
@media (max-width: 560px) {
  .track-link .tl-long { display: none; }
  .track-link .tl-short { display: inline; }
}
@media (max-width: 420px) {
  .brand { font-size: 1rem; }
  .track-link { padding: 0 12px; font-size: .86rem; }
  .cart-btn { padding: 0 12px; }
  .cart-btn .cart-label { display: none; }
}

/* ---------- Category tabs: wrap on computers (mouse can't side-scroll), swipe with a fade hint on phones ---------- */
@media (min-width: 641px) {
  .chips { flex-wrap: wrap; overflow: visible; gap: 2px 24px; }
}
@media (max-width: 640px) {
  .chips {
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
            mask-image: linear-gradient(to right, #000 85%, transparent);
    padding-right: 40px;
  }
  .chips.at-end { -webkit-mask-image: none; mask-image: none; }
}
.subchip-more { border-style: dashed; color: var(--cranberry); border-color: var(--cranberry); }

/* ---------- Delivery: strip, page, zone map, cart progress ---------- */
.delivery-strip {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--max); margin: 8px auto 0; padding: 14px 18px;
  width: calc(100% - 2 * var(--gutter));
  background: var(--white); color: var(--ink); text-decoration: none;
  border-radius: var(--r-md);
  border-left: 6px solid var(--ok);
}
.delivery-strip:hover .ds-link { text-decoration: underline; }
.ds-icon { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #E2F1E9; color: var(--ok); display: grid; place-items: center; }
.ds-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ds-text b { font-size: 1rem; }
.ds-text span { color: var(--ink-2); font-size: .88rem; }
.ds-link { flex: none; color: var(--cranberry); font-weight: 700; font-size: .92rem; }
@media (max-width: 560px) { .ds-link { display: none; } .ds-icon { width: 40px; height: 40px; } }

.delivery-page { max-width: 820px; margin: 0 auto; padding: 28px var(--gutter) 64px; }
.d-h { font-size: 1.25rem; margin: 34px 0 12px; }
.d-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.d-price { background: var(--white); border-radius: var(--r-md); padding: 16px; border-top: 5px solid var(--rule); }
.d-price b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.d-price b small { font-size: .9rem; font-weight: 700; }
.d-price span { display: block; margin-top: 6px; color: var(--ink-2); font-size: .9rem; line-height: 1.35; }
.d-free { border-top-color: var(--ok); }
.d-free b { color: var(--ok); }
.d-far { border-top-color: #E0A100; }
@media (max-width: 600px) { .d-prices { grid-template-columns: 1fr; } .d-price { display: flex; align-items: baseline; gap: 12px; } .d-price b { flex: none; min-width: 6.5em; } .d-price span { margin: 0; } }

.zone-caption { margin-top: 10px; }
.zone-chips { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.zone-chips li { background: var(--white); border: 1.5px solid #BFDCCB; color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: .88rem; font-weight: 600; }
.zone-chips li.zc-stall { border-color: var(--cranberry); color: var(--cranberry); }

.d-steps { list-style: none; padding: 0; margin: 0; counter-reset: ds; display: grid; gap: 10px; }
.d-steps li { counter-increment: ds; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; background: var(--white); border-radius: var(--r-md); padding: 14px 16px; }
.d-steps li::before { content: counter(ds); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--cranberry); color: var(--white); display: grid; place-items: center; font-weight: 800; }
.d-steps b { font-size: 1rem; }
.d-steps span { color: var(--ink-2); font-size: .92rem; }
.d-other { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.d-other p { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .d-other { grid-template-columns: 1fr; } }
.d-shop { margin-top: 34px; }

.free-prog { margin-bottom: 12px; }
.free-prog p { margin: 0 0 6px; font-size: .9rem; color: var(--ink-2); }
.free-prog p.done { color: var(--ok); }
.fp-bar { height: 8px; background: var(--snow); border-radius: 999px; overflow: hidden; }
.fp-bar span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s ease; }
.free-hint { margin: -4px 0 12px; padding: 10px 14px; background: #E2F1E9; color: #174F37; border-radius: var(--r-md); font-size: .93rem; }

/* ---------- Real delivery map ---------- */
.zone-map-box { background: var(--ink); border-radius: 14px; overflow: hidden; }
.zm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; }
.zm-switch { display: inline-flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.zm-switch button {
  border: 0; background: none; color: rgba(255,255,255,.75); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .86rem;
}
.zm-switch button[aria-pressed="true"] { background: var(--white); color: var(--ink); }
.zm-locate {
  border: 0; cursor: pointer; border-radius: 999px; padding: 10px 16px;
  background: #3DDC84; color: #062814; font-weight: 800; font-size: .9rem;
}
.zm-locate:hover { background: #5BE89A; }
.zm-locate:disabled { opacity: .7; cursor: progress; }
.zone-map-el { height: 480px; background: #1d2a22; position: relative; }
.zm-loading { color: rgba(255,255,255,.7); text-align: center; padding-top: 200px; margin: 0; }
@media (max-width: 640px) { .zone-map-el { height: 420px; } .zm-top { padding: 8px; } .zm-switch button { padding: 7px 11px; } }
.zm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; color: rgba(255,255,255,.85); font-size: .84rem; }
.zm-legend span { display: inline-flex; align-items: center; gap: 7px; }
.zm-legend i { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
.lg-zone { border: 2px dashed #3DDC84; background: rgba(61,220,132,.15); }
.lg-out { background: rgba(11,26,18,.75); border: 1px solid rgba(255,255,255,.3); }
.lg-stall { background: var(--cranberry); border-radius: 50% !important; width: 12px !important; }

.zm-result { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--white); border-left: 6px solid var(--ok); }
.zm-result b { display: block; }
.zm-result span { display: block; color: var(--ink-2); font-size: .93rem; margin-top: 3px; }
.zm-result.far { border-left-color: #E0A100; }

/* Leaflet bits */
.leaflet-container { font-family: var(--body); }
.leaflet-tooltip.zm-tip { background: rgba(10,20,14,.82); color: #fff; border: 0; border-radius: 999px; padding: 3px 9px; font-weight: 700; font-size: 12px; box-shadow: none; }
.leaflet-tooltip.zm-tip::before { display: none; }
.is-street .leaflet-tooltip.zm-tip { background: rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.zm-land span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.leaflet-tooltip.zm-land-tip { font-weight: 700; font-size: 12px; border-radius: 8px; }
.zm-stall { position: relative; }
.zm-stall .zm-dot {
  position: absolute; inset: 4px; border-radius: 50%;
  background: var(--cranberry); color: #fff; border: 3px solid #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,.4);
}
.zm-stall .zm-pulse { position: absolute; inset: 0; border-radius: 50%; background: rgba(180,17,58,.45); animation: zmPulse 1.8s ease-out infinite; }
@keyframes zmPulse { from { transform: scale(.8); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.leaflet-tooltip.zm-stall-tip { background: var(--cranberry); color: #fff; border: 0; border-radius: 8px; font-size: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.leaflet-tooltip.zm-stall-tip::before { border-bottom-color: var(--cranberry) !important; }
.zm-you span { display: block; font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.leaflet-tooltip.zm-stall-tip::before { border-right-color: var(--cranberry) !important; border-bottom-color: transparent !important; }
.zone-map-el .leaflet-control-attribution { font-size: 10px; }
.zone-map-el.hide-land .zm-land:not(.zm-land-main) { display: none; }
@media (max-width: 640px) {
  .leaflet-tooltip.zm-tip { font-size: 10.5px; padding: 2px 7px; }
  .leaflet-tooltip.zm-stall-tip::before { border-right-color: transparent !important; border-bottom-color: transparent !important; border-top-color: var(--cranberry) !important; }
}

/* ---------- Product details: short preview + "read full description" ---------- */
.pd-sec { margin-top: 22px; }
.pd-sec h4 {
  position: relative; margin: 0 0 10px; padding-left: 0;
  font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em;
}
.pd-sec .pd-text { margin: 0 !important; white-space: pre-line; font-size: .95rem; line-height: 1.6; color: var(--ink); }
.pd-sec .pd-text.clamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.pd-bullet { display: inline-block; margin-top: 4px; position: relative; }
.pd-bullet::before {
  content: ""; position: absolute; left: -22px; top: .7em; width: 14px; height: 2px; background: var(--cranberry);
}
.pd-sec .pd-text { padding-left: 22px; }
.pd-readmore {
  margin: 14px 0 0 22px; padding: 9px 16px;
  background: var(--white); border: 1.5px solid var(--rule); border-radius: var(--r-sm);
  font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink);
}
.pd-readmore:hover { border-color: var(--ink); }
.pd-more { margin-top: 22px; padding-left: 22px; }

/* checkout: delivery time */
.eta {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 12px; padding: 12px 14px;
  background: var(--white); border-radius: var(--r-md); border-left: 5px solid var(--ink);
}
.eta svg { flex: none; margin-top: 1px; color: var(--ink); }
.eta span { display: flex; flex-direction: column; line-height: 1.35; }
.eta b { font-size: 1rem; }
.eta small { color: var(--ink-2); font-size: .88rem; margin-top: 2px; }
