/* Look and feel follows home-run.co: yellow announcement bar, white header with the logo, a green primary
   colour, light teal category tiles, and product cards with a "% OFF" badge and a green Add button. */
:root {
  --yellow: #efc41a; --yellow-deep: #f8c200;
  --green: #328616; --green-dark: #166534; --green-soft: #e8f4e3;
  --teal: #0d9488; --tile: #e5f3f3;
  --bg: #ffffff; --page: #fafafa; --surface: #ffffff;
  --text: #1a1a1a; --muted: #636366; --line: #e5e7eb; --line-soft: #f0f1f3;
  --bad: #c02929; --bad-bg: #fdeaea; --warn: #8a5a00; --warn-bg: #fff4d6; --ok: #166534; --ok-bg: #e8f4e3;
  --radius: 10px; --radius-lg: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font: 14px/1.5 Lato, Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green-dark); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 4px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 700; } h3 { font-size: 14px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* ---------------------------------------------------------------- header */
.announce { background: var(--yellow); color: #3a3000; text-align: center; font-weight: 700; font-size: 12px; letter-spacing: .02em; padding: 7px 12px; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-in { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 48px; width: 48px; object-fit: contain; display: block; }
.loc { display: flex; align-items: center; gap: 8px; flex: none; text-decoration: none !important; color: var(--text); }
.loc .mins { background: var(--green); color: #fff; border-radius: 8px; width: 38px; height: 38px; display: grid; place-items: center; line-height: 1; text-align: center; font-weight: 800; font-size: 13px; }
.loc .mins small { display: block; font-size: 9px; font-weight: 700; margin-top: 1px; }
.loc .where { font-size: 11px; color: var(--muted); line-height: 1.25; } .loc .where b { display: block; color: var(--text); font-size: 13px; }
.searchbar { flex: 1; position: relative; min-width: 0; }
.searchbar input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 11px 14px 11px 40px; font-size: 14px; }
.searchbar svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.hd-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.hd-link { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 600; background: none; border: 0; cursor: pointer; font-size: 14px; }
.hd-link:hover { background: var(--page); text-decoration: none; border: 0; }
.hd-link svg { width: 20px; height: 20px; }
.cartbadge { background: var(--green); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; font-weight: 800; line-height: 17px; min-width: 18px; text-align: center; }
.navrow { max-width: 1160px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; justify-content: center; }
.navrow a { padding: 9px 14px; color: #3c3c43; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.navrow a:hover { color: var(--green-dark); text-decoration: none; }
.navrow a.active { color: var(--green-dark); border-bottom-color: var(--green); }

main { max-width: 1160px; margin: 0 auto; padding: 22px 16px 70px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; text-align: center; padding: 18px 12px; }

/* ----------------------------------------------------------------- layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

/* ----------------------------------------------------------------- controls */
button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 8px 14px; font-weight: 700; display: inline-block; }
button:hover, .btn:hover { border-color: var(--green); text-decoration: none; }
button.primary, .btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
button.primary:hover, .btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
button.danger { color: var(--bad); } button.danger:hover { border-color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.small { padding: 4px 9px; font-size: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--green) 35%, transparent); border-color: var(--green); }
input[type=checkbox] { accent-color: var(--green); }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.field { min-width: 140px; flex: 1; }
.inline input { width: auto; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 7px 8px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .03em; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; } tr.click { cursor: pointer; } tr.click:hover td { background: var(--page); }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }

.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--page); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.info { background: #e3f1f1; color: #0b6e66; border-color: transparent; }

.alert { padding: 10px 13px; border-radius: 10px; margin: 8px 0; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad); } .alert.info { background: var(--tile); color: #0b4f4a; }

pre { background: var(--page); border: 1px solid var(--line); padding: 10px; border-radius: 9px; overflow: auto; max-height: 320px; font-size: 12px; margin: 6px 0 0; }
details > summary { cursor: pointer; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); }
.tabs button.active { color: var(--green-dark); border-bottom-color: var(--green); }
dialog { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgb(0 0 0 / .25); color: var(--text); background: var(--surface); }
dialog::backdrop { background: rgb(0 0 0 / .45); }

/* ------------------------------------------------------------ home banner */
.hero { background: linear-gradient(110deg, #fff 0%, #fff 48%, var(--green-soft) 100%); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 26px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero .serving { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green-dark); font-weight: 800; border-radius: 99px; padding: 4px 12px; font-size: 13px; margin-bottom: 10px; }
.hero h1 { font-size: 38px; max-width: 640px; } .hero h1 em { color: var(--green); font-style: normal; }
.hero p { font-size: 17px; color: #3c3c43; margin: 8px 0 16px; max-width: 560px; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; max-width: 640px; }
.feat div { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--yellow-deep); border-radius: 10px; padding: 10px 12px; font-weight: 700; }
.feat div span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.perks { background: #7c1d1d; color: #fff; border-radius: var(--radius); display: flex; justify-content: space-around; gap: 12px; padding: 10px 16px; margin-bottom: 18px; flex-wrap: wrap; font-size: 12px; }
.perks b { display: block; font-size: 13px; }

.sec-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.sec-title h2 { font-size: 21px; margin: 0; font-weight: 800; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; }
.cat { text-align: center; cursor: pointer; background: none; border: 0; padding: 0; font-weight: 600; color: var(--text); font-size: 12px; }
.cat:hover { border: 0; }
.cat .tile { background: var(--tile); border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; margin-bottom: 7px; border: 2px solid transparent; }
.cat .tile img { width: 100%; height: 100%; object-fit: contain; }
.cat .tile b { font-size: 30px; color: var(--teal); }
.cat.on .tile { border-color: var(--green); } .cat.on { color: var(--green-dark); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.chip { border-radius: 99px; padding: 5px 14px; font-weight: 700; font-size: 13px; background: var(--surface); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }

/* ----------------------------------------------------------- product card */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; position: relative; transition: box-shadow .15s, border-color .15s; }
.pcard:hover { box-shadow: 0 6px 22px rgb(0 0 0 / .08); border-color: #cfd3da; }
.pcard .off { position: absolute; top: 10px; left: 10px; background: var(--yellow); color: #3a3000; font-weight: 800; font-size: 11px; padding: 2px 8px; border-radius: 4px; z-index: 1; }
.pcard .img { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #fff; }
.pcard .img img { width: 100%; height: 100%; object-fit: contain; }
.pcard .img b { font-size: 44px; color: #c3c8d0; }
.pcard .tags { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.pcard .free { background: var(--green-dark); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; width: fit-content; }
.pcard .title { font-weight: 700; font-size: 14px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .brand { font-size: 12px; color: var(--muted); }
.pcard .prices { font-size: 17px; font-weight: 800; min-height: 26px; }
.pcard .prices s { color: var(--muted); font-weight: 400; font-size: 13px; margin-right: 6px; }
.pcard .prices .from { font-size: 11px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.pcard .add { background: var(--green); color: #fff; border: 0; border-radius: 9px; padding: 10px; font-weight: 800; width: 100%; margin-top: auto; }
.pcard .add:hover { background: var(--green-dark); }
.pcard .add:disabled { background: #d5d8de; }
.price { font-weight: 800; } .strike { text-decoration: line-through; color: var(--muted); font-weight: 400; margin-left: 6px; }

.steps { counter-reset: s; display: grid; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, #fff 40%, var(--green-soft)); }
.login .card { width: 100%; max-width: 380px; padding: 28px; text-align: center; box-shadow: 0 10px 40px rgb(0 0 0 / .08); }
.login .card form { text-align: left; }
.login img { width: 84px; height: 84px; object-fit: contain; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; max-width: 380px; }
.toast { background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 9px; box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--green-dark); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .header-in { flex-wrap: wrap; gap: 10px; } .searchbar { order: 5; flex-basis: 100%; }
  .hero { padding: 20px 16px; } .hero h1 { font-size: 27px; } .hide-sm { display: none; } main { padding: 14px 10px 60px; }
  .navrow { justify-content: flex-start; }
}
