:root {
  --brand: #c0453d;
  --brand-dark: #9e332c;
  --brand-soft: #fdf1f0;
  --ok: #3f8f5b;
  --title: #2e2e3e;
  --body: #5b5b6a;
  --muted: #8a8a99;
  --line: #e9e6e4;
  --surface: #ffffff;
  --bg: #faf8f7;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #e0645b;
    --brand-dark: #f08a82;
    --brand-soft: #3a2422;
    --ok: #6cc28b;
    --title: #f2f0ef;
    --body: #c9c6c4;
    --muted: #8f8b89;
    --line: #34302f;
    --surface: #1f1c1b;
    --bg: #161413;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--brand); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--title);
  min-width: 0;
  flex: 1 1 220px;
}
.brand strong { display: block; font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.brand small { display: block; color: var(--muted); font-size: .85rem; }
.logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }

/* The merchant's cover photo: in place of a design's illustration, or as a
   banner above the plain layouts. */
.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}
.cover-banner { padding-top: 16px; }
.cover-banner img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--radius, 14px); }
@media (max-width: 600px) { .cover-banner img { aspect-ratio: 2 / 1; } }

.search { flex: 1 1 260px; }
.search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--title);
  font: inherit;
}
.search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--body);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding: 12px 0 8px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.thumb {
  aspect-ratio: 1;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 2rem;
  font-weight: 700;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.card-name { color: var(--title); font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.price { color: var(--title); font-weight: 700; white-space: nowrap; }
.oos { color: var(--muted); font-size: .8rem; }

.preview-bar { background: #2e2e3e; color: #fff; text-align: center; font-size: .85rem; padding: 6px 12px; }
.section-title { color: var(--title); font-size: 1.3rem; margin: 16px 0 0; }
.status { text-align: center; color: var(--muted); padding: 48px 0; }
.more { text-align: center; padding: 8px 0 32px; }
.more button {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}

.back { display: inline-block; margin: 16px 0 8px; text-decoration: none; }
.detail {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 32px;
}
@media (min-width: 720px) {
  .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 24px; }
}
.detail .thumb { border-radius: 10px; overflow: hidden; }
.detail h1 { color: var(--title); font-size: 1.5rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.detail .price { font-size: 1.35rem; margin: 8px 0; }
.detail .desc { white-space: pre-line; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 16px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--title); overflow-wrap: anywhere; }
.stock { font-weight: 600; font-size: .9rem; }
.stock.in { color: var(--ok); }
.stock.out { color: var(--muted); }

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  flex: none;
}
.cart-button { transition: transform .15s ease; }
.cart-button.pulse { transform: scale(1.12); }
.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  display: inline-grid;
  place-items: center;
  font-size: .8rem;
}

.card { position: relative; }
.card-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; flex: 1; }
.add {
  margin: 0 12px 12px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.add:hover { background: var(--brand-soft); }
.add[disabled] { border-color: var(--line); color: var(--muted); cursor: default; background: transparent; }

.buy { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--bg); color: var(--title); font-size: 1.1rem; cursor: pointer; }
.qty span { min-width: 36px; text-align: center; color: var(--title); font-weight: 600; }

.primary {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.primary:hover { background: var(--brand-dark); }
.primary[disabled] { opacity: .6; cursor: default; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.panel h1, .panel h2 { color: var(--title); margin: 0 0 12px; font-size: 1.25rem; }
.cart-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line .thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; font-size: 1.2rem; }
.cart-line .name { color: var(--title); font-weight: 600; overflow-wrap: anywhere; }
.cart-line .unit { color: var(--muted); font-size: .85rem; }
.cart-line .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.remove { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; padding: 0; text-decoration: underline; }
.cart-sum { display: flex; justify-content: space-between; color: var(--muted); padding: 2px 0; }
.cart-total { display: flex; justify-content: space-between; padding-top: 12px; color: var(--title); font-size: 1.1rem; }

.checkout label { display: block; margin: 12px 0 0; color: var(--title); font-weight: 600; font-size: .9rem; }
.checkout input, .checkout textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--title);
  font: inherit;
  font-weight: 400;
}
.checkout input:focus, .checkout textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.checkout .primary { width: 100%; margin-top: 16px; }
.optional { color: var(--muted); font-weight: 400; }
.pay-choice { border: 1px solid var(--line); border-radius: 10px; margin: 16px 0 0; padding: 8px 12px 12px; }
.pay-choice legend { color: var(--title); font-weight: 600; font-size: .9rem; padding: 0 4px; }
.checkout .radio { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 8px; flex-wrap: wrap; }
.checkout .radio input { width: auto; margin: 0; }
.tick.wait { background: var(--muted); }
.pickup-info { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--title); font-size: .9rem; white-space: pre-line; overflow-wrap: anywhere; }
.tick.fail { background: #c0392b; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }
.error { color: #c0392b; margin: 12px 0 0; }

.done { text-align: center; padding: 32px 16px; margin-top: 24px; }
.done .tick {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 1.8rem; display: grid; place-items: center;
}
.done p { margin: 6px 0; }
.done .primary { margin-top: 20px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

/* ---------------- layouts ----------------
   The template's layout adds one class to <body>. Catalogue is the base
   styles above; the others adjust how the product list is drawn. */

/* Menu: one column of dish rows, grouped under category headings. */
.layout-menu .grid { display: block; max-width: 820px; }
.menu-heading {
  color: var(--title);
  font-size: 1.15rem;
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand);
}
.menu-item {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.menu-info { display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; min-width: 0; flex: 1; }
.menu-name { color: var(--title); font-weight: 600; overflow-wrap: anywhere; }
.menu-desc {
  color: var(--muted);
  font-size: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-side { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }
.menu-side .thumb { width: 88px; height: 88px; border-radius: var(--radius); overflow: hidden; font-size: 1.4rem; }
.menu-side .add { margin: 0; min-width: 88px; }

/* Showcase: big photos, few per row, minimal text. */
.layout-showcase .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.layout-showcase .thumb { aspect-ratio: 3 / 4; font-size: 3rem; }
.layout-showcase .card { border: 0; background: transparent; }
.layout-showcase .card:hover { transform: none; box-shadow: none; }
.layout-showcase .card-body { padding: 10px 2px 4px; }
.layout-showcase .card-name { font-weight: 500; font-size: 1rem; }
.layout-showcase .add { margin: 0 2px 8px; }
.layout-showcase .thumb img { transition: transform .3s ease; }
.layout-showcase .card:hover .thumb img { transform: scale(1.04); }

/* Quick list: compact rows, search first, add straight from the list. */
.layout-quicklist .grid { display: block; }
.layout-quicklist .search { flex-basis: 100%; order: 3; }
.quick-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.quick-item:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.quick-link { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.quick-link .thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; font-size: 1rem; flex: none; }
.quick-text { display: flex; flex-direction: column; min-width: 0; }
.quick-name { color: var(--title); font-weight: 600; overflow-wrap: anywhere; }
.quick-meta { color: var(--muted); font-size: .8rem; }
.quick-item .add { margin: 0; white-space: nowrap; }

/* Phones: shop name and cart on one row, search full width below. */
@media (max-width: 600px) {
  .top-inner { gap: 10px 12px; }
  .brand { flex: 1 1 0; order: 1; }
  .cart-button { order: 2; }
  .search { order: 3; flex: 1 1 100%; }
}

/* ---------------- shared by the hand-designed websites ---------------- */

/* A product without a photo: a fitting picture on a soft tile. */
.thumb.art {
  background: radial-gradient(circle at 30% 25%, var(--surface) 0, var(--brand-soft) 70%);
  font-size: 3.2rem;
  line-height: 1;
}

.qty-control { display: flex; align-items: center; }
.qty-control .add { margin: 0; }

/* Rows of products that scroll sideways (deals, popular). */
.home-row { padding-top: 24px; }
.home-row-title { color: var(--title); font-size: 1.35rem; margin: 0 0 12px; }
.home-row-items {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 250px);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.home-row-items > * { scroll-snap-align: start; }

/* Phones: a bar at the bottom keeps the cart one tap away. */
.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.cart-bar-count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  display: inline-grid;
  place-items: center;
}
.cart-bar-label { flex: 1; }
@media (min-width: 900px) { .cart-bar { display: none !important; } }
body.designed { padding-bottom: 84px; }
@media (min-width: 900px) { body.designed { padding-bottom: 0; } }

/* A fuller footer for the designed websites. */
.foot-rich {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  text-align: left;
  padding-top: 8px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.foot-col { display: flex; flex-direction: column; gap: 4px; color: var(--body); }
.foot-col strong { color: var(--title); margin-bottom: 4px; }
.foot-name { font-size: 1.1rem; }
.foot-pre { white-space: pre-line; overflow-wrap: anywhere; }

/* Item notes in the cart (food layouts). */
/* Menu choices: sizes, add-ons, what to leave out. */
.options { margin: 16px 0 0; }
.option-group { margin-bottom: 14px; }
.option-title { color: var(--title); font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.option-required { margin-left: 8px; color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; }
.option-list { display: flex; flex-wrap: wrap; gap: 8px; }
.option {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--title);
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
}
.option[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.option-price { color: var(--muted); font-size: .82rem; }
.option[aria-pressed="true"] .option-price { color: var(--brand); }
.line-options { color: var(--brand); font-size: .82rem; }

.item-note {
  width: 100%;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--title);
  font: inherit;
  font-size: .85rem;
}
