@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/bebas-neue.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/manrope-cyrillic-800-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/manrope-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/manrope-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/manrope-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/manrope-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/manrope-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f3f4ef;
  --ink: #0c0e0b;
  --muted: rgba(12, 14, 11, 0.6);
  --surface: #ffffff;
  --violet: #391cca;
  --violet-soft: rgba(57, 28, 202, 0.12);
  --order: #e56b2e;
  --ok: #25b54c;
  --out: #b7b7b7;
  --icon: #f7f7f5;
  --line: rgba(12, 14, 11, 0.08);
  --font: Manrope, "Segoe UI", system-ui, sans-serif;
  --display: "Bebas Neue", Manrope, sans-serif;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  /* Keep layout width stable when one page scrolls and another doesn't */
  scrollbar-gutter: stable;
  overflow-y: scroll;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #e6e7e3;
  -webkit-font-smoothing: antialiased;
}
/* До проверки Mini App не мелькаем каталогом; через 2.5с всё равно показываем */
body.tg-check .app { visibility: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
/* iOS/Telegram WebView зумит поля <16px — все поля ввода ≥16px.
   Поиск оставляем 14px по макету (placeholder «Найти товар»). */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="search"]),
textarea,
select {
  font-size: 16px;
}
img { max-width: 100%; display: block; }

.app {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 16px; /* Figma 4007:20413 — p-16, h-76 */
  box-sizing: border-box;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.hello { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hello-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: #e4e4e2 center/cover no-repeat;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px; color: #6a6a68; flex: 0 0 44px;
}
.hello-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; min-width: 0; }
.hello-greet {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.6);
}
.hello-name {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.9);
}
.topbar-actions { display: flex; gap: 10px; align-items: center; }
/* Figma 4007:20420/20422 — bg #f7f7f5, border #f0f0eb, r=8, 40×40 */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #f0f0eb;
  background: var(--icon); /* #f7f7f5 */
  background-color: #f7f7f5;
  color: #0c0e0b;
  display: grid;
  place-items: center;
  position: relative;
  padding: 9px;
  box-sizing: border-box;
}
.icon-btn.is-on {
  color: inherit;
  background: #f7f7f5;
  background-color: #f7f7f5;
}
/* В шапке сердце — контур как в макете (без белой заливки с карточек) */
.topbar .icon-btn .icon-heart path {
  fill: none !important;
  stroke: currentColor;
  stroke-opacity: 0.8;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-bell,
.icon-heart {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}
.icon-heart--sm { width: 16px; height: 16px; }
.icon-heart--active { display: none; color: #d6154f; }
.fav-btn.is-on .icon-heart:not(.icon-heart--active) { display: none; }
.fav-btn.is-on .icon-heart--active { display: block; }
.icon-chevrons,
.icon-search,
.icon-filters,
.icon-trash,
.icon-close,
.icon-tab,
.icon-arrow-down {
  display: block;
  flex: 0 0 auto;
}
.icon-chevrons { width: 16px; height: 16px; }
.icon-chevrons--left { width: 20px; height: 20px; }
.icon-tab { width: 22px; height: 22px; }
.icon-search { width: 18px; height: 18px; }
.icon-filters { width: 16px; height: 16px; }
.icon-trash { width: 18px; height: 18px; }
.icon-close { width: 20px; height: 20px; }
.icon-arrow-down { width: 12px; height: 12px; }
.fav-badge, .cart-badge, .notes-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; width: 20px; height: 20px; padding: 0;
  border-radius: 99px; background: var(--violet); color: #fff;
  font-size: 10px; font-weight: 600; display: grid; place-items: center;
  line-height: 1.2; box-sizing: border-box;
}
.fav-badge[hidden], .cart-badge[hidden], .notes-badge[hidden] { display: none !important; }
.tab .cart-badge {
  top: -4px;
  right: calc(50% - 22px);
  width: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
}

/* 16px под белой шапкой до контента (Figma: header 76 → search/title y=92) */
.main { padding: 16px 16px 112px; }

/* Figma 4007:20806 — Mobile navigation: 370×60, inset 10, r=40, px16 py14 */
.dock {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(370px, calc(100% - 20px));
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.tabbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 0 20px rgba(12, 7, 36, 0.1);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 14px 16px;
  align-items: center;
  z-index: 1;
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  color: rgba(12, 14, 11, 0.6);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}
.tab > span:not(.cart-badge) {
  white-space: nowrap;
}
.tab .icon-tab,
.tab .icon-heart {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.tab.is-on { color: var(--violet); }

/* Product / notify tongue: CTA + tabs in one white panel */
.dock.dock--cta {
  bottom: 0;
  width: min(430px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(12, 7, 36, 0.08);
  padding: 16px 16px 20px;
  gap: 16px;
}
.dock.dock--cta .tabbar {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 10px;
}
.dock-cta .btn {
  width: 100%;
  height: 40px;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 0 10px rgba(12, 7, 36, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dock-cta .btn.soft {
  background: var(--violet-soft);
  color: var(--violet);
}

/* Cart / checkout: keep tabs inside the bottom tongue */
.app:has(#cart-footer:not([hidden])) .dock,
.app:has(.checkout-bar.dock-cart) .dock {
  bottom: 0;
  width: min(430px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(12, 7, 36, 0.08);
  padding: 0 16px 20px;
  gap: 12px;
  display: flex;
  flex-direction: column;
}
.app:has(#cart-footer:not([hidden])) .dock .tabbar,
.app:has(.checkout-bar.dock-cart) .dock .tabbar {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 10px;
}
.app:has(#cart-footer:not([hidden])) .main,
.app:has(.checkout-bar.dock-cart) .main {
  padding-bottom: 200px;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  /* Figma Раздел: title → search = 6; title → cats = 10 */
  margin: 0 0 6px;
}
.page-title-row:has(+ .cat-row) {
  margin-bottom: 10px;
}
.page-title-row .page-title { margin: 0; flex: 1 1 auto; min-width: 0; }
.page-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  color: #0c0e0b;
  text-transform: uppercase;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  max-width: 48%;
  padding: 4px 14px 4px 4px;
  border-radius: 10px;
  background: #fff;
  color: #0c0e0b;
  text-decoration: none;
}
.category-chip-media {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4ef;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
}
.category-chip-media img,
.category-chip-media .media-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.category-chip-name {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-info .page-title {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  text-transform: none;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.2;
  color: #0c0e0b;
}
.page-lead { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-height: 16px;
  margin: 0 0 12px;
  color: rgba(12, 14, 11, 0.6);
  text-decoration: none;
}
.back-link .icon-chevrons--left {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 16px;
  position: relative;
  top: 0.5px; /* optical align with Manrope caps */
}
.back-link-text {
  font-family: Manrope, var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(12, 14, 11, 0.6);
}
.section { margin: 24px 0 0; }
.section + .section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: #0c0e0b;
  text-transform: uppercase;
}
.section-title.sm {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}
.section-head .section-title { margin: 0; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--violet);
  background: var(--violet-soft);
  border-radius: 4px;
  padding: 6px 8px 6px 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.16;
  text-transform: uppercase;
}

.search-inline {
  display: flex; align-items: center; gap: 6px;
  min-height: 40px;
  background: #fff; border-radius: 8px;
  padding: 10px;
  margin: 0; /* home: 24px до секции через .section; catalog: 10px до tools */
  color: rgba(12, 14, 11, 0.6);
}
/* Figma Раздел: search → sort/filters = 10 */
.search-inline + .tool-row {
  margin-top: 10px;
}
.search-inline .icon-search {
  width: 20px;
  height: 20px;
  color: rgba(12, 14, 11, 0.6);
  flex: 0 0 20px;
}
.search-inline input {
  width: 100%; border: 0; background: transparent;
  padding: 0; outline: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: #0c0e0b;
  -webkit-text-fill-color: #0c0e0b;
}
.search-inline input::placeholder {
  color: rgba(12, 14, 11, 0.6);
  -webkit-text-fill-color: rgba(12, 14, 11, 0.6);
  opacity: 1;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

.cat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* Figma content stack: cats → search = 16 */
.cat-row--collection { margin: 0 0 16px; }
/* Figma 4007:2601 — card 114×149, pad 8/8/16/8, gap 10, r12; photo r8 inset */
.cat-card {
  background: #fff;
  border-radius: 12px;
  padding: 8px 8px 16px;
  text-decoration: none;
  color: inherit;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  text-align: center;
  box-sizing: border-box;
}
.cat-card.is-on { box-shadow: 0 0 0 1.5px var(--violet); }
.cat-card-media {
  width: 100%;
  margin: 0;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4ef;
  flex: 0 0 auto;
}
.cat-card-media img, .cat-card-media .media-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 8px;
  background: #f3f4ef;
}
.cat-card-name {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: #0c0e0b;
  width: 100%;
  text-align: center;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
/* display:flex выше перебивает UA [hidden] — без этого избранное показывает весь каталог */
.mini-card[hidden],
#fav-grid[hidden],
#fav-empty[hidden] {
  display: none !important;
}
.mini-card-media-wrap {
  position: relative;
  aspect-ratio: 1 / 0.8;
  width: 100%;
  box-sizing: border-box;
  padding: 2px;
  overflow: hidden;
  background: #fff;
  border-radius: 12px 12px 0 0;
}
.mini-card-media {
  display: block;
  width: 100%;
  height: 100%;
  background: #f3f3f1;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.mini-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.media-placeholder {
  width: 100%; height: 100%; min-height: 80px;
  background: linear-gradient(160deg, #efeae2, #e3ddd3);
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: Manrope, var(--font);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.badge-order { background: var(--order); }
.badge-out { background: var(--out); }
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0c0e0b;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.fav-btn.is-on {
  color: #d6154f;
  background: transparent;
}
.gallery-fav {
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 44px;
  background: #fff;
  color: #0c0e0b;
  box-shadow: 0 0 8px rgba(12, 7, 36, 0.1);
}
.gallery-fav svg {
  width: 20px;
  height: 20px;
}
.mini-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: 6px;
  margin-top: 0;
  padding: 12px 14px 14px;
  background: #fff;
  min-height: 0;
}
.price {
  font-family: var(--font);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  color: #0c0e0b;
  margin: 0;
}
.mini-card-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.8);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0;
}
.btn, a.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; border-radius: 12px; padding: 12px 14px;
  background: var(--violet); color: #fff; font-weight: 600; font-size: 14px;
  text-align: center;
}
/* Figma 4009:30384 — card CTA 148×32, r6, Manrope Medium 14 / violet-soft */
.card-cart {
  width: 100%;
  margin-top: 0;
}
.card-cart .btn-add[hidden],
.card-cart .card-qty[hidden] {
  display: none !important;
}
.card-cart .card-qty {
  width: 100%;
  height: 32px;
  min-height: 32px;
  justify-content: space-between;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 0 8px;
  background: var(--violet-soft);
  color: var(--violet);
}
.card-cart .card-qty .qty-btn {
  width: 28px;
  height: 28px;
  color: var(--violet);
  font-weight: 600;
}
.card-cart .card-qty .qty-val {
  min-width: 1.5ch;
  text-align: center;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
}
.btn-add,
a.btn-add {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  min-height: 32px;
  margin-top: 0; /* space-between в .mini-card-body */
  padding: 0 12px;
  border-radius: 6px;
  background: var(--violet-soft);
  color: var(--violet);
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
.btn.ghost, .btn-add.ghost, a.btn.ghost {
  background: var(--icon); color: var(--ink);
}
.btn.soft, a.btn.soft {
  background: var(--violet-soft); color: var(--violet);
}
.btn.pay, a.btn.pay { background: var(--ok); color: #fff; }
.btn.primary, a.btn.primary { background: var(--violet); color: #fff; }
.btn:disabled, .btn-add:disabled { opacity: 0.45; }
.btn[hidden],
a.btn[hidden],
button.btn[hidden] {
  display: none !important;
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  /* Figma Раздел: tools → grid = 16 */
  margin-bottom: 16px;
}
.sort-form { flex: 0 0 auto; width: auto; max-width: calc(100% - 108px); position: relative; z-index: 3; }
.sort-select { position: relative; }
.sort-select-trigger,
.filters-open {
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(12, 14, 11, 0.8);
  cursor: pointer;
}
.sort-select-trigger {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px 9px 12px;
}
.sort-select-trigger[aria-expanded="true"] {
  box-shadow: 0 0 0 2px var(--violet-soft);
  color: var(--violet);
}
.sort-select-chevron {
  flex: 0 0 auto;
  color: currentColor;
  transition: transform 0.15s ease;
}
.sort-select-trigger[aria-expanded="true"] .sort-select-chevron {
  transform: rotate(180deg);
}
.sort-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(12, 14, 11, 0.12);
  z-index: 5;
}
.sort-select-menu[hidden] { display: none; }
.sort-select-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(12, 14, 11, 0.8);
  cursor: pointer;
}
.sort-select-option:hover,
.sort-select-option:focus-visible {
  background: var(--icon);
  outline: none;
}
.sort-select-option.is-on {
  background: var(--violet-soft);
  color: var(--violet);
  font-weight: 600;
}
.filters-open {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 12px 9px 10px;
}
.filters-open .icon-filters {
  width: 14px;
  height: 14px;
  color: rgba(12, 14, 11, 0.8);
}
.filters-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
}
.filters-sheet {
  border: 0;
  padding: 0;
  background: transparent;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  top: auto;
  transform: translateX(-50%);
  width: min(430px, 100vw);
  max-width: 430px;
  margin: 0;
  max-height: 88vh;
}
.filters-sheet::backdrop { background: rgba(20, 18, 16, 0.45); }
.sheet-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px 16px 16px;
  max-height: 82vh;
  overflow: auto;
  box-sizing: border-box;
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; }
.sheet-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  color: #0c0e0b;
}
.sheet-close {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  width: 20px; height: 20px;
  color: var(--ink); display: grid; place-items: center;
  flex: 0 0 20px;
}
.sheet-close svg { width: 20px; height: 20px; display: block; }
.filters {
  display: flex;
  flex-direction: column;
  gap: 52px;
}
.filters-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.filters-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filter-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.filter-label {
  display: block;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(12, 14, 11, 0.9);
}
.filter-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.filter-price { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.field input, .field textarea, .checkout-form textarea, .checkout-form .field input,
.modal-card input, .modal-card textarea, .search input {
  width: 100%; border: 0; background: #fff; border-radius: 14px; padding: 14px 12px;
  font-size: 16px;
}
.modal-card input, .modal-card textarea, .search input { background: #f6f4f0; }
.filters .filter-price input {
  width: 100%;
  border: 1px solid #ebebe4;
  background: #f7f7f5;
  border-radius: 8px;
  padding: 11px 14px;
  min-height: 40px;
  font-family: var(--font);
  font-size: 16px !important; /* ≥16px — без автозума в iOS/Telegram */
  font-weight: 400;
  line-height: 1.3;
  color: #0c0e0b;
  -webkit-text-fill-color: #0c0e0b;
  appearance: textfield;
  -moz-appearance: textfield;
  box-sizing: border-box;
  outline: none;
}
.filters .filter-price input:focus,
.filters .filter-price input:focus-visible {
  outline: none;
  border-color: #ebebe4;
  box-shadow: none;
}
.filters .filter-price input::placeholder {
  color: rgba(12, 14, 11, 0.4);
  -webkit-text-fill-color: rgba(12, 14, 11, 0.4);
  opacity: 1;
}
.filters .filter-price input::-webkit-outer-spin-button,
.filters .filter-price input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.radio-row input[type="radio"],
.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  flex: 0 0 20px;
  border: 1.5px solid #d0d0d0;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
}
.radio-row input[type="radio"] { border-radius: 50%; }
.check-row input[type="checkbox"] { border-radius: 4px; }
.radio-row input[type="radio"]:checked,
.check-row input[type="checkbox"]:checked {
  border-color: var(--violet);
  background-color: var(--violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6.666 10.667 8.666 12.667 13.333 8' stroke='%23fff' stroke-width='1.2' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}
.price-presets, .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.filter-chips { gap: 4px; }
.price-presets button {
  border: 0;
  background: var(--violet-soft);
  color: var(--violet);
  border-radius: 30px;
  padding: 0 12px;
  height: 26px;
  min-height: 26px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: 0;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ebebe4;
  background: #f7f7f5;
  border-radius: 38px;
  padding: 0 16px;
  height: 36px;
  min-height: 36px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: rgba(12, 14, 11, 0.8);
  cursor: pointer;
  box-sizing: border-box;
}
.filter-chip input { position: absolute; opacity: 0; pointer-events: none; }
.filter-chip.is-on {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: var(--violet);
}
.filters .filter-submit,
.filters .filter-reset {
  margin: 0;
  width: 100%;
  height: 40px;
  min-height: 40px;
  border-radius: 6px;
  padding: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filters .filter-submit {
  background: var(--violet);
  color: #fff;
}
/* Figma 4009:25843 — #f3f4ef / ink; beat a.btn.ghost (#f7f7f5) */
.filters a.btn.ghost.filter-reset,
.filters .filter-reset {
  background: #f3f4ef;
  color: #0c0e0b;
  box-shadow: none;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 56px 24px 32px;
}
/* display:flex перебивает UA [hidden] */
.empty-state[hidden] {
  display: none !important;
}
.empty-art {
  display: block;
  width: 122px;
  height: 96px;
  margin: 0;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
}
.empty-art--envelope {
  width: 139px;
  height: 110px;
}
.empty-state-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 220px;
}
.empty-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.empty-title {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.9);
}
.empty {
  margin: 0 auto 16px;
  max-width: 240px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.empty-state .empty {
  margin: 0;
  max-width: 193px;
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.7);
}
.empty-state .btn {
  width: 100%;
  min-width: 0;
  padding: 15px 24px;
  border-radius: 6px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.cart-select-all {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.cart-select-all input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 4px;
  border: 1.5px solid #d0d0d0;
  background: #fff;
  box-sizing: border-box;
  flex: 0 0 20px;
  cursor: pointer;
}
.cart-select-all input:checked {
  border-color: var(--violet);
  background-color: var(--violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6.666 10.667 8.666 12.667 13.333 8' stroke='%23fff' stroke-width='1.2' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}
.cart-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
}
/* Figma 4009:28667 — checkout line row 334×76 */
.line-card {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  min-height: 76px;
  background: transparent;
  border-radius: 0;
  box-sizing: border-box;
}
.line-card--unavailable { opacity: 0.72; }
.line-card__media {
  flex: 0 0 75px;
  width: 75px;
  height: 76px;
  padding: 4px;
  border-radius: 8px;
  background: #f3f4ef;
  box-sizing: border-box;
  overflow: hidden;
}
.line-card__media img,
.line-card__media .line-thumb {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  background: #f3f4ef;
}
.line-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 76px;
  box-sizing: border-box;
}
.line-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  min-height: 20px;
}
.line-card__price {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: #0c0e0b;
}
.line-card__title {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.8);
}
.checkout-stock-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4f2;
}
.order-stock-note {
  display: none;
}
.cart-item--unavailable {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  opacity: 0.9;
  padding: 12px;
}
.cart-item-main {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 95px;
}
.cart-item-media-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 95px;
  height: 95px;
  padding: 0;
  border-radius: 8px;
  background: #f3f4ef;
  box-sizing: border-box;
}
.cart-check {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  width: 20px; height: 20px; margin: 0;
  cursor: pointer;
}
/* Не нулевого размера — иначе в Telegram WebView тап по галочке часто мимо */
.cart-check input {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.cart-check span {
  display: block; width: 20px; height: 20px; border-radius: 4px;
  background: #fff; border: 1.5px solid #d0d0d0;
  box-sizing: border-box;
  pointer-events: none;
}
.cart-check input:checked + span {
  background-color: var(--violet);
  border-color: var(--violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6.666 10.667 8.666 12.667 13.333 8' stroke='%23fff' stroke-width='1.2' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}
.cart-item-media {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
}
.line-thumb,
.cart-item--unavailable .cart-item-media {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
  background: var(--icon); object-fit: cover; display: block;
}
.cart-item-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  mix-blend-mode: darken;
}
.cart-item-total { display: none; }
.cart-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
}
.cart-item-price {
  font-family: var(--font);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cart-item-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.cart-item-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.cart-item-tools {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.cart-icon-btn {
  width: 32px;
  height: 32px;
  padding: 7px;
  box-sizing: border-box;
  border: 1px solid #f0f0eb;
  border-radius: 8px;
  background: #f7f7f5;
  color: rgba(12, 14, 11, 0.8);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cart-icon-btn .icon-heart,
.cart-icon-btn .icon-trash {
  width: 16px;
  height: 16px;
}
.cart-icon-btn.fav-btn {
  position: relative; top: auto; right: auto;
  width: 32px; height: 32px; border-radius: 8px;
  background: #f7f7f5;
}
.cart-icon-btn.fav-btn.is-on {
  color: #d6154f;
  background: #fde8ef;
  border-color: #f5d0dc;
}
.cart-item--unavailable .cart-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #f0f0eb;
  border-radius: 8px;
}
.cart-unavailable { margin-top: 20px; }
.cart-unavailable-title {
  margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--muted);
}
.qty-row, .qty-pill {
  display: flex; align-items: center; gap: 6px; margin: 0;
  background: var(--icon); border-radius: 999px; padding: 4px 8px;
  font-size: 14px; font-weight: 600;
}
.cart-qty {
  gap: 16px;
  padding: 7px;
  border-radius: 8px;
  border: 1px solid #f0f0eb;
  background: var(--icon);
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.8);
}
.cart-qty .qty-val {
  min-width: 1ch;
  text-align: center;
}
.qty-pill {
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.8);
  background: #f3f4ef;
  white-space: nowrap;
}
.qty-btn {
  width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  font-size: 16px; line-height: 1;
  color: inherit;
  display: grid; place-items: center; padding: 0;
}
.cart-qty .qty-btn {
  width: 16px; height: 16px; border-radius: 0;
}
.link-danger {
  margin: 0; width: 32px; height: 32px; border: 0; background: transparent;
  color: rgba(12, 14, 11, 0.45); cursor: pointer; display: grid; place-items: center;
}
.cart-footer,
.checkout-bar.dock-cart {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 1;
  width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 16px 0 0;
  margin: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  order: -1;
}
.cart-footer[hidden] { display: none !important; }
.checkout-bar:not(.dock-cart) {
  background: #fff; border-radius: 16px; padding: 12px; margin-top: 4px;
}
.qty-btn:disabled,
.qty-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  margin: 0;
}
.cart-total span {
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}
.cart-total strong {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
/* Figma 4009:28899 — cart CTA 358×48, r8, Manrope SemiBold 16 */
.cart-footer .btn,
.checkout-bar.dock-cart .btn,
.checkout-bar.dock-cart .btn-checkout {
  width: 100%;
  height: 48px;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  box-sizing: border-box;
}

/* Figma 4009:28338 — title y=100 after header 76 → +8 to main 16 = 24 */
.checkout-title {
  margin: 8px 0 16px;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
}
/* Figma 4009:28667 — card pad 12, r16 */
.checkout-items-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 10px; /* items → Итого */
  box-sizing: border-box;
}
.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
/* Figma: after 12 gap → 1px #f3f4ef → 12 before next row */
.checkout-items .line-card + .line-card {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid #f3f4ef;
}
/* Figma qty chip 46×20, r6, #f7f7f5 / #f0f0eb, Manrope Bold 14 */
.checkout-items .qty-pill {
  flex: 0 0 auto;
  height: 20px;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #f0f0eb;
  background: #f7f7f5;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: rgba(12, 14, 11, 0.8);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.checkout-items .line-card__body > .avail {
  margin-top: 0;
}
.checkout-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  margin: 0 0 24px; /* Итого → способ получения */
}
.checkout-subtotal span {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}
.checkout-subtotal strong {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
/* order-card styled below near order page section */
.order-details {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px; /* способ ↔ получатель */
}
.checkout-card,
.checkout-summary,
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin: 0;
  border: 0;
  min-inline-size: 0;
}
/* Figma fulfillment card: vertical gap 14 */
.checkout-card:not(.checkout-recipient) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.checkout-card__title {
  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #0c0e0b;
}
.checkout-radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pickup-box {
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #ebebe4;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.pickup-box__label {
  margin: 0 0 3px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #0c0e0b;
}
.pickup-box__addr {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #0c0e0b;
}
.checkout-address { margin-top: 0; }
.checkout-recipient {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.checkout-recipient .checkout-card__title { margin: 0 0 6px; } /* + fields gap 8 = 14 to first field */
.checkout-recipient-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.checkout-recipient .field { gap: 6px; }
.checkout-consents {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  width: 100%;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}
.field > span,
.field-label {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.checkout .field input,
.checkout .field textarea,
.checkout-form .field input,
.checkout-form .field textarea {
  width: 100%;
  border: 1px solid #ebebe4;
  background: #fff;
  border-radius: 8px;
  padding: 11px 14px;
  min-height: 40px;
  font-family: var(--font);
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.3;
  color: #0c0e0b;
  -webkit-text-fill-color: #0c0e0b;
  box-sizing: border-box;
  resize: vertical;
}
.checkout .field textarea,
.checkout-form .field textarea {
  min-height: 80px;
  height: 80px;
}
.checkout .field input::placeholder,
.checkout .field textarea::placeholder {
  color: rgba(12, 14, 11, 0.4);
  -webkit-text-fill-color: rgba(12, 14, 11, 0.4);
  opacity: 1;
}
.checkout-lines { margin: 8px 0; padding-left: 18px; }
.radio-row, .check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
}
.check-row span, .radio-row span {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}
.check-row a {
  color: var(--violet);
  text-decoration: underline;
}
.phone-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.phone-row input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.phone-row .btn-telegram {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 40px;
  padding: 11px 14px 11px 12px;
  border-radius: 8px;
  border: 1px solid rgba(57, 28, 202, 0.2);
  background: rgba(57, 28, 202, 0.08);
  color: #391cca;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: none;
}
.phone-row .btn-telegram .icon-copy {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #391cca;
}
.checkout .check-row {
  gap: 6px;
  align-items: center;
}
.checkout .check-row span {
  color: rgba(12, 14, 11, 0.8);
  line-height: 1.2;
}
.checkout .check-row input[type="checkbox"] {
  border-color: rgba(12, 14, 11, 0.1);
}
.form-msg { color: #b42318; }
.meta { color: var(--muted); font-size: 13px; }
.prose { line-height: 1.5; font-size: 15px; }
.crumbs { display: none; }

.product {
  margin: 0 -16px;
  padding: 0 0 50px;
}
.app:has(.dock--cta) .main {
  /* padding-bottom: 160px; */
}
.product .gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product .gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f3f4ef;
}
.gallery-viewport {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  cursor: grab;
}
.gallery-viewport.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
  touch-action: none;
}
.gallery-viewport::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  cursor: zoom-in;
}
.fancybox__container {
  --fancybox-zIndex: 80;
  z-index: 80;
}
.gallery-slide img,
.gallery-main > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.gallery-back {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  width: 40px; height: 40px; border-radius: 44px; background: #fff;
  color: #0c0e0b;
  display: grid; place-items: center;
  box-shadow: 0 0 8px rgba(12, 7, 36, 0.1);
}
.gallery-back .icon-chevrons--left,
.gallery-back svg {
  width: 20px;
  height: 20px;
}
.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 4px;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(12, 7, 36, 0.12));
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: width 0.2s ease, background 0.2s ease;
}
.gallery-dot.is-on {
  width: 20px;
  background: #fff;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.thumb.is-active::before,
.thumb.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-sizing: border-box;
  pointer-events: none;
}
.thumb.is-active::before {
  z-index: 1;
  border: 4px solid #f3f4ef;
}
.thumb.is-active::after {
  z-index: 2;
  border: 2px solid var(--violet);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }
.product-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 20px 16px 0;
}
.product-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.product-price-row .avail {
  align-self: center;
}
.price.xl {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}
.avail {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 4px 8px;
  color: #fff;
  white-space: nowrap;
  box-sizing: border-box;
}
.avail-in_stock { background: var(--ok); }
.avail-in_transit { background: #2d5fbe; }
.avail-on_order { background: var(--order); }
.avail-out { background: var(--out); }
.product-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 14px;
}
.product-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.block-label {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #0c0e0b;
}
.specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
}
.spec-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #0c0e0b;
}
.spec-row dt,
.spec-row dd {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}
.product .prose {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #0c0e0b;
}
.product .prose p { margin: 0 0 0.6em; }
.product .prose p:last-child { margin-bottom: 0; }
.product .prose ul {
  margin: 0 0 0.6em;
  padding-left: 21px;
}
.product-actions { margin: 14px 0; }
.modal {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(380px, calc(100% - 24px));
  margin: auto;
}
.modal-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Want modal — sheet chrome + fields from Figma 4009:28803 (recipient form) */
.want-modal {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  top: auto;
  transform: translateX(-50%);
  width: min(430px, 100vw);
  max-width: 430px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  max-height: 92vh;
}
.want-modal::backdrop {
  background: rgba(20, 18, 16, 0.45);
}
.want-modal .modal-card {
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px 16px 16px;
  gap: 18px;
  max-height: 88vh;
  overflow: auto;
  box-sizing: border-box;
}
.want-modal .sheet-head {
  margin: 0;
  align-items: flex-start;
}
.want-modal .sheet-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #0c0e0b;
}
.want-lead {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(12, 14, 11, 0.8);
}
.want-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.want-modal .field {
  gap: 6px;
}
.want-modal .field-label {
  color: rgba(12, 14, 11, 0.9);
}
.want-modal .field input,
.want-modal .field textarea {
  width: 100%;
  border: 1px solid #ebebe4;
  background: #fff;
  border-radius: 8px;
  padding: 11px 14px;
  min-height: 40px;
  font-family: var(--font);
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.3;
  color: #0c0e0b;
  -webkit-text-fill-color: #0c0e0b;
  box-sizing: border-box;
  outline: none;
  resize: vertical;
}
.want-modal .field textarea {
  min-height: 80px;
  height: 80px;
}
.want-modal .field input::placeholder,
.want-modal .field textarea::placeholder {
  color: rgba(12, 14, 11, 0.4);
  -webkit-text-fill-color: rgba(12, 14, 11, 0.4);
  opacity: 1;
}
.want-modal .field input:focus,
.want-modal .field textarea:focus,
.want-modal .field input:focus-visible,
.want-modal .field textarea:focus-visible {
  outline: none;
  border-color: #ebebe4;
  box-shadow: none;
}
.want-modal .phone-row .btn-telegram,
.want-modal .phone-row .btn.soft {
  flex: 0 0 auto;
  width: auto;
  height: 40px;
  min-height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(57, 28, 202, 0.2);
  background: rgba(57, 28, 202, 0.08);
  color: #391cca;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: none;
}
.want-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0;
}
.want-actions .btn {
  width: 100%;
  height: 40px;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  box-sizing: border-box;
  box-shadow: none;
}
.want-actions .btn.ghost {
  background: #f3f4ef;
  color: #0c0e0b;
}
.want-modal .form-msg {
  margin: 0;
}
.order-comment-label,
.order-field-label {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(12, 14, 11, 0.9);
  margin: 0;
}
.btn.pay.is-paid,
button.btn.pay.is-paid {
  background: var(--ok);
  color: #fff;
  opacity: 1;
  cursor: default;
}
.row { display: flex; gap: 8px; }

.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.note-card {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: flex-start;
  background: #fff; border-radius: 16px; padding: 14px 12px; text-decoration: none; color: inherit;
  border: 1px solid transparent;
}
.note-card.is-unread {
  border-color: rgba(57, 28, 202, 0.18);
  background: #f7f5ff;
}
.note-icon {
  width: 44px; height: 44px; border-radius: 12px; background: #f0efeb;
  display: grid; place-items: center; color: #6b6b6b; flex: 0 0 auto;
}
.note-card.is-unread .note-icon {
  background: rgba(57, 28, 202, 0.12);
  color: var(--violet);
}
.note-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.note-title {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.note-text {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(12, 14, 11, 0.78);
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.orders-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.orders-item-link { display: block; background: #fff; border-radius: 16px; padding: 12px; }
.orders-item-top { display: flex; justify-content: space-between; gap: 8px; }
.order-card {
  background: #fff;
  border: 1px solid #fff;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.order-card-head { margin: 0; }
.order-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.order-head-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.order-number {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.order-amount {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  color: #0c0e0b;
  white-space: nowrap;
}
.order-date {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  background: var(--order);
  border-radius: 6px;
  padding: 8px 12px;
  white-space: nowrap;
  box-sizing: border-box;
}
.order-status-badge.sm {
  padding: 4px 8px;
  font-size: 12px;
}
.status-paid, .status-assembling, .status-shipped, .status-delivered { background: var(--ok); }
.status-canceled { background: var(--out); }
.order-rule {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: #f3f4ef;
  flex: 0 0 auto;
}
.order-rule[hidden] { display: none !important; }
.order-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.order-section[hidden],
.order-field[hidden],
.order-box[hidden],
.order-rule[hidden] {
  display: none !important;
}
.order-section--fields {
  gap: 10px;
}
.order-section-title {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: rgba(12, 14, 11, 0.9);
}
.order-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.order-line + .order-line {
  border-top: 1px solid #f3f4ef;
  padding-top: 12px;
}
.order-line-media {
  flex: 0 0 75px;
  width: 75px;
  height: 75px;
  padding: 0;
  border-radius: 8px;
  background: #f3f4ef;
  box-sizing: border-box;
  overflow: hidden;
  align-self: stretch;
}
.order-line-media img,
.order-line-media-empty {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  mix-blend-mode: darken;
}
.order-line-media-empty {
  background: #f3f4ef;
  mix-blend-mode: normal;
}
.order-line-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  box-sizing: border-box;
}
.order-line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.order-line-price {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #0c0e0b;
  white-space: nowrap;
}
.order-line-qty {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #f0f0eb;
  background: #f7f7f5;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: rgba(12, 14, 11, 0.8);
  white-space: nowrap;
  box-sizing: border-box;
}
.order-line-title {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(12, 14, 11, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-boxes,
.order-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.order-field {
  gap: 6px;
}
.order-box {
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #ebebe4;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(12, 14, 11, 0.9);
  word-break: break-word;
}
.order-box[hidden] { display: none !important; }
.order-box--tall {
  min-height: 80px;
}
.order-poll-hint {
  margin: 0;
}
.order-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  width: 100%;
}
.order-actions .btn.pay {
  width: 100%;
  min-height: 0;
  padding: 18px 16px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 4px;
}
.page-chip {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ebebe4;
  background: #f7f7f5;
  border-radius: 38px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: rgba(12, 14, 11, 0.8);
  text-decoration: none;
  box-sizing: border-box;
}
.page-chip.is-on {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: var(--violet);
  font-weight: 600;
}
.page-chip--nav {
  padding: 0;
  width: 36px;
}
.page-chip.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.page-ellipsis {
  min-width: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 36px;
}

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #1b1b1b; color: #fff; border-radius: 999px; padding: 10px 14px;
  z-index: 40;
}
.toast.is-on { display: block; }
.shop-toast-container.swal2-container {
  z-index: 90;
  /* под sticky-шапкой; высота считается в showToast */
  padding-top: var(--toast-top, 84px) !important;
  box-sizing: border-box;
}
.shop-toast.swal2-popup.swal2-toast {
  font-family: var(--font);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(12, 14, 11, 0.12);
}
.search-modal {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: min(430px, calc(100vw - 16px));
  margin: 0;
  border: 0;
  border-radius: 18px;
  padding: 12px;
  background: #fff;
}
.search-modal input[type="search"],
.search input {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #0c0e0b;
  -webkit-text-fill-color: #0c0e0b;
}
.search-modal input[type="search"]::placeholder,
.search input::placeholder {
  color: rgba(12, 14, 11, 0.6);
  -webkit-text-fill-color: rgba(12, 14, 11, 0.6);
  opacity: 1;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}
.search-hit {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  color: var(--ink);
}
.search-hit-title {
  color: var(--ink);
  font-weight: 500;
}
.search-hit-price {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}
.search-hit-media img, .search-hit-media .media-placeholder { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.log, .warn-box, .badge { font-size: 13px; }
.warn-box { background: #fff7e8; }
