:root {
  --bg: #f7f3ec;
  --paper: #fffaf2;
  --ink: #231d19;
  --muted: #756b61;
  --line: #e3d6c7;
  --accent: #9f2f22;
  --accent-dark: #6f1f18;
  --green: #2f6f47;
  --gold: #bb7c22;
  --shadow: 0 10px 30px rgba(42, 28, 18, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.logo-button {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 236, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
}

.brand-row > div:first-child {
  min-width: 0;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-language {
  min-width: 76px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 4px 14px rgba(42, 28, 18, .06);
}

.brand-logo {
  display: block;
  width: min(178px, 54vw);
  height: auto;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.push-button {
  width: 42px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--accent-dark);
  font-size: 19px;
  line-height: 1;
  box-shadow: none;
}

.push-button.enabled {
  border-color: #9ac59d;
  background: #e8f5df;
}

.push-button:disabled {
  opacity: 0.55;
}

.cart-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--accent-dark);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(42, 28, 18, .08);
}

.cart-glyph {
  font-size: 28px;
  line-height: 1;
}

.cart-badge {
  position: absolute;
  right: 5px;
  top: 4px;
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 10px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.filter.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.filter.deal-filter {
  border-color: #efc14d;
  background: #ffd866;
  color: #3b2410;
  box-shadow: 0 4px 12px rgba(187, 124, 34, .22);
}

.filter.deal-filter.active {
  border-color: #d59a26;
  background: #f3b72c;
  color: #2f1b0b;
}

main {
  padding: 12px 10px 96px;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
}

.bottom-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 1180px;
  margin: 18px auto 0;
}

.slider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: var(--paper);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(42, 28, 18, .08);
}

.slider-button:active {
  transform: translateY(1px);
}

.bottom-push-button {
  width: 54px;
  min-width: 54px;
  height: 42px;
  padding: 0;
  font-size: 21px;
  font-weight: 850;
  box-shadow: none;
}

.bottom-push-button.unsupported {
  opacity: .72;
}

.bottom-push-button[hidden] {
  display: inline-flex !important;
}

.card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(42, 28, 18, .08);
}

.card.featured {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}

.card.wide-product {
  grid-column: 1 / -1;
}

.wide-product .image-wrap {
  aspect-ratio: 16 / 8;
}

.wide-product .content {
  padding: 11px;
}

.wide-product .title {
  font-size: 20px;
}

.image-wrap {
  position: relative;
  aspect-ratio: 1 / .86;
  background: #e8dfd4;
}

.featured .image-wrap {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

.badge {
  position: absolute;
  left: 7px;
  top: 7px;
  max-width: calc(100% - 14px);
  border-radius: 6px;
  padding: 4px 7px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.price-card .badge {
  background: var(--gold);
}

.promo-card,
.price-card {
  border-color: #d9c5ae;
  background: #fff9ef;
}

.promo-card .content,
.price-card .content {
  gap: 8px;
  padding: 11px;
}

.content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
}

.meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 6px;
}

.title {
  margin: 0;
  min-width: 0;
  font-size: 15px;
  line-height: 1.08;
  font-weight: 850;
}

.featured .title {
  font-size: 22px;
  line-height: 1.02;
}

.category {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.featured .description {
  font-size: 13px;
  -webkit-line-clamp: 2;
}

.price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.price {
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 900;
}

.old-price {
  color: var(--muted);
  font-size: 13px;
  text-decoration: line-through;
}

.unit {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.deals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 7px;
}

.deal {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #dca829;
  border-radius: 7px;
  padding: 5px 7px;
  background: #ffd866;
  color: #442811;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 3px 8px rgba(187, 124, 34, .16);
}

.deal.active {
  border-color: var(--accent-dark);
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18);
}

.product-card .deals .deal {
  background: #efe5d8;
  color: var(--accent-dark);
  box-shadow: none;
}

.controls {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 5px;
}

.step {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 19px;
  font-weight: 850;
}

.weight {
  text-align: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.add {
  width: 100%;
  min-height: 35px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.cart-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 242, .97);
  box-shadow: 0 -8px 24px rgba(42, 28, 18, .12);
  backdrop-filter: blur(12px);
}

.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.cart-summary strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.checkout {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 15px;
  background: var(--green);
  color: #fff;
  font-weight: 850;
}

.checkout.full {
  width: 100%;
}

.checkout:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: end;
  background: rgba(35, 29, 25, .42);
}

.cart-drawer.open {
  display: flex;
}

.cart-panel {
  width: 100%;
  max-height: min(86vh, 760px);
  overflow: auto;
  border-radius: 14px 14px 0 0;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 14px 12px calc(18px + env(safe-area-inset-bottom));
}

.cart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cart-head h2 {
  margin: 0;
  font-size: 22px;
}

.cart-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.close-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.cart-items {
  display: grid;
  gap: 8px;
}

.cart-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.cart-item.deal-item {
  border-color: #e8ca69;
  background: #fff4c9;
}

.cart-item h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.deal-note {
  color: #7a4d00 !important;
  font-weight: 800;
}

.item-comment {
  color: var(--ink) !important;
  font-weight: 700;
}

.order-history {
  margin: 6px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.cart-price {
  color: var(--accent-dark);
  font-weight: 900;
  text-align: right;
}

.cart-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 34px 64px 34px 1fr auto;
  gap: 6px;
  align-items: center;
}

.comment-button,
.admin-lite {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.remove {
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.cart-form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.cart-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
}

.check-row input {
  width: auto !important;
}

.schedule-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 64px 1fr 64px 64px;
  gap: 7px;
}

.schedule-grid input,
.schedule-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.schedule-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.schedule-field.is-ready .schedule-grid {
  opacity: .42;
  filter: grayscale(.35);
}

.schedule-field.is-ready .schedule-grid select {
  background: #eee8df;
}

.ready-note {
  display: none;
  border-left: 3px solid var(--green);
  padding: 6px 0 6px 9px;
}

.schedule-field.is-ready .ready-note {
  display: grid;
  gap: 2px;
}

.ready-note strong {
  color: var(--ink);
  font-size: 13px;
}

.ready-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.pickup-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pickup-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pickup-options label {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.15;
}

.pickup-options input {
  width: auto !important;
  accent-color: var(--accent);
}

.cart-form input,
.cart-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
}

.cart-form input::placeholder,
.cart-form textarea::placeholder {
  color: #77706a;
  opacity: .92;
}

#customerPhone::placeholder {
  font-size: 14px;
}

.admin-language-toggle {
  min-width: 76px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(35, 29, 25, .42);
}

.modal.open {
  display: flex;
}

.modal-panel {
  display: grid;
  gap: 10px;
  width: min(440px, 100%);
  border-radius: 12px;
  background: var(--paper);
  padding: 14px;
  box-shadow: var(--shadow);
}

.wide-modal {
  max-height: 88vh;
  overflow: auto;
}

.modal-panel h2 {
  margin: 0;
  font-size: 20px;
}

.quick-order-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.inline-cart-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-panel input,
.modal-panel select,
.modal-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.orders-desk {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  overflow: auto;
  background: var(--bg);
  padding: 12px 10px 90px;
}

.orders-desk.open {
  display: block;
}

.admin-dashboard {
  position: fixed;
  inset: 0;
  z-index: 56;
  display: none;
  overflow: auto;
  background: var(--bg);
  padding: 12px 10px 90px;
}

.admin-dashboard.open {
  display: block;
}

.admin-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  max-width: 980px;
  margin: 0 auto 10px;
  padding: 8px 0;
  overflow-x: auto;
  background: var(--bg);
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.admin-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-section {
  max-width: 980px;
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(42, 28, 18, .08);
}

.admin-section h2,
.admin-section summary {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.user-create {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 7px;
  align-items: center;
  margin-bottom: 8px;
}

.user-create input,
.admin-user-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.admin-user-field input:disabled,
.admin-user-field button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.admin-users,
.admin-stats {
  display: grid;
  gap: 7px;
}

.admin-user-card,
.stat-row {
  border-radius: 7px;
  padding: 8px;
  background: #fff;
}

.admin-user-card {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(226, 214, 198, .75);
}

.admin-user-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-card-head strong {
  font-size: 18px;
  font-weight: 950;
}

.admin-user-card-head span,
.admin-user-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-user-field {
  display: grid;
  gap: 4px;
}

.admin-user-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.user-delete {
  justify-self: end;
  min-height: 36px;
  padding: 0 4px;
  font-weight: 900;
}

.stat-row {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 7px;
  align-items: center;
}

.stat-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.action-row {
  grid-template-columns: 1.05fr .8fr 1.1fr 1.7fr;
}

.action-row span,
.action-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.orders-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.orders-head-actions {
  display: flex;
  gap: 8px;
}

.orders-head-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(48vw, 260px);
}

.logout-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.orders-head h1 {
  margin: 0;
  font-size: 26px;
}

.orders-head p {
  margin: 2px 0 0;
  color: var(--muted);
}

.order-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

.orders-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.store-filter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.store-filter input {
  width: 16px;
  height: 16px;
}

.status-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.status-filters label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-filters input {
  width: 16px;
  height: 16px;
}

.orders-list {
  display: grid;
  gap: 10px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(42, 28, 18, .08);
}

.order-card.staff-created {
  border-width: 2px;
  border-color: #b89452;
}

.order-card.done {
  border-color: #9ac59d;
  background: #e8f5df;
}

.created-by {
  margin: 6px 0 0;
  color: #7a4d00;
  font-size: 13px;
  font-weight: 850;
}

.link-button {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  text-decoration: underline;
}

.date-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.date-divider::before,
.date-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.order-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.order-top h2 {
  margin: 0;
  font-size: 18px;
}

.order-number {
  display: inline-flex;
  margin-bottom: 3px;
  color: #7a4d00;
  font-size: 12px;
  font-weight: 900;
}

.phone-link {
  color: var(--green);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}

.phone-inline {
  direction: ltr;
  unicode-bidi: isolate;
}

.order-top p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.order-items {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.order-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  border-radius: 7px;
  padding: 7px;
  background: #fff;
}

.order-item.ready {
  background: #dff1d6;
}

.order-item.cancel {
  background: #f7d9d3;
}

.order-item span {
  font-weight: 800;
}

.order-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.order-item button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 900;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
}

.notify-button {
  min-width: 40px;
  min-height: 32px;
  border: 1px solid #9ac59d;
  border-radius: 7px;
  background: #e8f5df;
  color: #1f7a3d;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.notify-button:disabled {
  border-color: var(--line);
  background: #f4f0e8;
  color: var(--muted);
  opacity: 0.65;
}

.trash-button {
  min-width: 40px;
  min-height: 32px;
  border: 1px solid #e3c8c1;
  border-radius: 7px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
}

.edit-order-body {
  display: grid;
  gap: 9px;
}

.edit-order-body label {
  display: grid;
  gap: 4px;
}

.edit-items {
  display: grid;
  gap: 7px;
}

.edit-item {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 7px;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.edit-item strong,
.edit-item [data-edit-field="comment"],
.edit-item .remove {
  grid-column: 1 / -1;
}

.snapshot,
.snapshot-item {
  display: grid;
  gap: 6px;
}

.snapshot p {
  margin: 0;
}

.snapshot-item {
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

@media (max-width: 520px) {
  .user-create {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 700px) {
  main {
    padding-inline: 18px;
  }

  .catalog {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card.featured {
    grid-column: span 2;
  }

  .cart-panel {
    max-width: 560px;
    margin-left: auto;
    border-radius: 14px 0 0 14px;
  }

  .cart-drawer {
    align-items: stretch;
  }
}

@media (min-width: 1040px) {
  .catalog {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.store-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 10px;
  scrollbar-width: none;
}

.store-tab {
  flex: 1 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 850;
}

.store-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

body.store-freshbox {
  --bg: #eef9ed;
  --paper: #ffffff;
  --ink: #16351f;
  --muted: #5d7c62;
  --line: #c4e3c7;
  --accent: #2f9e44;
  --accent-dark: #17692b;
  --green: #187536;
  --gold: #f0b429;
  font-family: "Nunito", system-ui, sans-serif;
}

body.store-bakeco {
  --bg: #fbf0df;
  --paper: #fffaf2;
  --ink: #3e2413;
  --muted: #7f6147;
  --line: #e5c49e;
  --accent: #b46625;
  --accent-dark: #75380f;
  --green: #7b8141;
  --gold: #d7952f;
  font-family: "Rubik", system-ui, sans-serif;
}

body.store-bloomroom {
  --bg: #fff4f8;
  --paper: #fffdfd;
  --ink: #3a1730;
  --muted: #806578;
  --line: #ecd0de;
  --accent: #bd4b88;
  --accent-dark: #822755;
  --green: #54785d;
  --gold: #c99436;
  font-family: "Quicksand", system-ui, sans-serif;
}

.cart-glyph {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  font-size: 0;
}

.cart-glyph::before,
.cart-glyph::after {
  position: absolute;
  content: "";
  display: block;
}

.cart-glyph::before {
  left: 5px;
  top: 9px;
  width: 22px;
  height: 17px;
  border: 3px solid currentColor;
  border-top-width: 4px;
  border-radius: 4px 4px 7px 7px;
}

.cart-glyph::after {
  left: 10px;
  top: 3px;
  width: 12px;
  height: 12px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

body.store-bakeco .cart-glyph::before {
  border-radius: 12px 12px 6px 6px;
  transform: rotate(-2deg);
}

body.store-bloomroom .cart-glyph::before {
  border-radius: 50% 50% 10px 10px;
}

body.store-bloomroom .cart-glyph::after {
  left: 8px;
  top: 1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border-bottom: 3px solid currentColor;
  transform: rotate(-18deg);
}

.logout-button {
  display: inline-grid;
  position: relative;
  width: 42px;
  height: 40px;
  place-items: center;
  color: inherit;
  font-size: 0;
}

.logout-button::before {
  content: "";
  width: 18px;
  height: 21px;
  border: 2px solid currentColor;
  border-right-width: 5px;
  border-radius: 3px;
}

.logout-button::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: currentColor;
  transform: translate(2px, 0);
}

body.store-freshbox .card {
  border-width: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fff7 100%);
  box-shadow: 0 10px 24px rgba(24, 117, 54, .12);
}

body.store-freshbox .image-wrap {
  background: #dff3df;
}

body.store-freshbox .add,
body.store-freshbox .checkout {
  border-radius: 999px;
}

body.store-bakeco .card {
  border: 2px solid #dfbc8e;
  border-radius: 6px;
  background: #fff9ef;
  box-shadow: 0 12px 28px rgba(117, 56, 15, .15);
}

body.store-bakeco .title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
}

body.store-bakeco .image-wrap {
  background: #f1d7b5;
}

body.store-bakeco .badge {
  border-radius: 999px;
  background: #75380f;
}

body.store-bloomroom .card {
  border: 1px solid rgba(189, 75, 136, .28);
  border-radius: 8px;
  background: #fffdfd;
  box-shadow: 0 16px 34px rgba(130, 39, 85, .13);
}

body.store-bloomroom .title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
}

body.store-bloomroom .image-wrap {
  background: #f8e3ed;
}

body.store-bloomroom .badge,
body.store-bloomroom .add,
body.store-bloomroom .checkout {
  border-radius: 999px;
}

.home-page {
  min-height: 100vh;
  background: #ffcc00;
  color: #17130a;
}

.home-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 56px);
}

.home-header {
  display: flex;
  justify-content: center;
}

.home-logo-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  animation: logoDrop .72s cubic-bezier(.2, .9, .2, 1.18) both;
}

.home-logo {
  display: block;
  width: min(675px, 90vw);
  height: auto;
}

.home-stores {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.home-card {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  border: 3px solid rgba(23, 19, 10, .9);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(23, 19, 10, .22);
  animation: cardLaunch .78s cubic-bezier(.18, .94, .2, 1.08) both;
  transform-origin: 50% 90%;
}

.home-card:nth-child(2) {
  animation-delay: .12s;
}

.home-card:nth-child(3) {
  animation-delay: .24s;
}

.home-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1792 / 1024;
  object-fit: cover;
  transition: transform .22s ease;
}

.home-card:hover img {
  transform: scale(1.035);
}

.home-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 30px;
  color: #17130a;
}

.home-contacts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-bottom: 2px solid currentColor;
  color: #17130a;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 900;
  text-decoration: none;
}

.home-contacts a:hover {
  color: #5b4200;
}

.home-phone-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(23, 19, 10, .42);
}

.home-phone-modal.open {
  display: flex;
}

.home-phone-panel {
  position: relative;
  width: min(430px, 100%);
  border: 3px solid #17130a;
  border-radius: 8px;
  padding: 24px;
  background: #fff7d1;
  color: #17130a;
  box-shadow: 0 24px 60px rgba(23, 19, 10, .35);
  animation: modalPop .28s cubic-bezier(.2, .9, .2, 1.2) both;
}

.home-phone-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.home-phone-panel p {
  margin: 0 0 18px;
  color: #5b4200;
  font-weight: 700;
}

.home-phone-panel label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.home-phone-panel input {
  width: 100%;
  height: 48px;
  border: 2px solid #17130a;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #17130a;
}

.home-phone-save {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: #17130a;
  color: #ffcc00;
  font-weight: 900;
}

.home-phone-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #17130a;
  font-size: 30px;
  line-height: 1;
}

@keyframes logoDrop {
  from {
    opacity: 0;
    transform: translateY(-28px) scale(.82);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardLaunch {
  from {
    opacity: 0;
    transform: translateY(54px) scale(.9) rotateX(12deg);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes productReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(.96);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

body.store-freshbox .catalog .card {
  animation: freshProductPop .5s cubic-bezier(.16, 1.18, .28, 1) both;
}

body.store-bakeco .catalog .card {
  animation: bakeryProductRise .58s cubic-bezier(.22, .88, .22, 1) both;
}

body.store-bloomroom .catalog .card {
  animation: none;
}

body.store-freshbox .catalog .card:nth-child(2n),
body.store-bakeco .catalog .card:nth-child(2n) {
  animation-delay: .05s;
}

body.store-freshbox .catalog .card:nth-child(3n),
body.store-bakeco .catalog .card:nth-child(3n) {
  animation-delay: .1s;
}

body.store-freshbox .catalog .card:nth-child(4n),
body.store-bakeco .catalog .card:nth-child(4n) {
  animation-delay: .15s;
}

@keyframes freshProductPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.9) rotate(-1deg);
    filter: saturate(.85) blur(5px);
  }
  72% {
    transform: translateY(-3px) scale(1.025) rotate(.3deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
    filter: saturate(1) blur(0);
  }
}

@keyframes bakeryProductRise {
  from {
    opacity: 0;
    transform: translateY(34px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-logo-button,
  .home-card,
  body.store-freshbox .catalog .card,
  body.store-bakeco .catalog .card,
  .home-phone-panel {
    animation: none;
  }

  .home-card img {
    transition: none;
  }
}

@media (max-width: 860px) {
  .home-shell {
    justify-content: flex-start;
    gap: 22px;
    padding-top: 24px;
  }

  .home-stores {
    grid-template-columns: 1fr;
  }

  .home-card img {
    height: auto;
  }

  .home-contacts {
    align-items: stretch;
    flex-direction: column;
  }
}
