:root {
  --ink: #14241c;
  --deep: #123d2d;
  --deepest: #092b20;
  --cream: #f5f3ec;
  --line: #dce5dc;
  --muted: #65756c;
  --lime: #c9f36d;
  --white: #fff;
  --soft: #e7f2e3;
  --warn: #fff5dc;
  --warn-line: #efd99d;
  --danger: #a23c2b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
.app-shell { width: min(1420px, 100%); margin: 0 auto; padding: 24px; }

.topbar { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.parkos-brand { display: flex; align-items: center; gap: 10px; color: var(--deep); font-size: 18px; font-weight: 850; text-decoration: none; }
.parkos-brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.parkos-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: var(--deepest); font-size: 18px; font-weight: 900; }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.back-link { border: 1px solid #c7d8c8; border-radius: 999px; padding: 7px 10px; color: #245b38; background: #fff; font-size: 11px; font-weight: 800; text-decoration: none; }
.back-link:hover { border-color: #87ad8d; background: #f0f8ef; }
.basket-link { color: var(--deep); font-size: 12px; font-weight: 850; text-decoration: none; }
.basket-link span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 4px; border-radius: 99px; background: var(--deep); color: #fff; font-size: 11px; }

.hero { position: relative; overflow: hidden; margin-top: 22px; border-radius: 24px; padding: 34px; background: var(--deep); color: #fff; }
.hero::after { position: absolute; right: -70px; top: -100px; width: 250px; height: 250px; border: 34px solid var(--lime); border-radius: 50%; opacity: .22; content: ""; pointer-events: none; }
.eyebrow { margin: 0 0 7px; color: #4f895c; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: var(--lime); }
.hero h1 { position: relative; z-index: 1; margin: 8px 0 12px; font-size: clamp(35px, 5vw, 56px); line-height: 1; letter-spacing: -.035em; }
.hero h1 strong { color: var(--lime); font-weight: 850; }
.intro { position: relative; z-index: 1; max-width: 760px; margin: 0; color: #d8e7dc; font-size: 16px; }
.facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 850px; margin: 24px 0 0; }
.facts div { min-width: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; padding: 12px 14px; background: rgba(255,255,255,.07); }
.facts dt { color: #aecdba; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 800; }

.system-status { margin: 14px 0 20px; border: 1px solid var(--warn-line); border-radius: 14px; padding: 13px 16px; background: var(--warn); color: #6b5428; font-size: 13px; }
.system-status::before { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: #d2a62f; box-shadow: 0 0 0 4px #f5e8bd; content: ""; }
.system-status.ok { border-color: #cfe2ca; background: #eef7e9; color: #284a31; }
.system-status.ok::before { background: #75a67e; box-shadow: 0 0 0 4px #dcebdc; }
.system-status.error { border-color: #efc7c2; background: #fbe9e7; color: #8a302a; }
.system-status.error::before { background: #c45e52; box-shadow: 0 0 0 4px #f1d5d1; }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 18px; padding: 17px; background: var(--white); }
.catalog-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
.catalog-head h2, .basket h2, .service-strip h2 { margin: 0; font-size: 21px; line-height: 1.15; }
.search input { width: 250px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: #fff; color: var(--ink); }
.search input:focus, select:focus, input:focus { outline: 3px solid rgba(74, 145, 89, .18); border-color: #5a9867; }
.loading, .empty { border: 1px dashed #bccbbb; border-radius: 13px; padding: 15px; color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.filters button { border: 1px solid var(--line); border-radius: 99px; padding: 7px 11px; background: #fff; color: #53665a; font-size: 11px; font-weight: 800; cursor: pointer; }
.filters button:hover { border-color: #91b995; background: #f2f7f0; }
.filters button.active { border-color: #91b995; background: var(--soft); color: #24582f; }

.category { margin: 0 0 22px; }
.category:last-child { margin-bottom: 0; }
.category h3 { margin: 0 0 9px; color: #4d8059; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 10px; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; min-height: 145px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.product-name { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; }
.product-description { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.product-price { white-space: nowrap; font-size: 17px; font-weight: 850; }
.quantity { grid-column: 1 / -1; display: flex; align-items: center; align-self: end; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid #edf1ec; }
.quantity button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--deep); font-weight: 900; cursor: pointer; }
.quantity button:hover { border-color: #91b995; background: var(--soft); }
.quantity button:disabled { opacity: .35; cursor: not-allowed; }
.quantity span { min-width: 22px; text-align: center; font-weight: 850; }

.basket { position: sticky; top: 16px; }
.basket-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.cart-count { border-radius: 99px; padding: 4px 8px; background: #eef4eb; color: #4d6a56; font-size: 10px; font-weight: 850; }
.pickup-field { display: block; padding: 15px 0 7px; }
.pickup-field span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.pickup-field select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; color: var(--ink); }
.rule-notice { margin: 0 0 10px; border: 1px solid #a8cfb0; border-left: 4px solid #28784a; border-radius: 10px; padding: 11px 12px; background: #eff8f0; color: #163b25; font-size: 12px; font-weight: 800; line-height: 1.45; }
.rule-notice.warning { background: var(--warn); color: #78520b; }
.rule-notice.urgent { border: 2px solid #dc8428; padding: 12px; background: #fff0d6; color: #713d08; box-shadow: 0 0 0 4px rgba(220,132,40,.13); font-size: 13px; font-weight: 850; line-height: 1.45; }
.basket-items { padding: 9px 0; }
.basket-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 10px 0; border-bottom: 1px solid #edf1ec; font-size: 13px; }
.basket-row button { grid-column: 2; border: 0; padding: 0; background: none; color: #39784a; font-size: 11px; font-weight: 750; cursor: pointer; }
.basket-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-size: 14px; }
.basket-total strong { font-size: 20px; }
.basket-total.online { padding-top: 0; color: #347445; font-size: 12px; }
.basket-total.online strong { font-size: 16px; }
.small { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.checkout { width: 100%; min-height: 44px; margin-top: 13px; border: 0; border-radius: 10px; padding: 10px 13px; background: var(--deep); color: #fff; font-weight: 850; cursor: pointer; }
.checkout:hover { background: #1a543e; }
.checkout:disabled { background: #d9dfd8; color: #728077; cursor: not-allowed; }
.checkout-message { margin: 10px 0 0; color: #347445; font-size: 11px; }
.is-busy button { cursor: wait; }

.late-order-dialog { width: min(520px, calc(100% - 28px)); border: 0; border-radius: 20px; padding: 0; background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgba(9,43,32,.35); }
.late-order-dialog::backdrop { background: rgba(9,43,32,.72); backdrop-filter: blur(3px); }
.late-order-dialog form { padding: 26px; }
.late-order-dialog h2 { margin: 5px 0 10px; font-size: 25px; line-height: 1.1; }
.late-order-dialog p:not(.eyebrow) { margin: 0; color: #58451f; font-size: 15px; }
.late-order-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 50%; background: #f59e3d; color: #fff; font-size: 26px; font-weight: 950; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 22px; }
.dialog-actions button { min-height: 44px; border-radius: 10px; padding: 9px 12px; font-weight: 850; cursor: pointer; }
.dialog-cancel { border: 1px solid var(--line); background: #fff; color: var(--deep); }
.dialog-confirm { border: 0; background: var(--deep); color: #fff; }
footer { padding: 22px 4px 2px; color: var(--muted); font-size: 11px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 920px) {
  .order-layout { grid-template-columns: 1fr; }
  .basket { position: static; }
}

@media (max-width: 640px) {
  .app-shell { padding: 14px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-actions { margin-left: auto; }
  .hero { margin-top: 14px; padding: 25px; }
  .hero::after { display: none; }
  .hero h1 { font-size: 36px; }
  .facts { grid-template-columns: 1fr; }
  .catalog-head { align-items: stretch; flex-direction: column; }
  .search, .search input { width: 100%; }
  .products { grid-template-columns: 1fr; }
  .dialog-actions { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .parkos-brand { font-size: 15px; }
  .parkos-mark { width: 34px; height: 34px; }
  .basket-link { font-size: 0; }
  .basket-link span { font-size: 11px; }
  .panel { padding: 14px; }
}
