/* ============ Fontovi (lokalno, rade i bez interneta) ============ */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/baloo-2-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/baloo-2-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/baloo-2-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/baloo-2-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito Variable'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(../fonts/nunito-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito Variable'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(../fonts/nunito-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --green: #009746;
  --green-d: #007a38;
  --green-dd: #005c2a;
  --green-l: #e5f5ec;
  --red: #e03131;
  --red-d: #c92a2a;
  --yellow: #ffd43b;
  --ink: #17251e;
  --muted: #627168;
  --bg: #f3f6f4;
  --card: #ffffff;
  --line: #e1e8e4;
  --top-h: 64px;
  --dept-h: 54px;
  --shadow: 0 18px 50px rgba(10, 30, 20, .22);
  --font: 'Nunito Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-d: 'Baloo 2', 'Nunito Variable', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #1e2b24;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
kbd {
  display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: 0 .45em;
  border-radius: 6px; background: #fff; color: var(--ink); font: 800 .78em/1 var(--font);
  box-shadow: 0 2px 0 #b9c4be, 0 0 0 1px #d6ddd9 inset;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: fixed; inset: 0; display: flex; flex-direction: column; height: 100dvh; }

/* ============ Zaglavlje ============ */
.topbar {
  height: var(--top-h); flex: 0 0 auto;
  display: flex; align-items: center; gap: 18px; padding: 0 18px;
  background: var(--green); color: #fff; position: relative; z-index: 40;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: 0 0 auto; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 13px; background: #fff; color: var(--green);
  display: grid; place-items: center; font: 800 34px/1 var(--font-d); padding-top: 4px;
  box-shadow: 0 3px 0 var(--green-dd);
  transform: rotate(-6deg);
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font: 800 30px/.9 var(--font-d); letter-spacing: -.5px; }
.logo-text small { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .88; margin-top: 2px; }

.search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.search input {
  width: 100%; height: 44px; border-radius: 999px; border: 0; padding: 0 18px 0 44px;
  font: 650 15px var(--font); background: #fff; color: var(--ink); outline: none;
  box-shadow: 0 2px 0 var(--green-dd);
}
.search input::placeholder { color: #8a978f; }
.search input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .45); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.search .ico { position: absolute; left: 15px; top: 12px; width: 20px; height: 20px; color: #7d8b83; pointer-events: none; }
.results {
  position: absolute; top: 52px; left: 0; right: 0; z-index: 50;
  background: #fff; color: var(--ink); border-radius: 16px; box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 460px); overflow: auto;
}
.results li > button {
  display: flex; gap: 12px; align-items: center; width: 100%; padding: 7px 10px; border: 0; background: none;
  border-radius: 11px; cursor: pointer; text-align: left;
}
.results li > button[aria-selected="true"], .results li > button:hover { background: var(--green-l); }
.results .r-art { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; }
.results .r-art svg { max-width: 40px; max-height: 40px; width: auto; height: auto; }
.results .r-name { font-weight: 800; font-size: 14px; }
.results .r-sub { font-size: 12px; color: var(--muted); font-weight: 650; }
.results .r-price { margin-left: auto; font-weight: 900; white-space: nowrap; }
.results .r-price.akc { color: var(--red); }
.results .empty { padding: 14px; color: var(--muted); font-weight: 700; text-align: center; }

.cart-btn {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink);
  border: 0; border-radius: 999px; height: 46px; padding: 0 18px 0 12px; font: 850 15px var(--font);
  cursor: pointer; position: relative; box-shadow: 0 2px 0 var(--green-dd); transition: transform .15s;
}
.cart-btn:hover { transform: translateY(-1px); }
.cart-btn .ico { width: 26px; height: 26px; color: var(--green); }
.cart-btn .badge {
  position: absolute; top: -5px; left: 26px; background: var(--red); color: #fff; font-size: 12px; font-weight: 900;
  min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid var(--green);
}
.cart-btn .badge[data-n="0"] { background: #8fa197; }
.cart-btn.bump { animation: bump .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ============ Odjeli ============ */
.deptbar {
  height: var(--dept-h); flex: 0 0 auto; background: #fff; display: flex; align-items: center; gap: 6px;
  padding: 0 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; position: relative; z-index: 30;
  border-bottom: 1px solid var(--line);
}
.deptbar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 4px;
  border-radius: 999px; border: 2px solid transparent; background: var(--bg);
  font: 800 13.5px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s, border-color .2s;
}
.chip .ic { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.chip .ic svg { max-width: 24px; max-height: 24px; width: auto; height: auto; }
.chip:hover { border-color: var(--dc); }
.chip.active { background: var(--dc); color: #fff; }
.chip.kasa-chip { --dc: var(--green); }
.chip.kasa-chip .ic { color: var(--green); }
.track { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: 0 50%; background: linear-gradient(90deg, var(--green), #51cf66); transform: scaleX(0); pointer-events: none; }

/* ============ Scena (prodavnica) ============ */
.scene {
  position: relative; flex: 1 1 auto; overflow: hidden; background: #e8ebe9;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: none;
}
.scene.dragging { cursor: grabbing; }
.stage { position: absolute; left: 0; top: 0; height: 640px; transform-origin: 0 0; }
.world { position: absolute; left: 0; top: 0; height: 640px; will-change: transform; }

.ceiling {
  position: absolute; left: 0; top: 0; width: 100%; height: 112px; overflow: hidden;
  background: linear-gradient(#c8cfcb 0%, #e3e8e5 55%, #f1f3f2 100%);
}
.lights { position: absolute; left: 0; height: 9px; width: calc(100% + 400px); will-change: transform; border-radius: 6px; }
.lights.l1 { top: 10px; background: repeating-linear-gradient(90deg, transparent 0 70px, #fffef6 70px 330px, transparent 330px 400px); filter: drop-shadow(0 0 8px rgba(255, 252, 230, .95)); }
.lights.l2 { top: 50px; height: 5px; width: calc(100% + 300px); background: repeating-linear-gradient(90deg, transparent 0 50px, #fffef6 50px 250px, transparent 250px 300px); opacity: .85; filter: drop-shadow(0 0 6px rgba(255, 252, 230, .9)); }

.floor { position: absolute; left: 0; top: 492px; width: 100%; height: 148px; overflow: hidden; background: linear-gradient(#b9c1bd 0%, #d9dfdb 18%, #e8ece9 60%, #dde2df 100%); }
.floor svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.floor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, 0) 100%); pointer-events: none; }

.vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(0, 20, 10, .28); z-index: 6; }

/* ---------- sekcije ---------- */
.sec { position: absolute; top: 0; height: 640px; }
.refl { position: absolute; left: 0; right: 0; top: 492px; height: 44px; background: linear-gradient(var(--dc), transparent); opacity: .16; pointer-events: none; }

.hsign {
  position: absolute; top: 16px; height: 56px; padding: 0 22px 0 8px; display: flex; align-items: center; gap: 10px;
  background: var(--dc); color: #fff; border-radius: 14px; font: 800 26px/1 var(--font-d); white-space: nowrap;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .14), 0 12px 24px rgba(0, 0, 0, .12); transform: translateX(-50%);
  letter-spacing: .01em; z-index: 2;
}
.hsign::before, .hsign::after { content: ''; position: absolute; top: -16px; width: 2px; height: 16px; background: #8f9a94; }
.hsign::before { left: 26px; } .hsign::after { right: 26px; }
.hsign .ic { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; }
.hsign .ic svg { max-width: 34px; max-height: 34px; width: auto; height: auto; }
.hsign small { display: block; font: 800 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-bottom: 3px; }

/* police */
.unit { position: absolute; top: 100px; height: 392px; left: 0; right: 0; background: linear-gradient(#edf1f2, #e0e6e8); border-radius: 6px 6px 0 0; box-shadow: inset 0 0 0 5px #cfd8dc, 0 -2px 0 #b8c3c8; }
.unit::before { content: ''; position: absolute; inset: 24px 5px 10px; background-image: radial-gradient(circle, rgba(0, 0, 0, .07) 1.2px, transparent 1.6px); background-size: 12px 12px; pointer-events: none; }
.unit-head {
  position: absolute; left: 0; right: 0; top: 0; height: 24px; background: var(--dc); color: #fff; border-radius: 6px 6px 0 0;
  font: 800 13px/25px var(--font-d); display: flex; justify-content: space-around; letter-spacing: .14em; text-transform: uppercase; overflow: hidden; white-space: nowrap;
}
.kick { position: absolute; left: 0; right: 0; top: 482px; height: 10px; background: var(--dc); filter: brightness(.85); }
.board { position: absolute; left: 5px; right: 5px; height: 13px; background: linear-gradient(#fbfcfc, #dfe5e8); border-top: 2px solid #fff; box-shadow: 0 3px 4px rgba(0, 0, 0, .14); }
.post { position: absolute; top: 100px; width: 8px; height: 392px; background: linear-gradient(90deg, #b8c3c8, #e9eef0, #b8c3c8); }

/* hladnjaci */
.unit.fridge { background: linear-gradient(#e6f4fc, #d3e8f4); box-shadow: inset 0 0 0 6px #b9c8d0, 0 -2px 0 #9fb1ba; }
.unit.fridge::before { background-image: none; background: linear-gradient(rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 30px); inset: 24px 6px auto; height: 30px; }
.unit.fridge .board { background: linear-gradient(#f4f9fc, #d4e3ec); }
.glass { position: absolute; top: 124px; height: 358px; pointer-events: none; border-left: 4px solid #c3d0d7; border-right: 4px solid #c3d0d7;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, .34) 30%, rgba(255, 255, 255, .08) 36%, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, .18) 70%, rgba(255, 255, 255, 0) 76%), rgba(210, 235, 250, .10);
}
.glass::after { content: ''; position: absolute; top: 150px; width: 5px; height: 70px; border-radius: 3px; background: linear-gradient(90deg, #9aa9b1, #e9eef1, #9aa9b1); right: 8px; }
.glass.left::after { right: auto; left: 8px; }
.cold { position: absolute; top: 103px; height: 4px; left: 12px; right: 12px; background: #fff; border-radius: 2px; box-shadow: 0 0 12px 3px rgba(180, 225, 255, .9); }

/* štand za voće */
.unit.stand { background: linear-gradient(#a8784b, #8c5f37); box-shadow: inset 0 0 0 5px #7a5230, 0 -2px 0 #6a4628; }
.unit.stand::before { background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 46px); background-size: auto; }
.chalk-head { position: absolute; top: 128px; left: 50%; transform: translateX(-50%); background: #2d3a33; border: 5px solid #b5874f; border-radius: 6px; color: #fff; padding: 3px 22px; font: 800 17px/1.2 var(--font-d); white-space: nowrap; box-shadow: 0 4px 8px rgba(0, 0, 0, .25); }
.chalk-head span { color: #ffe066; }
.tier { position: absolute; height: 14px; background: linear-gradient(#c99560, #9b6a3d); box-shadow: 0 4px 6px rgba(0, 0, 0, .25); left: 5px; right: 5px; }
.crate { position: absolute; height: 30px; background: repeating-linear-gradient(#d8a56b 0 8px, #b98450 8px 10px); border-radius: 2px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 2px 3px rgba(0, 0, 0, .25); }
.crate::before, .crate::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5px; background: #a8743f; }
.crate::before { left: 0; } .crate::after { right: 0; }

/* pekara */
.unit.bakery { background: linear-gradient(#b5643b, #9c5332); box-shadow: inset 0 0 0 6px #6d4a2e, 0 -2px 0 #5b3d25; }
.unit.bakery::before { background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 28px 14px; }
.unit.bakery .board { background: linear-gradient(#d9a46c, #b07a46); border-top-color: #ecc28f; }
.basket { position: absolute; height: 24px; border-radius: 4px 4px 12px 12px; background: repeating-linear-gradient(45deg, #c4914f 0 4px, #a8763c 4px 8px); box-shadow: inset 0 3px 0 #dcae6f, 0 3px 4px rgba(0, 0, 0, .3); }

/* ---------- artikli na rafu ---------- */
.pg {
  position: absolute; display: flex; align-items: flex-end; justify-content: center; gap: 1px; cursor: pointer;
  transform-origin: 50% 100%; transition: transform .18s cubic-bezier(.3, 1.4, .5, 1); outline: none; z-index: 1;
}
.pg::before { content: ''; position: absolute; left: 2px; right: 2px; bottom: -3px; height: 6px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .28), transparent 70%); }
.pg svg { display: block; position: relative; overflow: visible; }
.pg.pile { display: block; }
.pg.pile > svg { position: absolute; left: 0; bottom: 0; }
.pg.pile .tag { z-index: 3; }
.pg:hover, .pg:focus-visible { transform: translateY(-4px) scale(1.06); z-index: 4; }
.pg:focus-visible { filter: drop-shadow(0 0 3px var(--green)); }
.pg.flash { animation: flash 1.6s ease-out; z-index: 4; }
@keyframes flash { 0%, 30%, 60% { filter: drop-shadow(0 0 0 rgba(0, 151, 70, 0)); transform: scale(1); } 15%, 45% { filter: drop-shadow(0 0 6px #00c45a); transform: translateY(-5px) scale(1.12); } 100% { filter: none; transform: none; } }
.tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translate(-50%, 4px); background: #17251e; color: #fff;
  font: 750 10px/1.25 var(--font); padding: 5px 8px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .15s; text-align: center; z-index: 5;
}
.tip b { display: block; font-size: 11px; color: #b2f2bb; }
.tip s { opacity: .6; margin-right: 3px; }
.tip::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: #17251e; }
.pg:hover .tip, .pg:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.qa {
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; background: var(--green);
  color: #fff; font: 900 15px/1 var(--font); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: scale(.6);
  transition: opacity .15s, transform .15s; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); padding: 0 0 1px; z-index: 6;
}
.pg:hover .qa, .pg:focus-within .qa { opacity: 1; transform: scale(1); }
.qa:hover { background: var(--green-d); }

.tag {
  position: absolute; height: 12px; display: flex; align-items: center; justify-content: center; gap: 1.5px; padding: 0 3px;
  background: #fff; color: #111; border-radius: 2px; box-shadow: 0 0 0 .6px rgba(0, 0, 0, .25), 0 1px 1px rgba(0, 0, 0, .1);
  font: 900 9px/12px var(--font); white-space: nowrap; cursor: pointer; z-index: 2; transform: translateX(-50%);
}
.tag small { font-size: 6px; font-weight: 800; }
.tag::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2.5px; background: var(--green); border-radius: 2px 0 0 2px; }
.tag.akc { background: var(--yellow); color: var(--red-d); }
.tag.akc::before { background: var(--red); }
.tag.akc::after { content: '%'; position: absolute; top: -6px; right: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); color: #fff; font: 900 6.5px/10px var(--font); text-align: center; }
.tag.chalk { background: #2d3a33; color: #fff; height: 15px; font-size: 10px; line-height: 15px; border-radius: 3px; box-shadow: 0 0 0 1.5px #b5874f, 0 2px 3px rgba(0, 0, 0, .3); padding: 0 5px; }
.tag.chalk::before { display: none; }
.tag.chalk.akc { color: #ffe066; }
.tag.chalk small { opacity: .85; }

/* ---------- ulaz ---------- */
.entrance .wall { position: absolute; left: 0; right: 0; top: 100px; height: 392px; background: linear-gradient(#f4f1ea, #e7e2d6); box-shadow: inset 0 6px 0 var(--green); }
.storefront { position: absolute; left: 40px; top: 130px; width: 360px; height: 362px; border: 10px solid var(--green); border-bottom: 0; border-radius: 8px 8px 0 0; overflow: hidden; background: #9ad0f5; }
.outside { position: absolute; inset: 0; background: linear-gradient(#7cc4f2 0%, #bfe3f8 55%, #e8f5fb 70%); }
.outside .sun { position: absolute; right: 40px; top: 26px; width: 46px; height: 46px; border-radius: 50%; background: #fff3bf; box-shadow: 0 0 30px 10px rgba(255, 243, 191, .8); }
.outside .hills { position: absolute; left: -40px; right: -40px; top: 150px; height: 120px; background: radial-gradient(ellipse 160px 70px at 30% 100%, #69b56a 98%, transparent 100%), radial-gradient(ellipse 200px 90px at 80% 100%, #5aa65c 98%, transparent 100%); }
.outside .trees { position: absolute; left: 0; right: 0; top: 188px; height: 60px; background: radial-gradient(circle 18px at 30px 30px, #2f7d3a 97%, transparent 100%), radial-gradient(circle 24px at 90px 26px, #3b8c45 97%, transparent 100%), radial-gradient(circle 16px at 250px 34px, #2f7d3a 97%, transparent 100%), radial-gradient(circle 22px at 300px 28px, #3b8c45 97%, transparent 100%); }
.outside .lot { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: repeating-linear-gradient(90deg, #8d969b 0 54px, #f8f9fa 54px 57px), #8d969b; }
.door { position: absolute; top: 0; bottom: 0; width: 170px; background: linear-gradient(115deg, rgba(255, 255, 255, .05) 20%, rgba(255, 255, 255, .45) 30%, rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, 0) 60%), rgba(220, 240, 255, .25); border: 6px solid #cfd8dc; transition: transform 1.1s cubic-bezier(.5, 0, .2, 1); }
.door::after { content: ''; position: absolute; top: 150px; width: 6px; height: 70px; background: #9aa9b1; border-radius: 3px; }
.door-l { left: 0; } .door-l::after { right: 8px; }
.door-r { right: 0; } .door-r::after { left: 8px; }
.entrance.open .door-l { transform: translateX(-150px); }
.entrance.open .door-r { transform: translateX(150px); }
.ulaz-sign { position: absolute; left: 160px; top: 106px; width: 120px; height: 30px; background: #fff; color: var(--green); border-radius: 8px; text-align: center; font: 800 22px/32px var(--font-d); letter-spacing: .18em; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); z-index: 2; }
.parked { position: absolute; left: 10px; top: 420px; width: 200px; height: 80px; }
.parked svg { position: absolute; bottom: 0; width: 120px; height: 90px; }

.welcome {
  position: absolute; left: 440px; top: 150px; width: 270px; height: 300px; background: #fff; border-radius: 18px; padding: 22px 20px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .06), 0 16px 30px rgba(0, 0, 0, .12); text-align: center; border-top: 10px solid var(--green);
}
.welcome::after { content: ''; position: absolute; left: 50%; top: 100%; width: 10px; height: 44px; margin-left: -5px; background: linear-gradient(90deg, #9aa4a0, #dfe4e1, #9aa4a0); }
.welcome .w-logo { display: inline-flex; align-items: center; gap: 8px; font: 800 38px/1 var(--font-d); color: var(--green); }
.welcome .w-logo i { font-style: normal; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 32px; padding-top: 4px; transform: rotate(-6deg); }
.welcome h2 { font: 800 30px/1 var(--font-d); margin: 12px 0 6px; }
.welcome p { margin: 0 0 12px; font: 700 14px/1.35 var(--font); color: var(--muted); }
.welcome .keys { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; font: 800 13px var(--font); color: var(--ink); margin-bottom: 10px; }
.welcome .w-arrow { margin-top: 8px; font: 800 18px var(--font-d); color: var(--green); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(10px); } }

.deals { position: absolute; left: 760px; top: 100px; width: 300px; height: 392px; }
.deals .unit { top: 0; box-shadow: inset 0 0 0 5px #f7c600, 0 -2px 0 #e0b400; background: linear-gradient(#fff9db, #fff3bf); }
.deals .unit-head { background: var(--red); }
.deals-burst { position: absolute; left: 50%; top: 32px; transform: translateX(-50%) rotate(-4deg); background: var(--red); color: #fff; font: 800 30px/1 var(--font-d); padding: 10px 22px 6px; border-radius: 12px; box-shadow: 0 5px 0 #a51d1d; white-space: nowrap; z-index: 3; }
.deals-burst small { display: block; font: 800 11px var(--font); letter-spacing: .16em; text-align: center; color: #ffe066; }

/* ---------- kasa ---------- */
.kasa .wall { position: absolute; left: 0; right: 0; top: 100px; height: 392px; background: linear-gradient(#f4f1ea, #e7e2d6); box-shadow: inset 0 6px 0 var(--green); }
.counter { position: absolute; top: 386px; height: 106px; background: linear-gradient(#4a5550, #343d39); border-radius: 8px 8px 0 0; box-shadow: inset 0 -12px 0 var(--green), 0 -2px 0 #2a312e; }
.counter::before { content: ''; position: absolute; left: 10px; right: 70px; top: -12px; height: 14px; border-radius: 7px; background: repeating-linear-gradient(90deg, #222 0 14px, #2d2d2d 14px 28px); animation: belt 1.2s linear infinite paused; }
.kasa.live .counter.open::before { animation-play-state: running; }
@keyframes belt { to { background-position: -28px 0; } }
.counter .scan { position: absolute; right: 18px; top: -16px; width: 44px; height: 18px; border-radius: 4px; background: linear-gradient(#2a3a46, #18232b); box-shadow: inset 0 0 6px #e03131; }
.register { position: absolute; width: 104px; height: 64px; top: 292px; background: #2b3330; border-radius: 8px; padding: 6px; box-shadow: 0 4px 0 #1b211f; }
.register .scr { background: #0f2b1b; color: #69db7c; height: 100%; border-radius: 4px; font: 800 10px/1.2 ui-monospace, Consolas, monospace; padding: 5px 6px; display: flex; flex-direction: column; justify-content: space-between; }
.register .scr b { font-size: 15px; text-align: right; }
.register::after { content: ''; position: absolute; left: 44px; top: 100%; width: 14px; height: 30px; background: #3d4643; }
.lane { position: absolute; top: 130px; width: 62px; height: 62px; border-radius: 50%; background: var(--green); color: #fff; font: 800 38px/66px var(--font-d); text-align: center; box-shadow: 0 0 0 5px #fff, 0 0 24px rgba(0, 151, 70, .6); }
.lane::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -4px; width: 8px; height: 194px; background: linear-gradient(90deg, #8f9a94, #d9dfdb, #8f9a94); }
.lane.off { background: #adb5bd; box-shadow: 0 0 0 5px #fff; }
.closed { position: absolute; top: 330px; background: #fff; color: var(--red); border: 3px solid var(--red); border-radius: 8px; font: 800 15px/1 var(--font-d); padding: 7px 10px 4px; transform: rotate(-3deg); }
.rack { position: absolute; top: 260px; width: 140px; height: 232px; background: linear-gradient(#eef1f3, #dfe5e8); border-radius: 6px 6px 0 0; box-shadow: inset 0 0 0 4px #b8c3c8; }
.rack .unit-head { background: var(--green); font-size: 11px; }
.exit { position: absolute; top: 170px; width: 150px; height: 322px; background: linear-gradient(#7cc4f2, #d8eefa); border: 8px solid #cfd8dc; border-bottom: 0; }
.exit-sign { position: absolute; top: 120px; width: 150px; height: 34px; background: var(--green); color: #fff; font: 800 20px/36px var(--font-d); text-align: center; letter-spacing: .15em; border-radius: 6px; }
.kasa-floor { position: absolute; top: 500px; height: 10px; border-radius: 5px; background: repeating-linear-gradient(90deg, #ffd43b 0 30px, #2b2b2b 30px 60px); opacity: .7; }

/* ============ Kolica ============ */
.cart { position: absolute; left: 0; top: 474px; width: 210px; height: 160px; z-index: 5; transform-origin: 105px 160px; will-change: transform; cursor: pointer; }
.cart-body { position: absolute; inset: 0; transform-origin: 105px 150px; }
.cart-flip { position: absolute; inset: 0; transition: transform .3s cubic-bezier(.5, 0, .3, 1); }
.cart.flip .cart-flip { transform: scaleX(-1); }
.cart svg.cs { position: absolute; left: 0; top: 0; width: 210px; height: 160px; overflow: visible; }
.cart-shadow { position: absolute; left: 20px; right: 10px; bottom: 2px; height: 12px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .35), transparent 70%); }
.cart-items { position: absolute; left: 30px; top: -24px; width: 174px; height: 130px; clip-path: polygon(0 0, 100% 0, 100% 46.2%, 92% 100%, 9.2% 100%, 0 46.2%); }
.cart-items .ci { position: absolute; bottom: 0; transform-origin: 50% 100%; animation: drop .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.cart-items .ci svg { display: block; width: 100%; height: 100%; }
.cart.flip .cart-items .ci svg { transform: scaleX(-1); }
@keyframes drop { from { transform: translateY(-50px) rotate(var(--r, 0deg)); opacity: 0; } to { transform: translateY(0) rotate(var(--r, 0deg)); opacity: 1; } }
.cart-plate { position: absolute; left: 146px; top: 41px; width: 53px; height: 25px; color: #fff; font: 800 17px/27px var(--font-d); text-align: center; pointer-events: none; }
.cart.flip .cart-plate { transform: scaleX(-1); }
.cart-count { position: absolute; left: 172px; top: 4px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 15px; background: var(--red); color: #fff; font: 900 15px/30px var(--font); text-align: center; border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); z-index: 3; transition: transform .2s; }
.cart.flip .cart-count { transform: scaleX(-1); }
.cart-count[data-n="0"] { display: none; }
.cart.bump .cart-body { animation: cartbump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cartbump { 30% { transform: translateY(5px) scaleY(.96); } 100% { transform: none; } }
.speedlines { position: absolute; right: 100%; top: 40px; width: 80px; height: 80px; opacity: 0; background: repeating-linear-gradient(transparent 0 10px, rgba(255, 255, 255, .9) 10px 12px, transparent 12px 22px); mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }

.cart-cta {
  position: absolute; left: 50%; bottom: calc(100% + 18px); transform: translate(-50%, 10px) scale(.9); opacity: 0; pointer-events: none;
  background: var(--green); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px 9px; font: 800 18px/1 var(--font-d); white-space: nowrap;
  box-shadow: 0 5px 0 var(--green-dd), 0 10px 20px rgba(0, 0, 0, .25); transition: .25s cubic-bezier(.3, 1.5, .5, 1); cursor: pointer;
}
.cart-cta::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--green); }
.cart-cta.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; animation: pulse 1.6s ease-in-out infinite .3s; }
@keyframes pulse { 50% { transform: translate(-50%, -4px) scale(1.04); } }

/* ============ HUD ============ */
.hud { position: absolute; inset: auto 0 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; pointer-events: none; z-index: 10; }
.hud > * { pointer-events: auto; }
.hud-left { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.hud-btn { border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); border-radius: 999px; padding: 10px 16px; font: 850 14px var(--font); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); display: flex; align-items: center; gap: 8px; }
.hud-btn:hover { background: #fff; }
.hud-btn svg { width: 18px; height: 18px; color: var(--green); }
.speedo { background: rgba(23, 37, 30, .82); color: #fff; border-radius: 12px; padding: 6px 12px; font: 800 12px var(--font); }
.speedo b { font: 800 20px/1 var(--font-d); margin-right: 3px; color: #b2f2bb; }
.hint { position: absolute; z-index: 10; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(23, 37, 30, .82); color: #fff; padding: 9px 14px; border-radius: 999px; font: 750 13px var(--font); display: flex; gap: 6px; align-items: center; transition: opacity .6s; white-space: nowrap; pointer-events: none; }
.driven .hint { opacity: 0; }
.pedals { display: flex; gap: 10px; }
.pedal { width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--green); font-size: 24px; cursor: pointer; box-shadow: 0 5px 0 rgba(0, 0, 0, .18), 0 8px 20px rgba(0, 0, 0, .18); display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s; }
.pedal svg { width: 28px; height: 28px; }
.pedal.on, .pedal:active { transform: translateY(3px); background: var(--green); color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }

/* ============ Overlay / modali ============ */
.backdrop { position: fixed; inset: 0; background: rgba(10, 25, 18, .5); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 60; backdrop-filter: blur(2px); }
.backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; left: 50%; top: 50%; z-index: 70; width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto;
  background: #fff; border-radius: 24px; box-shadow: var(--shadow); transform: translate(-50%, -46%) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .28s cubic-bezier(.3, 1.3, .5, 1), opacity .2s;
}
.modal.show { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.x { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; display: grid; place-items: center; }
.x:hover { background: #e6ebe8; }

.pm { display: grid; grid-template-columns: 1fr 1.1fr; }
.pm-art { position: relative; background: radial-gradient(circle at 50% 60%, #fff 0, #eef3f0 70%); display: grid; place-items: center; padding: 36px 24px; min-height: 340px; border-radius: 24px 0 0 24px; }
.pm-art svg { width: 100%; height: auto; max-height: 280px; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .18)); }
.pm-art .akc-badge { position: absolute; left: 18px; top: 18px; }
.akc-badge { background: var(--red); color: #fff; font: 800 14px/1 var(--font-d); padding: 7px 10px 4px; border-radius: 8px; transform: rotate(-4deg); display: inline-block; }
.pm-info { padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 10px; }
.pm-dept { font: 800 12px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--dc, var(--green)); display: flex; align-items: center; gap: 6px; }
.pm-dept::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pm-info h2 { font: 800 30px/1.05 var(--font-d); margin: 0; padding-right: 30px; }
.pm-size { color: var(--muted); font-weight: 750; font-size: 14px; }
.pm-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.pm-price .now { font: 800 40px/1 var(--font-d); }
.pm-price .now.akc { color: var(--red); }
.pm-price s { color: var(--muted); font-weight: 800; font-size: 18px; }
.pm-price .save { background: #fff3bf; color: #a61e1e; font-weight: 900; font-size: 12px; border-radius: 6px; padding: 3px 7px; }
.pm-unit { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: -6px; }
.pm-desc { font-size: 15px; line-height: 1.5; color: #34443b; margin: 4px 0 6px; }
.pm-buy { display: flex; gap: 10px; margin-top: auto; }
.qty { display: flex; align-items: center; background: var(--bg); border-radius: 999px; padding: 4px; }
.qty button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font: 900 20px/1 var(--font); cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.qty button:hover { background: var(--green-l); }
.qty output { min-width: 40px; text-align: center; font: 900 17px var(--font); }
.btn { border: 0; border-radius: 999px; padding: 0 22px; height: 48px; font: 850 16px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-dd); }
.pm-buy .btn { flex: 1; }
.btn.primary:hover { background: var(--green-d); }
.btn.primary:disabled { background: #a9b8b0; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: var(--bg); color: var(--ink); }
.btn.ghost:hover { background: #e6ebe8; }
.btn svg { width: 20px; height: 20px; }
.pm-similar { grid-column: 1 / -1; padding: 18px 26px 24px; border-top: 1px solid var(--line); }
.pm-similar h3 { margin: 0 0 12px; font: 800 18px var(--font-d); }
.sim-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sim { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: border-color .15s, transform .15s; }
.sim:hover { border-color: var(--green); transform: translateY(-2px); }
.sim .sa { height: 62px; display: grid; place-items: center; }
.sim .sa svg { max-height: 62px; max-width: 80px; width: auto; height: auto; }
.sim .sn { font-weight: 800; font-size: 12.5px; line-height: 1.2; }
.sim .sp { font-weight: 900; font-size: 13px; }
.sim .sp.akc { color: var(--red); }

/* ---------- korpa (drawer) ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: #fff; z-index: 70; display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .32s cubic-bezier(.4, 0, .2, 1); box-shadow: -20px 0 50px rgba(0, 0, 0, .18);
}
.drawer.show { transform: none; }
.drawer-head { padding: 20px 22px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-head h2 { margin: 0; font: 800 26px/1 var(--font-d); }
.drawer-head .n { background: var(--green-l); color: var(--green-d); font-weight: 900; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.drawer-head .x { top: 50%; transform: translateY(-50%); }
.drawer-body { flex: 1; overflow: auto; padding: 8px 14px; }
.ci-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.ci-row .a { width: 58px; height: 58px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; cursor: pointer; }
.ci-row .a svg { max-width: 46px; max-height: 46px; width: auto; height: auto; }
.ci-row .nm { font-weight: 850; font-size: 14px; line-height: 1.2; cursor: pointer; }
.ci-row .sz { font-size: 12px; color: var(--muted); font-weight: 700; }
.ci-row .up { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.ci-row .r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ci-row .lt { font-weight: 900; font-size: 15px; }
.ci-row .qty { padding: 2px; }
.ci-row .qty button { width: 28px; height: 28px; font-size: 16px; }
.ci-row .qty output { min-width: 28px; font-size: 14px; }
.empty-cart { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-cart svg { width: 150px; height: auto; opacity: .9; }
.empty-cart h3 { color: var(--ink); font: 800 22px var(--font-d); margin: 10px 0 4px; }
.drawer-foot .btn { flex: none; }
.drawer-foot { padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; background: #fbfcfb; }
.free { font-size: 13px; font-weight: 750; color: var(--muted); }
.free .bar { height: 7px; border-radius: 4px; background: #e3e9e5; margin-top: 6px; overflow: hidden; }
.free .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #51cf66); border-radius: 4px; transition: width .4s; }
.free b { color: var(--green-d); }
.sum-row { display: flex; justify-content: space-between; font-weight: 750; font-size: 14px; }
.sum-row.total { font-size: 18px; font-weight: 900; margin: 2px 0 6px; }
.sum-row.save { color: var(--red); }

/* ---------- lista artikala ---------- */
.catalog { width: min(1000px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 40px)); display: flex; flex-direction: column; overflow: hidden; }
.cat-head { padding: 22px 26px 0; }
.cat-head h2 { margin: 0 0 12px; font: 800 28px/1 var(--font-d); }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: thin; }
.cat-tabs .chip { height: 34px; }
.cat-grid { flex: 1; overflow: auto; padding: 4px 26px 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start; }
.card { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; text-align: left; }
.card:hover { border-color: var(--green); box-shadow: 0 8px 20px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.card .ca { height: 100px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #fff, #f1f5f3 75%); border-radius: 12px; }
.card .ca svg { max-height: 84px; max-width: 120px; width: auto; height: auto; }
.card .cn { font-weight: 850; font-size: 14px; line-height: 1.2; }
.card .cz { font-size: 12px; color: var(--muted); font-weight: 700; }
.card .cb { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card .cp { font: 800 20px/1 var(--font-d); }
.card .cp.akc { color: var(--red); }
.card .cp s { font: 700 12px var(--font); color: var(--muted); margin-left: 4px; }
.card .add { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font: 900 22px/1 var(--font); cursor: pointer; box-shadow: 0 2px 0 var(--green-dd); }
.card .add:hover { background: var(--green-d); }
.card .akc-badge { position: absolute; top: 10px; left: 10px; font-size: 11px; z-index: 1; }

/* ---------- kasa / narudžba ---------- */
#checkout { width: fit-content; }
.checkout { width: min(620px, calc(100vw - 32px)); padding: 28px 28px 24px; }
.checkout h2 { margin: 0 0 4px; font: 800 30px/1 var(--font-d); }
.checkout .lead { margin: 0 0 18px; color: var(--muted); font-weight: 700; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label, .field .lbl { font-size: 12.5px; font-weight: 850; color: #3d4c44; }
.field input, .field select, .field textarea { height: 46px; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px; font: 700 15px var(--font); color: var(--ink); background: #fff; outline: none; transition: border-color .15s; }
.field textarea { height: 70px; padding: 10px 14px; resize: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); }
.field.err input, .field.err select { border-color: var(--red); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 140px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-weight: 800; font-size: 14px; transition: border-color .15s, background .15s; }
.seg label small { display: block; font-weight: 700; color: var(--muted); font-size: 12px; }
.seg input { accent-color: var(--green); margin-top: 3px; }
.seg label:has(input:checked) { border-color: var(--green); background: var(--green-l); }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slots label { border: 2px solid var(--line); border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px; cursor: pointer; }
.slots input { position: absolute; opacity: 0; pointer-events: none; }
.slots label:has(input:checked) { border-color: var(--green); background: var(--green); color: #fff; }
.co-sum { margin: 16px 0 14px; background: var(--bg); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 5px; }
.demo-note { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 10px; }

.receipt-wrap { padding: 28px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(460px, calc(100vw - 32px)); }
.done-ico { width: 74px; height: 74px; border-radius: 50%; background: var(--green); display: grid; place-items: center; box-shadow: 0 0 0 10px var(--green-l); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.done-ico svg { width: 40px; height: 40px; color: #fff; }
@keyframes pop { from { transform: scale(.3); } }
.receipt-wrap h2 { margin: 0; font: 800 30px/1 var(--font-d); text-align: center; }
.receipt-wrap p { margin: 0; text-align: center; color: var(--muted); font-weight: 700; }
.printer { width: 100%; max-width: 340px; position: relative; padding-top: 14px; }
.printer::before { content: ''; position: absolute; left: -10px; right: -10px; top: 0; height: 18px; border-radius: 9px; background: #2b3330; }
.paper { margin: 0 6px; background: #fffef8; box-shadow: 0 8px 18px rgba(0, 0, 0, .12); padding: 18px 16px 22px; font: 700 12.5px/1.5 ui-monospace, Consolas, 'Courier New', monospace; color: #222; transform-origin: top; animation: print 1.6s steps(24) both; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px), 75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px), 55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px), 35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px), 15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px)); max-height: 46dvh; overflow: auto; }
@keyframes print { from { transform: scaleY(0); } }
.paper .c { text-align: center; }
.paper .big { font-size: 16px; font-weight: 900; }
.paper .ln { display: flex; justify-content: space-between; gap: 8px; }
.paper hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.barcode { height: 34px; margin-top: 8px; background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 8px, #222 8px 11px, transparent 11px 12px); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #17251e; color: #fff; border-radius: 999px; padding: 8px 10px 8px 8px; display: flex; align-items: center; gap: 10px; font: 800 14px var(--font); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: .25s cubic-bezier(.3, 1.3, .5, 1); z-index: 80; max-width: calc(100vw - 24px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .ta { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.toast .ta svg { max-width: 26px; max-height: 26px; width: auto; height: auto; }
.toast .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast button { border: 0; background: rgba(255, 255, 255, .14); color: #b2f2bb; border-radius: 999px; padding: 6px 12px; font: 850 13px var(--font); cursor: pointer; flex: 0 0 auto; }

.flyer { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; will-change: transform; }
.flyer > div { will-change: transform; }
.flyer svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .logo-text small { display: none; }
  .hint { display: none; }
}
@media (max-width: 720px) {
  :root { --top-h: 58px; --dept-h: 50px; }
  .topbar { gap: 10px; padding: 0 10px; }
  .logo-text { display: none; }
  .logo-mark { width: 38px; height: 38px; font-size: 30px; }
  .search input { height: 40px; font-size: 14px; padding-left: 38px; }
  .search .ico { left: 12px; top: 10px; }
  .cart-btn { height: 42px; padding: 0 12px 0 10px; gap: 8px; }
  .cart-btn .cart-total { font-size: 14px; }
  .chip { padding: 0 4px; gap: 0; }
  .chip .lbl { display: none; }
  .chip.active { padding-right: 12px; gap: 6px; }
  .chip.active .lbl { display: inline; }
  .pm { grid-template-columns: 1fr; }
  .pm-art { border-radius: 24px 24px 0 0; min-height: 0; padding: 30px 20px 14px; }
  .pm-art svg { max-height: 190px; max-width: 70%; }
  .pm-info { padding: 18px 20px 20px; }
  .pm-info h2 { font-size: 26px; }
  .pm-price .now { font-size: 34px; }
  .pm-similar { padding: 14px 18px 20px; }
  .sim-row { grid-template-columns: repeat(2, 1fr); }
  .modal { width: 100vw; max-height: 92dvh; left: 0; top: auto; bottom: 0; border-radius: 24px 24px 0 0; transform: translateY(100%); }
  .modal.show { transform: none; }
  .catalog { width: 100vw; height: 92dvh; }
  .cat-head { padding: 18px 16px 0; }
  .cat-grid { padding: 4px 16px 20px; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .checkout { padding: 22px 18px 20px; }
  #checkout { width: 100vw; }
  .checkout, .receipt-wrap { width: 100%; }
  .hud-btn > span { display: none; }
  .hud-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .hud-btn svg { width: 22px; height: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .pedal { width: 66px; height: 66px; }
  .hud { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .pedals { position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; pointer-events: none; }
  .pedal { pointer-events: auto; }
  .hud-left { position: absolute; left: 12px; top: 10px; }
  .hud { inset: 0; padding: 0; }
  .hud-btn { padding: 10px 13px; font-size: 13px; }
  .hud-btn .lbl-long { display: none; }
  .speedo { display: none; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .cart-btn .cart-total { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --top-h: 50px; --dept-h: 44px; }
  .logo-text small { display: none; }
  .chip { height: 32px; }
  .chip .ic { width: 26px; height: 26px; }
  .pedal { width: 56px; height: 56px; }
  .speedo, .hint { display: none; }
}
@media (pointer: coarse) {
  .qa { display: none; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
