/* Mifflin Mart customer site. Roadside price-sign look: condensed numbers, pine + highway yellow. */
:root {
  --pine: #0E4D3A;
  --pine-deep: #093527;
  --yellow: #FFC629;
  --yellow-deep: #E8AE00;
  --bg: #F3F6F4;
  --ink: #18211E;
  --muted: #5B6A64;
  --mint: #DCEFE6;
  --mint-2: #EDF7F2;
  --line: #D5E0DA;
  --card: #FFFFFF;
  --tomato: #D9432F;
  --tomato-soft: #FCEBE7;
  --cond: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
  --tabbar-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.45 var(--body); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pine); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow-deep); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-head { background: var(--pine); color: #fff; position: sticky; top: 0; z-index: 30; border-bottom: 4px solid var(--yellow); }
.head-inner { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.mark { flex: none; width: 40px; height: 40px; border-radius: 9px; background: var(--yellow); color: var(--pine-deep); font: 800 20px/40px var(--cond); text-align: center; letter-spacing: .02em; }
.wm-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.wm-text b { font: 700 25px/1 var(--cond); letter-spacing: .01em; }
.wm-text small { font-size: 13px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-nav { margin-left: auto; display: none; gap: 4px; }
.top-nav a { color: #fff; text-decoration: none; font: 600 19px/1 var(--cond); padding: 10px 14px; border-radius: 999px; display: flex; align-items: center; gap: 6px; }
.top-nav a:hover, .top-nav a.on { background: rgba(255,255,255,.14); }
.top-nav .top-cart { background: var(--yellow); color: var(--pine-deep); }
.top-nav .top-cart:hover, .top-nav .top-cart.on { background: #ffd457; }
@media (min-width: 760px) { .top-nav { display: flex; } }

/* ---------- ads ---------- */
.ads { max-width: 1120px; margin: 14px auto 0; padding: 0 16px; }
.ad-frame { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--mint); aspect-ratio: 3 / 1; }
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; display: block; }
.ad-slide.on { opacity: 1; z-index: 1; }
.ad-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-tag { position: absolute; left: 10px; top: 10px; z-index: 2; background: rgba(9,53,39,.78); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.ad-dots { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: flex; gap: 6px; }
.ad-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: rgba(255,255,255,.35); padding: 0; }
.ad-dots button.on { background: #fff; }
@media (prefers-reduced-motion: reduce) { .ad-slide { transition: none; } }

/* ---------- status strip ---------- */
.statusbar { max-width: 1120px; margin: 14px auto 0; padding: 0 16px; }
.status { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.status .dot { width: 12px; height: 12px; border-radius: 50%; background: #23A26D; flex: none; box-shadow: 0 0 0 4px #D3F1E3; }
.status.closed .dot { background: var(--yellow-deep); box-shadow: 0 0 0 4px #FFF0C2; }
.status.warn { border-color: #F2B8AD; background: var(--tomato-soft); }
.status.warn .dot { background: var(--tomato); box-shadow: 0 0 0 4px #F8D5CE; }
.status b { font: 700 20px/1.1 var(--cond); display: block; }
.status span { color: var(--muted); font-size: 15px; }
.status + .status { margin-top: 8px; }

main { max-width: 1120px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + 90px); outline: none; }
@media (min-width: 760px) { main { padding-bottom: 60px; } }

/* ---------- shop ---------- */
.search { position: relative; }
.search input { width: 100%; padding: 14px 16px 14px 46px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 17px; }
.search input:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px var(--mint); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 2; }

.cats { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; padding: 10px 6px; border-radius: var(--r-md); border: 1.5px solid transparent; background: var(--card); text-align: center; }
.cat .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--mint); display: flex; align-items: center; justify-content: center; font-size: 25px; line-height: 1; }
.cat span { font: 600 15px/1.1 var(--cond); color: var(--ink); }
.cat.on { border-color: var(--pine); background: var(--mint-2); }
.cat.on .ico { background: var(--pine); }

.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.sec-head h2 { font: 700 28px/1 var(--cond); margin: 0; letter-spacing: .005em; }
.sec-head .n { color: var(--muted); font-size: 15px; }
.badge21 { font: 700 14px/1 var(--cond); background: var(--ink); color: #fff; padding: 5px 8px; border-radius: 6px; margin-left: auto; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.prod { background: var(--card); border-radius: var(--r-md); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.prod .pic { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; }
.prod .pic img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--mint-2); padding: 12px; text-align: center; }
.ph .e { font-size: 52px; line-height: 1; opacity: .9; }
.ph .t { font: 600 15px/1.1 var(--cond); color: var(--pine); max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.prod .name { font-weight: 600; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.prod .low { font-size: 13px; font-weight: 700; color: #8A5A00; }
.prod .row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }

/* The price sign: big condensed dollars, raised cents */
.price { font: 700 30px/1 var(--cond); color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.price sup { font-size: .55em; vertical-align: .72em; margin-left: 1px; }
.price .cur { font-size: .6em; vertical-align: .55em; margin-right: 1px; }

.add { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--yellow); color: var(--pine-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.add svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 3; fill: none; }
.add:hover { background: #ffd457; }
.stepper { display: inline-flex; align-items: center; background: var(--pine); color: #fff; border-radius: 999px; height: 44px; flex: none; }
.stepper button { width: 38px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 22px; font-weight: 700; line-height: 1; }
.stepper span { min-width: 22px; text-align: center; font: 700 20px/1 var(--cond); }
.prod.out .pic { filter: grayscale(1); opacity: .55; }
.oos { font-size: 13px; color: var(--tomato); font-weight: 600; line-height: 1.3; }
.prod.out .row { display: block; }

/* ---------- panels: cart, sign-in, orders ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; max-width: 640px; margin: 0 auto 14px; }
.panel h1, .panel h2 { font: 700 30px/1.05 var(--cond); margin: 0 0 14px; }
.panel h3 { font: 700 22px/1.1 var(--cond); margin: 0 0 6px; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-of-type { border-bottom: 0; }
.line .thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--mint-2); flex: none; display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; }
.line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.line .n { flex: 1; font-weight: 600; font-size: 16px; line-height: 1.25; min-width: 0; }
.line .n small { display: block; color: var(--muted); font-weight: 400; }
.line .p { font: 700 22px/1 var(--cond); min-width: 62px; text-align: right; }
.line .stepper { height: 38px; }
.line .stepper button { width: 34px; height: 38px; }
.summary { margin-top: 10px; padding-top: 14px; border-top: 2px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.summary > span { font: 600 20px/1 var(--cond); }
.summary .price { font-size: 36px; }
.fine { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.note { background: #FFF6D6; border: 1px solid #F3DE94; border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; margin: 14px 0; }
.note.bad { background: var(--tomato-soft); border-color: #F2B8AD; color: #8E2414; }
.idnote { background: var(--ink); color: #fff; border-radius: var(--r-sm); padding: 14px; font-size: 15px; margin: 14px 0; }
.idnote b { font: 700 19px/1.2 var(--cond); display: block; margin-bottom: 4px; }
.idnote label { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; font-weight: 600; cursor: pointer; }
.idnote input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--yellow); }

.btn { border: 0; border-radius: 999px; padding: 12px 20px; font: 700 20px/1 var(--cond); letter-spacing: .01em; background: var(--pine); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; }
.btn:hover { background: var(--pine-deep); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.go { background: var(--yellow); color: var(--pine-deep); }
.btn.go:hover { background: #ffd457; }
.btn.full { width: 100%; min-height: 56px; font-size: 22px; }
.btn.light { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn.light:hover { border-color: var(--pine); }
.btn.danger { background: var(--card); color: var(--tomato); border: 1.5px solid #F0B5AA; }
.btn.danger:hover { background: var(--tomato-soft); }

label.f { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
input.t { width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 18px; background: #fff; }
input.t:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px var(--mint); }
input.code { font: 700 32px/1 var(--cond); letter-spacing: .35em; text-align: center; padding: 12px; }
.err { color: var(--tomato); font-weight: 600; font-size: 15px; margin-top: 10px; }
.signin-box { margin-top: 18px; padding-top: 18px; border-top: 2px dashed var(--line); }
.who { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; font-size: 15px; color: var(--muted); }
.who b { color: var(--ink); }

/* ---------- order tracker ---------- */
.ticket { text-align: center; }
.ticket .lbl { color: var(--muted); font-size: 15px; font-weight: 600; }
/* Order number as a price-board sign */
.sign { display: inline-block; background: var(--pine-deep); color: var(--yellow); font: 800 54px/1 var(--cond); letter-spacing: .08em; padding: 14px 22px 12px; border-radius: 12px; margin: 8px 0 4px; border: 4px solid #1E6B53; box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); }
@media (max-width: 380px) { .sign { font-size: 44px; padding: 12px 16px 10px; } }
.track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 20px 0 16px; text-align: center; }
.track div { font: 600 16px/1.1 var(--cond); color: var(--muted); }
.track div::before { content: ""; display: block; height: 8px; border-radius: 4px; background: var(--line); margin-bottom: 8px; }
.track div.on { color: var(--pine); }
.track div.on::before { background: var(--pine); }
.track div.now::before { background: var(--yellow); }
.eta { font-size: 17px; }
.eta b { display: block; font: 700 46px/1 var(--cond); margin-top: 4px; }
.flag { padding: 16px; border-radius: var(--r-sm); font: 700 24px/1.15 var(--cond); }
.flag.ready { background: var(--yellow); color: var(--pine-deep); }
.flag.done { background: var(--mint); color: var(--pine); }
.flag.cancel { background: var(--tomato-soft); color: #8E2414; font: 600 17px/1.35 var(--body); }
.ticket .items { text-align: left; margin-top: 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.actions .btn { flex: 1; min-width: 180px; }
.placed { background: var(--mint); border-color: #B9DCCB; }
.placed h2 { margin-bottom: 4px; }

/* ---------- empty, footer, toast, tab bar ---------- */
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty h2 { font: 700 28px/1.1 var(--cond); color: var(--ink); margin: 0 0 6px; }
.site-foot { max-width: 1120px; margin: 0 auto; padding: 10px 16px calc(var(--tabbar-h) + 40px); color: var(--muted); font-size: 14px; }
@media (min-width: 760px) { .site-foot { padding-bottom: 40px; } }
.site-foot h3 { font: 700 20px/1 var(--cond); color: var(--ink); margin: 0 0 8px; }
.site-foot .hours { margin: 0 0 12px; padding: 0; list-style: none; }
.site-foot .hours li { padding: 2px 0; }
.site-foot .hours b { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
@media (min-width: 760px) { .toast { bottom: 24px; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font: 600 14px/1 var(--cond); position: relative; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--pine); }
.tabbar a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--pine); }
@media (min-width: 760px) { .tabbar { display: none; } }
.count { background: var(--tomato); color: #fff; font: 700 13px/1 var(--body); min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.tabbar .count { position: absolute; top: 7px; left: calc(50% + 6px); }
.top-cart .count { background: var(--pine); }

/* Mobile cart summary bar above the tab bar */
.cartpeek { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 35; }
.cartpeek a { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--yellow); color: var(--pine-deep); text-decoration: none; border-radius: 14px; padding: 12px 16px; font: 700 20px/1 var(--cond); box-shadow: 0 8px 22px rgba(9,53,39,.25); max-width: 560px; margin: 0 auto; }
.cartpeek .price { font-size: 26px; color: var(--pine-deep); }
@media (min-width: 760px) { .cartpeek { display: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* On wide screens, keep the ad from pushing products below the fold */
@media (min-width: 760px) { .ad-frame { max-width: 780px; margin: 0 auto; } }
