/* ============================================================
   MeatFishDelivery — mobile-first PWA
   Светлая «свежая» тема: коралл (мясо), мята (рыба), тёплый фон
   ============================================================ */

:root {
  --bg: #f5f7f4;
  --bg-deep: #eef3ee;
  --surface: #ffffff;
  --surface-2: #f2f6f1;
  --surface-3: #e8efe7;
  --line: #e3e9e2;
  --line-strong: #c9d7cb;

  --text: #16221c;
  --text-dim: #4f6259;
  --text-mute: #7d9088;

  --primary: #e2552f;
  --primary-dark: #c8401d;
  --primary-soft: #ffe7de;
  --mint: #0f9e8e;
  --mint-soft: #dcf5f0;
  --amber: #f2b544;
  --amber-soft: #fff3d4;
  --success: #1c9c6b;
  --danger: #d64545;

  --radius-lg: 26px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;

  --shadow: 0 22px 46px -28px rgba(22, 34, 28, 0.4);
  --shadow-soft: 0 10px 24px -18px rgba(22, 34, 28, 0.28);
  --shadow-card: 0 1px 2px rgba(22, 34, 28, 0.04), 0 14px 30px -22px rgba(22, 34, 28, 0.35);

  --maxw: 1180px;
  --tab-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* авторские display-правила не должны перебивать атрибут hidden
   (иначе, например, .overlay с display:flex висит поверх страницы) */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* резервируем место под скроллбар, чтобы контент не «прыгал»
     при переключении вкладок и открытии шторок */
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 108% -8%, rgba(155, 226, 205, 0.45), transparent 62%),
    radial-gradient(760px 460px at -12% 0%, rgba(255, 203, 176, 0.5), transparent 62%),
    linear-gradient(180deg, #f8faf7 0%, #f3f6f2 55%, #edf2ed 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

img,
svg {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--mint);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
/* ---------------------------- каркас ---------------------------- */

.app-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) 12px 0;
  position: relative;
}

.app-main {
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 28px);
}

.app-main:focus {
  outline: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -12px;
  padding: 8px 12px 10px;
  background: rgba(248, 251, 247, 0.92);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}

.app-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.app-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}

.brand__logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.brand__logo img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  white-space: nowrap;
  /* двойной тап по названию открывает админку — отключаем зум и выделение */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.brand__name em {
  font-style: normal;
  color: var(--primary);
}

.brand__sub {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.app-header__delivery {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.app-header__delivery span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 11px;
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(22, 34, 28, 0.04);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.icon-btn__label {
  font-size: 12px;
  white-space: nowrap;
}

.offline-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
  color: #5a3c00;
  background: var(--amber-soft);
  border: 1px solid #f0d79a;
  font-weight: 600;
}

.file-warning {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 200;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 700;
  text-align: center;
  color: #5a3c00;
  background: var(--amber-soft);
  border-bottom: 1px solid #f0d79a;
  box-shadow: 0 10px 24px -16px rgba(22, 34, 28, 0.5);
}

/* ---------------------------- экраны ---------------------------- */

.view {
  animation: view-in 0.3s ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 0 10px;
}

.page-head h1 {
  flex: 1;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head .icon-btn {
  width: 40px;
  padding: 0;
  font-size: 18px;
}

.text-btn {
  padding: 8px 4px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.text-btn:hover {
  text-decoration: underline;
}

.page-foot {
  margin: 26px 0 6px;
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
}

.page-foot a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  margin-top: 6px;
}

.footer-links a {
  color: var(--text-mute);
  font-size: 11px;
}
/* ---------------------------- кнопки и чипы ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-align: center;
}

.btn:active {
  transform: scale(0.975);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #f4663c, var(--primary) 55%, var(--primary-dark));
  box-shadow: 0 12px 24px -14px rgba(226, 85, 47, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--ghost {
  color: var(--text);
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(22, 34, 28, 0.04);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 11px;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: #fff;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.chip--glass {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(22, 34, 28, 0.05);
}

.card {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* ---------------------------- hero ---------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  margin: 4px 0 16px;
  padding: 18px 18px 20px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(15, 158, 142, 0.16), transparent 58%),
    radial-gradient(100% 80% at 0% 100%, rgba(226, 85, 47, 0.14), transparent 60%),
    linear-gradient(160deg, #ffffff, #f7faf5 60%, #f1f7f1);
  border: 1px solid #e6eee5;
  box-shadow: var(--shadow);
}

.hero__glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 160, 0.75), transparent 66%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 430px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #ffd2c2;
}

.hero__title {
  font-size: clamp(24px, 6.4vw, 40px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero__text {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.hero__art {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 130px;
  margin: 0 0 12px;
  transform: none;
  opacity: 1;
  filter: none;
  pointer-events: none;
}

.hero__art img {
  width: auto;
  height: 100%;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}

/* ---------------------------- инструменты каталога ---------------------------- */

.catalog-tools {
  position: sticky;
  top: calc(var(--safe-top) + 83px);
  z-index: 20;
  margin: 0 -12px 14px;
  padding: 8px 12px 10px;
  background: linear-gradient(180deg, rgba(248, 251, 247, 0.96) 72%, rgba(248, 251, 247, 0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(22, 34, 28, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: rgba(15, 158, 142, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 158, 142, 0.12);
}

.search__icon {
  font-size: 15px;
  opacity: 0.65;
}

.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  font-size: 15px;
  outline: none;
}

.search__input::placeholder {
  color: var(--text-mute);
}

.search__input::-webkit-search-cancel-button {
  display: none;
}

.search__clear {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-dim);
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1;
}

.chips-row {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}

.chips-row::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  background: #fff;
  border: 1px solid var(--line);
  scroll-snap-align: start;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.cat-chip:active {
  transform: scale(0.96);
}

.cat-chip.is-active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
  box-shadow: 0 8px 18px -12px rgba(22, 34, 28, 0.9);
}

.sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.sort-row__count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-mute);
  white-space: nowrap;
}

.sort-select select {
  max-width: 200px;
  height: 36px;
  padding: 0 30px 0 11px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237d9088' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px 8px;
  border: 1px solid var(--line);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.sort-select select:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.sort-select select:focus {
  border-color: rgba(15, 158, 142, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 158, 142, 0.12);
  color: var(--text);
}

.sort-select select option {
  color: var(--text);
  background: #fff;
}
/* ---------------------------- сетка товаров ---------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
  text-align: left;
  content-visibility: auto;
  contain-intrinsic-size: auto 228px;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 2px 4px rgba(22, 34, 28, 0.05), 0 20px 34px -24px rgba(22, 34, 28, 0.45);
  }
}

.product-card:active {
  transform: scale(0.985);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 0.82;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, var(--g1, #ffe3d6), var(--g2, #ffb59a));
}

.product-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 30% 18%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, transparent 62%, rgba(255, 255, 255, 0.42));
  pointer-events: none;
}

.product-card__emoji {
  position: relative;
  z-index: 1;
  font-size: 52px;
  line-height: 1;
  text-shadow: 0 10px 14px rgba(22, 34, 28, 0.22);
  transform: translateY(2px);
}

.product-card__image {
  position: relative;
  z-index: 1;
  width: 86%;
  height: 86%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 12px 22px -14px rgba(22, 34, 28, 0.55);
}

.product-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(22, 34, 28, 0.86);
  box-shadow: 0 6px 14px -8px rgba(22, 34, 28, 0.7);
}

.product-card__discount {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f4663c, var(--primary));
  box-shadow: 0 6px 14px -8px rgba(200, 64, 29, 0.9);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 10px 10px 11px;
}

.product-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.product-card__cut {
  overflow: hidden;
  font-size: 10.5px;
  color: var(--text-mute);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.price {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.price__now {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.price__now small {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-mute);
}

.price__old {
  font-size: 10.5px;
  color: var(--text-mute);
  text-decoration: line-through;
}

.add-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #f4663c, var(--primary-dark));
  box-shadow: 0 8px 16px -10px rgba(226, 85, 47, 0.95);
  transition: transform 0.15s;
}

.add-btn:active {
  transform: scale(0.9);
}

.product-card__out {
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-mute);
  background: var(--surface-3, #eef1ec);
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.stepper__btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  transition: background 0.2s, transform 0.12s;
}

.stepper__btn:active {
  transform: scale(0.9);
}

.stepper__btn--plus {
  color: #fff;
  background: linear-gradient(145deg, #f4663c, var(--primary-dark));
  border-color: transparent;
}

.stepper__btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.stepper__value {
  min-width: 34px;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.stepper--lg {
  padding: 3px;
  border-radius: 14px;
}

.stepper--lg .stepper__btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 19px;
}

.stepper--lg .stepper__value {
  min-width: 56px;
  font-size: 14px;
}
/* светлые градиенты карточек товаров */
.grad-a { --g1: #ffe4d7; --g2: #ffb79e; }
.grad-b { --g1: #ffdde4; --g2: #ffa3b4; }
.grad-c { --g1: #f7e1cc; --g2: #dcae86; }
.grad-d { --g1: #fae6cb; --g2: #e3bd90; }
.grad-e { --g1: #ffe2cf; --g2: #f2ad8d; }
.grad-f { --g1: #f7dcd2; --g2: #dda494; }
.grad-g { --g1: #f5dfd1; --g2: #d6a994; }
.grad-h { --g1: #ffdac6; --g2: #ffa28b; }
.grad-i { --g1: #dbf0f6; --g2: #a6d3e2; }
.grad-j { --g1: #ffdcd2; --g2: #eb9d95; }
.grad-k { --g1: #daf2e7; --g2: #a3d8c3; }
.grad-l { --g1: #e1ebef; --g2: #b5cbd7; }
.grad-m { --g1: #fff1cb; --g2: #f5d087; }
.grad-n { --g1: #ffe8c0; --g2: #f1c180; }
.grad-o { --g1: #f6ebd2; --g2: #dbc49e; }
.grad-p { --g1: #efdac9; --g2: #ccaa90; }
.grad-q { --g1: #ffdccd; --g2: #f6a990; }
.grad-r { --g1: #f8eedb; --g2: #e0caa8; }
.grad-s { --g1: #e1e8f4; --g2: #adbbd8; }
.grad-t { --g1: #f2e1eb; --g2: #cca6c3; }
.grad-u { --g1: #fff1da; --g2: #ead0a0; }
.grad-v { --g1: #f9eada; --g2: #dcc3a6; }
.grad-w { --g1: #ffebc7; --g2: #efc583; }
.grad-x { --g1: #f7dfd2; --g2: #d6a48d; }
.grad-y { --g1: #dbf3eb; --g2: #a1d9ca; }
.grad-z { --g1: #ddf1ff; --g2: #a1cbec; }

/* ---------------------------- пустые состояния ---------------------------- */

.empty-state {
  padding: 36px 18px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.66);
}

.empty-state__emoji {
  margin-bottom: 8px;
  font-size: 44px;
}

.empty-state h2 {
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---------------------------- преимущества ---------------------------- */

.usp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.usp-card {
  padding: 15px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.usp-card__icon {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 22px;
}

.usp-card h3 {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.usp-card p {
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.usp-card p:last-child {
  margin-bottom: 0;
}
/* ---------------------------- корзина ---------------------------- */

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 11px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.cart-item__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, var(--g1, #ffe3d6), var(--g2, #ffb59a));
  overflow: hidden;
}

.cart-item__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(65% 55% at 30% 20%, rgba(255, 255, 255, 0.5), transparent 72%);
  pointer-events: none;
}

.cart-item__emoji {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 5px 8px rgba(22, 34, 28, 0.22);
}

.cart-item__image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cart-item__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.cart-item__meta {
  font-size: 10.5px;
  color: var(--text-mute);
}

.cart-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.cart-item__price {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.cart-item__remove {
  align-self: flex-start;
  padding: 2px 0;
  font-size: 11.5px;
  color: var(--text-mute);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-item__remove:hover {
  color: var(--danger);
}

.cart-foot {
  position: sticky;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding: 15px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cart-foot__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.cart-foot__row--total {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.cart-foot__row strong {
  color: var(--text);
}

.cart-foot__row--free strong {
  color: var(--success);
}

.cart-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-progress__text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.cart-progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.cart-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #58c8ae);
  transition: width 0.4s ease;
}

.cart-note {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-mute);
  text-align: center;
}
/* ---------------------------- формы ---------------------------- */

.form-block {
  margin-bottom: 12px;
  padding: 16px 14px;
}

.form-block__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.form-block__title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4663c, var(--primary-dark));
}

.form-block:nth-of-type(2) .form-block__title::before {
  background: linear-gradient(180deg, #58c8ae, var(--mint));
}

.form-block:nth-of-type(3) .form-block__title::before {
  background: linear-gradient(180deg, var(--amber), #e9a13a);
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field:last-child {
  margin-bottom: 0;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.field__optional {
  font-weight: 500;
  color: var(--text-mute);
}

.field__input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 16px;
  color: var(--text);
  background: #f8faf7;
  border: 1px solid var(--line);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.field__input::placeholder {
  color: var(--text-mute);
}

.field__input:focus {
  background: #fff;
  border-color: rgba(15, 158, 142, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 158, 142, 0.12);
}

.field__input--area {
  min-height: 70px;
  resize: vertical;
  line-height: 1.45;
}

.field__error {
  display: none;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--danger);
}

.field.is-invalid .field__input {
  border-color: rgba(214, 69, 69, 0.7);
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.1);
}

.field.is-invalid .field__error {
  display: block;
}

.field__hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-mute);
}

.field__hint.is-ok {
  color: var(--success);
}

.field__hint.is-bad {
  color: var(--danger);
}

.promo-row {
  display: flex;
  gap: 8px;
}

.promo-row .field__input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.promo-row .btn {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 14px;
  font-size: 13px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.segmented__item {
  position: relative;
  display: block;
}

.segmented__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented__item span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.segmented__item input:checked + span {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 34, 28, 0.06), 0 8px 16px -12px rgba(22, 34, 28, 0.4);
}

.segmented__item input:focus-visible + span {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.pickup-address {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-dim);
  background: var(--mint-soft);
  border: 1px solid #bfe9e0;
}

.pickup-address strong {
  color: var(--text);
}

/* ---------------------------- слоты и оплата ---------------------------- */

.slot-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.slot-option {
  position: relative;
  display: block;
}

.slot-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slot-option span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: #f8faf7;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.slot-option span::before {
  content: "";
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.slot-option input:checked + span {
  color: var(--text);
  background: var(--mint-soft);
  border-color: rgba(15, 158, 142, 0.55);
}

.slot-option input:checked + span::before {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: inset 0 0 0 3px #fff;
}

.slot-option input:focus-visible + span {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.pay-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pay-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 13px;
  background: #f8faf7;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pay-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-option__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: 17px;
  background: #fff;
  border: 1px solid var(--line);
}

.pay-option__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pay-option__text strong {
  font-size: 13px;
  font-weight: 700;
}

.pay-option__text small {
  font-size: 11px;
  color: var(--text-mute);
}

.pay-option::after {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: auto;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.pay-option:has(input:checked) {
  background: var(--mint-soft);
  border-color: rgba(15, 158, 142, 0.5);
}

.pay-option:has(input:checked)::after {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: inset 0 0 0 3px #fff;
}

.pay-option:has(input:focus-visible) {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* fallback для браузеров без :has() */
.pay-option.is-checked {
  background: var(--mint-soft);
  border-color: rgba(15, 158, 142, 0.5);
}

.pay-option.is-checked::after {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: inset 0 0 0 3px #fff;
}
/* ---------------------------- итоги ---------------------------- */

.summary {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 12px;
}

.summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.summary__row span:first-child {
  min-width: 0;
}

.summary__row strong {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.summary__row--discount strong {
  color: var(--success);
}

.summary__row--total {
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.summary__row--total strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.summary__hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--success);
}

.summary__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px dashed var(--line);
}

.summary__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.summary__item em {
  font-style: normal;
  color: var(--text-mute);
  white-space: nowrap;
}

.checkout-submit {
  margin-top: 4px;
}

.checkout-submit .btn {
  min-height: 52px;
  font-size: 16px;
}

.checkout-submit__note {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-mute);
  text-align: center;
}

/* ---------------------------- заказы ---------------------------- */

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.order-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.order-card__id {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.order-card__date {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
}

.order-card__items {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}

.order-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
  font-size: 11.5px;
  color: var(--text-mute);
}

.order-card__meta b {
  color: var(--text-dim);
  font-weight: 600;
}

.order-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.order-card__total {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mint);
  background: var(--mint-soft);
  border: 1px solid #bfe9e0;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--ok {
  color: var(--success);
  background: #e2f6ec;
  border-color: #b9e6d3;
}

.status-pill--wait {
  color: #a8761a;
  background: var(--amber-soft);
  border-color: #f0d79a;
}

.status-pill--done {
  color: var(--text-mute);
  background: var(--surface-2);
  border-color: var(--line);
}

/* ---------------------------- помощь ---------------------------- */

.help-blocks {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.help-blocks .card {
  padding: 16px 14px;
}

.help-blocks h2 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.help-lead {
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 29px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #ffd2c2;
}

.steps strong {
  color: var(--text);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.info-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 12px;
  background: #fff;
}

.info-list li:nth-child(even) {
  background: var(--surface-2);
}

.info-list span {
  flex: 0 0 auto;
  color: var(--text-mute);
}

.info-list strong {
  font-weight: 600;
  text-align: right;
  color: var(--text-dim);
}

.help-actions {
  display: flex;
  gap: 8px;
}

.help-actions .btn {
  flex: 1;
}

.help-hours {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-mute);
  text-align: center;
}
/* ---------------------------- нижняя навигация ---------------------------- */

.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 100%;
  max-width: 560px;
  padding: 7px 8px calc(7px + var(--safe-bottom));
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 -10px 30px -20px rgba(22, 34, 28, 0.45);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px 3px;
  border-radius: 12px;
  color: var(--text-mute);
  transition: color 0.2s, background 0.2s;
}

.tab__icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.5;
  filter: grayscale(1);
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

.tab__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tab:hover {
  color: var(--text-dim);
}

.tab.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.tab.is-active .tab__icon {
  filter: none;
  opacity: 1;
  transform: translateY(-1px);
}

.tab__badge {
  position: absolute;
  top: 1px;
  right: calc(50% - 22px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #f4663c, var(--primary-dark));
  box-shadow: 0 4px 10px -4px rgba(226, 85, 47, 0.9);
}

.tab__badge.is-bump {
  animation: badge-bump 0.35s ease;
}

@keyframes badge-bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------------------------- шторки ---------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(22, 34, 28, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlay-in 0.22s ease both;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay.is-closing {
  animation: overlay-out 0.2s ease both;
}

@keyframes overlay-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.sheet {
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 16px calc(20px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -22px 60px -30px rgba(22, 34, 28, 0.6);
  animation: sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.sheet.is-closing {
  animation: sheet-out 0.2s ease both;
}

@keyframes sheet-out {
  from { transform: none; }
  to { transform: translateY(100%); }
}

.sheet__handle {
  width: 44px;
  height: 4px;
  margin: 4px auto 12px;
  border-radius: 999px;
  background: var(--line-strong);
}
/* содержимое шторки товара */

.sheet-product__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 180px;
  margin: 0 -16px 14px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--g1, #ffe4d7), var(--g2, #ffb79e));
}

.sheet-product__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 30% 15%, rgba(255, 255, 255, 0.6), transparent 72%),
    linear-gradient(180deg, transparent 58%, rgba(255, 255, 255, 0.9));
  pointer-events: none;
}

.sheet-product__emoji {
  position: relative;
  z-index: 1;
  font-size: 88px;
  line-height: 1;
  text-shadow: 0 14px 20px rgba(22, 34, 28, 0.24);
}

.sheet-product__image {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 30px -18px rgba(22, 34, 28, 0.6);
}

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px -6px rgba(22, 34, 28, 0.4);
  font-size: 14px;
}

.sheet-product__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.sheet-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.sheet-product__price {
  flex: 0 0 auto;
  text-align: right;
}

.sheet-product__price .price__now {
  font-size: 21px;
}

.sheet-product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}

.sheet-product__note {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

.sheet-product__params {
  display: grid;
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.sheet-product__params div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-dim);
  background: #fff;
}

.sheet-product__params div:nth-child(even) {
  background: var(--surface-2);
}

.sheet-product__params span:first-child {
  color: var(--text-mute);
}

.sheet-product__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 35%);
}

.sheet-product__actions .btn {
  flex: 1;
}

/* шторка заказа */

.order-sheet__head {
  margin-bottom: 12px;
}

.order-sheet__id {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.order-sheet__date {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-mute);
}

.order-sheet__line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
}

.order-sheet__line strong {
  color: var(--text);
  text-align: right;
}

.order-sheet__lines {
  margin-bottom: 12px;
}

.order-sheet__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.order-sheet__actions .btn {
  flex: 1;
}

/* ---------------------------- уведомления ---------------------------- */

.toast-stack {
  position: fixed;
  right: 12px;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px);
  left: 12px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 420px;
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: rgba(22, 34, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  animation: toast-in 0.26s ease both;
  pointer-events: auto;
}

.toast.is-out {
  animation: toast-out 0.22s ease both;
}

.toast--ok {
  background: #1c7a58;
}

.toast--error {
  background: #a5342f;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(8px); }
}
/* ---------------------------- скелетоны ---------------------------- */

.skeleton-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.skeleton-card__media {
  aspect-ratio: 1 / 0.82;
  background-image: linear-gradient(100deg, #eef3ee 30%, #f9fbf8 50%, #eef3ee 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton-card__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px;
}

.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background-image: linear-gradient(100deg, #eef3ee 30%, #f9fbf8 50%, #eef3ee 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton-line--short {
  width: 60%;
}

@keyframes shimmer {
  from { background-position: 140% 0; }
  to { background-position: -60% 0; }
}

/* ---------------------------- успех ---------------------------- */

.success-screen {
  display: flex;
  justify-content: center;
  padding: 16px 0 24px;
}

.success-card {
  width: 100%;
  max-width: 520px;
  padding: 26px 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-card__icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  border-radius: 50%;
  font-size: 36px;
  background: radial-gradient(circle at 32% 26%, #ffffff, var(--mint-soft) 70%);
  border: 1px solid #bfe9e0;
  box-shadow: 0 18px 34px -22px rgba(15, 158, 142, 0.8);
}

.success-card h1 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.success-card__lead {
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}

.success-card__lead strong {
  color: var(--primary-dark);
}

.success-card__details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-align: left;
}

.success-card__details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-mute);
  background: #fff;
}

.success-card__details div:nth-child(even) {
  background: var(--surface-2);
}

.success-card__details strong {
  color: var(--text);
  text-align: right;
}

.success-card__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.success-card__actions .btn {
  flex: 1;
}

.success-card__note {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-mute);
}

/* ---------------------------- фиксы ---------------------------- */

/* блокировка прокрутки фона при открытой шторке:
   body фиксируется со сдвигом на текущую прокрутку,
   а место под скроллбар остаётся зарезервированным (scrollbar-gutter) */
html.is-locked body {
  position: fixed;
  top: var(--scroll-y, 0px);
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.product-card__media,
.product-card__name {
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  cursor: pointer;
}

.product-card__media {
  display: grid;
  place-items: center;
}

.product-card__media:focus-visible,
.product-card__name:focus-visible,
.add-btn:focus-visible,
.tab:focus-visible,
.cat-chip:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.product-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offline-bar .text-btn {
  color: #5a3c00;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sheet:focus,
.overlay:focus {
  outline: none;
}

/* ---------------------------- адаптив ---------------------------- */

@media (min-width: 420px) {
  .slot-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 560px) {
  .app-shell {
    padding-right: 20px;
    padding-left: 20px;
  }

  .app-header {
    margin: 0 -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .catalog-tools {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    padding: 26px 24px 24px;
  }

  .hero__art {
    height: 160px;
    margin-bottom: 14px;
  }

  .product-grid {
    gap: 14px;
  }

  .product-card__media {
    aspect-ratio: 1 / 0.78;
  }

  .product-card__emoji {
    font-size: 62px;
  }

  .product-card__name {
    font-size: 14px;
  }

  .price__now {
    font-size: 17.5px;
  }

  .add-btn {
    width: 38px;
    height: 38px;
  }

  .cart-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .cart-item__emoji {
    font-size: 34px;
  }
}

@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .usp-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overlay {
    align-items: center;
    padding: 20px;
  }

  .sheet {
    max-width: 620px;
    margin-bottom: 0;
    border-radius: 26px;
    border-bottom: 1px solid var(--line);
    animation-name: sheet-in-desktop;
  }

  @keyframes sheet-in-desktop {
    from {
      opacity: 0;
      transform: translateY(24px) scale(0.97);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .sheet-product__media {
    height: 220px;
  }

  .toast-stack {
    bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  }
}

@media (min-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero {
    flex-direction: row;
    align-items: center;
    min-height: 260px;
    padding: 32px;
  }

  .hero__art {
    width: 250px;
    height: 250px;
    margin: 0 0 0 auto;
  }

  .tab-bar {
    bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding-bottom: 7px;
  }

  .cart-foot {
    bottom: 96px;
  }
}

/* На телефонах убираем дорогие blur-эффекты: они заставляют браузер
   перерисовывать большие области при скролле и открытии шторки. */
@media (max-width: 979px), (hover: none) {
  .app-header,
  .catalog-tools,
  .cart-foot,
  .tab-bar,
  .overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .sheet {
    box-shadow: 0 -10px 28px -20px rgba(22, 34, 28, 0.55);
  }
}