:root {
  color-scheme: light;
  --app-height: 100dvh;
  --tg-safe-top: env(safe-area-inset-top, 0px);
  --tg-safe-right: env(safe-area-inset-right, 0px);
  --tg-safe-bottom: env(safe-area-inset-bottom, 0px);
  --tg-safe-left: env(safe-area-inset-left, 0px);
  --ink: #102033;
  --muted: #677487;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --line: #dfe7ed;
  --blue: #12345a;
  --blue-2: #1f4f7d;
  --green: #2f8b46;
  --green-2: #216b37;
  --gold: #c79a3d;
  --soft-blue: #edf4f9;
  --soft-green: #edf7f0;
  --danger: #b42318;
  --shadow: 0 16px 36px rgba(16, 32, 51, 0.09);
}

* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  min-width: 320px;
  min-height: var(--app-height);
  overscroll-behavior-y: contain;
  background:
    linear-gradient(180deg, rgba(237, 244, 249, 0.9) 0%, var(--bg) 36rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-y;
}

button,
input,
select,
textarea {
  min-width: 0;
  font: inherit;
}

button {
  max-width: 100%;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

button:active {
  transform: scale(0.98);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app {
  width: 100%;
  max-width: 820px;
  min-height: var(--app-height);
  margin: 0 auto;
  padding: 0 max(10px, var(--tg-safe-right)) calc(122px + var(--tg-safe-bottom)) max(10px, var(--tg-safe-left));
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .app {
    overflow-x: hidden;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  margin: 0 -12px;
  min-height: 58px;
  padding: calc(var(--tg-safe-top) + 6px) max(14px, var(--tg-safe-right)) 8px max(14px, var(--tg-safe-left));
  border-bottom: 1px solid rgba(223, 231, 237, 0.78);
  background: rgba(244, 247, 246, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-title {
  min-width: 0;
  text-align: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-subtitle {
  display: none !important;
}

.install-button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.panel {
  display: block;
  padding-top: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.home-panel {
  display: grid;
  gap: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 10%, rgba(199, 154, 61, 0.24), transparent 30%),
    linear-gradient(145deg, #0c2238 0%, #14385a 58%, #1d6a3d 100%);
  color: #fff;
  box-shadow: 0 22px 52px rgba(16, 32, 51, 0.22);
}

.page-fade {
  animation: fade-in 0.22s ease-out both;
}

.hero-card {
  display: grid;
  gap: 12px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 750;
}

.hero h1 {
  max-width: 560px;
  margin-bottom: 0;
  font-size: clamp(25px, 7vw, 36px);
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.38;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
}

.hero-search input {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 0 14px;
}

.hero-search button,
.primary,
#submit,
.manager-help button {
  min-height: 48px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--green), var(--green-2));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(33, 107, 55, 0.24);
}

.hero-search button {
  padding: 0 16px;
}

.hero-catalog-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.status {
  min-height: 20px;
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.status:empty {
  display: none;
}

.toast-stack {
  position: fixed;
  right: max(14px, calc((100vw - 820px) / 2 + 14px));
  bottom: calc(86px + var(--tg-safe-bottom));
  left: max(14px, calc((100vw - 820px) / 2 + 14px));
  z-index: 80;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.pull-refresh {
  --pull-progress: 0;
  position: fixed;
  top: calc(var(--tg-safe-top) + 2px);
  left: 50%;
  z-index: 90;
  display: grid;
  min-height: 42px;
  min-width: 176px;
  place-items: center;
  gap: 6px;
  padding: 7px 16px 8px;
  border: 1px solid rgba(210, 220, 228, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -44px, 0);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.14);
}

.pull-refresh span {
  line-height: 1;
}

.pull-refresh i {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 52, 90, 0.13);
}

.pull-refresh i b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transform: scaleX(var(--pull-progress));
  transform-origin: left center;
  transition: transform 0.08s linear;
}

.pull-refresh.visible {
  opacity: 1;
}

.pull-refresh.ready {
  background: var(--blue);
  color: #fff;
}

.pull-refresh.ready i {
  background: rgba(255, 255, 255, 0.22);
}

.pull-refresh.ready i b {
  background: #fff;
}

.toast {
  justify-self: center;
  max-width: min(520px, 100%);
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(16, 32, 51, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  box-shadow: 0 16px 34px rgba(16, 32, 51, 0.24);
  animation: toast-in 0.18s ease-out both;
}

.toast.hide {
  animation: toast-out 0.22s ease-in both;
}

.section-block {
  display: grid;
  gap: 11px;
  min-width: 0;
  max-width: 100%;
}

.section-block > * {
  min-width: 0;
  max-width: 100%;
}

.quick-mode-block,
.catalog-node-block,
.compact-block {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.07);
}

.quick-mode-block {
  display: grid;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2 {
  margin-bottom: 3px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.section-head,
.compact-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h2,
.compact-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

.catalog-nested-section {
  display: grid;
  gap: 11px;
  margin-top: 6px;
}

.quick-mode-grid,
.node-grid,
.part-grid,
.vehicle-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
}

.vehicle-brand-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 10px;
  align-items: stretch;
}

.part-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 10px;
  align-items: stretch;
}

.node-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr));
  gap: 14px 10px;
  align-items: start;
}

.quick-mode-card,
.part-card,
.vehicle-brand-card {
  min-height: 72px;
  padding: 13px;
  border: 1px solid rgba(220, 228, 234, 0.9);
  border-radius: 20px;
  background: #fff;
  contain: layout paint style;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 16px rgba(16, 42, 67, 0.06);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.node-card {
  --node-a: #12345a;
  --node-b: #2f8b46;
  --node-c: #c79a3d;
  display: grid;
  contain: layout paint style;
  min-width: 0;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  box-shadow: none;
  outline: none;
}

.node-card[data-node="engine"] {
  --node-a: #12345a;
  --node-b: #2f8b46;
  --node-c: #c79a3d;
}

.node-card[data-node="transmission"] {
  --node-a: #16395f;
  --node-b: #4a5568;
  --node-c: #7ba7d8;
}

.node-card[data-node="suspension"] {
  --node-a: #12345a;
  --node-b: #65758a;
  --node-c: #2f8b46;
}

.node-card[data-node="pneumatic"] {
  --node-a: #143b58;
  --node-b: #2f8b46;
  --node-c: #d7a84c;
}

.node-card[data-node="brakes"] {
  --node-a: #5b1723;
  --node-b: #b63a43;
  --node-c: #c79a3d;
}

.node-card[data-node="cabin"] {
  --node-a: #102033;
  --node-b: #1f4f7d;
  --node-c: #6f879d;
}

.node-card[data-node="body"] {
  --node-a: #102033;
  --node-b: #2f8b46;
  --node-c: #7ba7d8;
}

.node-card[data-node="optic"] {
  --node-a: #12345a;
  --node-b: #1f8ab8;
  --node-c: #f1c45a;
}

.node-card[data-node="electric"] {
  --node-a: #102033;
  --node-b: #4f46a8;
  --node-c: #c79a3d;
}

.node-card[data-node="trailer"] {
  --node-a: #143b58;
  --node-b: #677487;
  --node-c: #2f8b46;
}

.node-visual {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(210, 220, 228, 0.88);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--node-a), var(--node-b));
  background:
    radial-gradient(circle at 80% 18%, color-mix(in srgb, var(--node-c) 42%, transparent), transparent 30%),
    radial-gradient(circle at 18% 82%, color-mix(in srgb, var(--node-b) 34%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--node-a) 88%, #ffffff 12%), color-mix(in srgb, var(--node-b) 70%, #102033 30%));
  box-shadow: 0 8px 18px rgba(16, 42, 67, 0.11);
}

.node-visual::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  clip-path: polygon(0 20%, 78% 20%, 100% 50%, 78% 80%, 0 80%);
}

.node-visual::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 13%;
  width: 20%;
  aspect-ratio: 1;
  border: 5px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
}

.node-visual img {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.node-visual img[hidden] {
  display: none;
}

.node-visual.image-missing::before,
.node-visual.image-missing::after {
  opacity: 1;
}

.node-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 54%;
  aspect-ratio: 1.55 / 1;
  border: 5px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(90deg, transparent 34%, rgba(255, 255, 255, 0.2) 34% 45%, transparent 45%),
    color-mix(in srgb, var(--node-c) 28%, rgba(255, 255, 255, 0.14));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 10px 18px rgba(16, 32, 51, 0.18);
}

.node-icon::before,
.node-icon::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.46);
}

.node-icon::before {
  left: -14%;
  top: 42%;
  width: 128%;
  height: 8px;
  border-radius: 999px;
}

.node-icon::after {
  right: 12%;
  top: -18%;
  width: 32%;
  height: 32%;
  border-radius: 8px;
}

.node-card[data-node="engine"] .node-icon::after,
.node-card[data-node="electric"] .node-icon::after {
  box-shadow:
    -36px 0 0 rgba(255, 255, 255, 0.34),
    -18px 0 0 rgba(255, 255, 255, 0.4);
}

.node-card[data-node="suspension"] .node-icon,
.node-card[data-node="trailer"] .node-icon {
  border-radius: 999px;
  background: transparent;
}

.node-card[data-node="suspension"] .node-icon::before,
.node-card[data-node="trailer"] .node-icon::before {
  top: 44%;
  height: 10px;
  transform: rotate(-12deg);
}

.node-card[data-node="brakes"] .node-icon,
.node-card[data-node="optic"] .node-icon {
  border-radius: 999px;
  background: color-mix(in srgb, var(--node-c) 32%, rgba(255, 255, 255, 0.12));
}

.node-card[data-node="brakes"] .node-icon::after,
.node-card[data-node="optic"] .node-icon::after {
  inset: 22%;
  width: auto;
  height: auto;
  border: 5px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: transparent;
}

.node-card[data-node="pneumatic"] .node-icon,
.node-card[data-node="cabin"] .node-icon,
.node-card[data-node="body"] .node-icon {
  border-radius: 18px 28px 16px 18px;
}

.quick-mode-card:active,
.node-card:active,
.part-card:active,
.vehicle-brand-card:active {
  transform: scale(0.975);
}

@media (hover: hover) {
  .quick-mode-card:hover,
  .node-card:hover,
  .part-card:hover,
  .vehicle-brand-card:hover {
    transform: translateY(-2px);
    border-color: rgba(26, 127, 60, 0.35);
    box-shadow: 0 16px 34px rgba(16, 42, 67, 0.13);
  }
}

.quick-mode-card b,
.node-card b,
.part-card b,
.vehicle-brand-card b {
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
}

.node-card b {
  min-width: 0;
  margin-top: 1px;
  font-size: clamp(12px, 3.1vw, 14px);
  overflow-wrap: anywhere;
}

.quick-mode-card small,
.node-card small,
.part-card small,
.vehicle-brand-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.node-card small {
  margin-top: -3px;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.vehicle-brand-card.muted {
  background: #f3f7f6;
}

.catalog-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
}

.catalog-filter-card {
  min-height: 64px;
  border-color: rgba(26, 127, 60, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf7 100%);
}

.part-card {
  min-height: 108px;
  padding: 13px 8px 11px;
  border-radius: 18px;
  display: grid;
  grid-template-rows: minmax(42px, auto) 18px;
  place-items: center;
  gap: 7px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(18, 52, 90, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
}

.part-image-card {
  min-height: 190px;
  padding: 0;
  grid-template-rows: 1fr auto;
  align-content: start;
  gap: 0;
  overflow: hidden;
  border-color: rgba(205, 218, 226, 0.9);
  background: #fff;
}

.part-main-card {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  grid-template-rows: auto minmax(28px, auto) minmax(28px, auto);
  place-items: center;
  gap: 6px;
  text-align: center;
}

.part-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 17px;
  background:
    var(--part-image),
    radial-gradient(circle at 50% 72%, rgba(16, 32, 51, 0.08), transparent 34%),
    linear-gradient(180deg, #f7fafb 0%, #eef4f1 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover, auto, auto;
}

.part-visual[hidden] {
  display: none;
}

.part-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.part-card b {
  max-width: 100%;
  font-size: clamp(11px, 3vw, 14px);
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.part-image-card b {
  padding: 0 7px;
}

.part-card small {
  margin-top: 0;
  color: var(--muted);
  font-size: clamp(10px, 2.45vw, 12px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.part-image-card small {
  padding: 0 7px;
}

.part-inline-filters {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 12px 10px;
  scrollbar-width: none;
  scroll-padding-inline: 12px;
}

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

.part-inline-filters button {
  flex: 0 0 auto;
  min-height: 28px;
  max-width: none;
  padding: 7px 12px;
  border: 1px solid rgba(26, 127, 60, 0.18);
  border-radius: 999px;
  background: #eef8f0;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-overflow: clip;
}

.part-inline-filters button:active {
  transform: scale(0.96);
}

.catalog-filter-card b {
  font-size: 14px;
}

.catalog-filter-card small {
  color: #627487;
}

.vehicle-brand-card {
  min-height: 112px;
  padding: 10px 7px 9px;
  border-radius: 18px;
  text-align: center;
  display: grid;
  grid-template-rows: 46px minmax(30px, auto) 16px;
  justify-items: center;
  align-items: center;
  gap: 5px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
}

.vehicle-brand-logo {
  width: min(64px, 100%);
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: clamp(11px, 2.9vw, 13px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  background: linear-gradient(135deg, #12345a, #1b7b54);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 16px rgba(16, 42, 67, 0.12);
}

.vehicle-brand-card[data-tone="green"] .vehicle-brand-logo {
  background: linear-gradient(135deg, #116b42, #2ea96b);
}

.vehicle-brand-card[data-tone="red"] .vehicle-brand-logo {
  background: linear-gradient(135deg, #7a1e2f, #c54654);
}

.vehicle-brand-card[data-tone="graphite"] .vehicle-brand-logo {
  background: linear-gradient(135deg, #182331, #59616f);
}

.vehicle-brand-card[data-tone="trailer"] .vehicle-brand-logo {
  background: linear-gradient(135deg, #12345a, #6d7885);
}

.vehicle-brand-card[data-tone="muted"] .vehicle-brand-logo {
  color: var(--ink);
  background: #eaf1f4;
}

.vehicle-brand-card b {
  max-width: 100%;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.vehicle-brand-card small {
  margin-top: 0;
  font-size: clamp(9px, 2.6vw, 10px);
  line-height: 1.05;
  text-align: center;
}

.quick-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar {
  display: none;
}

.quick-chips button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: #eef4f1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trust-strip div {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(16, 42, 67, 0.05);
}

.trust-strip b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.trust-strip span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
}

.category-grid,
.brand-grid,
.catalog-grid,
.sto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.catalog-grid.catalog-section-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  align-items: stretch;
}

@supports not (overflow: clip) {
  .category-grid,
  .brand-grid,
  .catalog-grid,
  .sto-grid {
    overflow-x: hidden;
  }
}

.category-grid button,
.brand-grid button,
.catalog-card,
.sto-card,
.advantages div,
.empty-state,
.manager-help {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.05);
}

.category-grid button,
.brand-grid button,
.catalog-card,
.sto-card {
  min-height: 88px;
  padding: 14px;
  text-align: left;
  contain: layout paint style;
}

.catalog-image-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 0;
  border: 0;
  background: #102033;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.14);
}

.catalog-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  max-width: 100%;
  object-fit: cover;
}

.catalog-image-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 79, 125, 0.18), 0 14px 30px rgba(16, 32, 51, 0.16);
}

.catalog-card.catalog-image-card {
  aspect-ratio: 1.6 / 1;
  min-height: 96px;
}

.catalog-section-tile {
  display: grid;
  grid-template-rows: 62px minmax(30px, auto) minmax(16px, auto);
  gap: 6px;
  min-height: 130px;
  padding: 7px 6px 8px;
  border-radius: 18px;
  text-align: center;
  align-content: start;
  justify-items: stretch;
  background:
    radial-gradient(circle at 72% 16%, rgba(255, 255, 255, 0.82), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
}

.catalog-section-visual {
  display: grid;
  min-width: 0;
  width: 100%;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(204, 218, 228, 0.9);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 72%, rgba(16, 32, 51, 0.08), transparent 34%),
    linear-gradient(180deg, #f7fafb 0%, #eef4f1 100%);
}

.catalog-section-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-section-visual.text {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.catalog-section-tile strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(10.5px, 2.7vw, 12.5px);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalog-section-tile span:not(.catalog-section-visual) {
  display: -webkit-box;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(8.5px, 2.25vw, 10px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-grid .catalog-image-card,
.brand-grid .catalog-image-card {
  aspect-ratio: 1.6 / 1;
}

.category-grid strong,
.brand-grid strong,
.catalog-card strong,
.sto-card strong,
.empty-state strong,
.manager-help strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.category-grid span,
.brand-grid span,
.catalog-card span,
.sto-card span,
.empty-state span,
.manager-help span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.catalog-card em {
  display: block;
  margin-top: 8px;
  color: var(--green-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.catalog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.catalog-breadcrumb button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.catalog-breadcrumb button.active {
  background: var(--blue);
  color: #fff;
}

.catalog-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(47, 139, 70, 0.18);
  border-radius: 18px;
  background: var(--soft-green);
}

.catalog-context strong,
.catalog-context span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.catalog-context span {
  color: var(--muted);
  font-size: 13px;
}

.catalog-context button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 12px;
  background: #fff;
  color: var(--green-2);
  font-size: 13px;
  font-weight: 850;
}

.catalog-filter-page {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
}

.catalog-assembly-card {
  display: grid;
  grid-template-columns: minmax(136px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.05);
}

.catalog-assembly-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.catalog-position-gallery {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.catalog-gallery-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(16, 32, 51, 0.08);
  border-radius: 16px;
  background: #f7f9fb;
}

.catalog-gallery-frame > img {
  width: 100%;
  height: 156px;
  object-fit: contain;
  background: #fff;
}

.catalog-gallery-frame > em {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.78);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.catalog-gallery-placeholder {
  max-width: 150px;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.catalog-gallery-thumbs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.catalog-gallery-thumbs button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 2px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #fff;
}

.catalog-gallery-thumbs button[aria-pressed="true"] {
  border-color: var(--green);
}

.catalog-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-abcp-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.catalog-assembly-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.catalog-assembly-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.catalog-assembly-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.catalog-filter-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.catalog-filter-chips button {
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid rgba(26, 127, 60, 0.18);
  border-radius: 14px;
  background: #eef8f0;
  color: var(--green-2);
  font-size: clamp(10px, 2.55vw, 12px);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .catalog-assembly-card {
    grid-template-columns: 112px minmax(0, 1fr);
    padding: 10px;
  }

  .catalog-gallery-frame {
    min-height: 112px;
  }

  .catalog-gallery-frame > img {
    height: 124px;
  }

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

.catalog-filter-chips button:active {
  transform: scale(0.97);
}

.advantages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.advantages div {
  padding: 13px;
}

.advantages strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.advantages span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.suggestions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.suggestion {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: left;
}

.suggestion span {
  color: var(--muted);
  font-size: 13px;
}

.product-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  align-items: stretch;
  align-content: start;
  grid-auto-rows: auto;
  margin-top: 8px;
}

.product-results:empty {
  display: none;
}

.product-results h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.product-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 2px;
  padding: 7px;
  border: 1px solid rgba(220, 228, 234, 0.84);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.045);
}

.product-filter {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-filter span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.product-filter select {
  min-width: 0;
  height: 31px;
  padding: 0 22px 0 8px;
  border-radius: 11px;
  border-color: rgba(210, 220, 228, 0.92);
  background-color: #f8fbfc;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.product-load-more {
  grid-column: 1 / -1;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(234, 242, 248, 0.84);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.product-empty,
.clarification-card {
  grid-column: 1 / -1;
}

.product-card,
.product-empty,
.clarification-card,
.item,
.order-card,
.order-line {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfc 100%);
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.06);
}

.product-card {
  position: relative;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 336px 180px;
  grid-template-rows: minmax(124px, 1fr) 44px 34px 30px 40px;
  gap: 6px;
  height: clamp(292px, 76vw, 322px);
  min-height: 292px;
  padding: 8px;
  border-radius: 18px;
  outline: none;
  box-shadow: 0 9px 22px rgba(16, 32, 51, 0.07);
  transform: translateZ(0);
}

.offer-photo {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  place-items: center;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(18, 52, 90, 0.9), rgba(31, 79, 125, 0.72)),
    var(--soft-blue);
  color: #fff;
  text-decoration: none;
}

.offer-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
}

.offer-photo.photo-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(237, 242, 246, 0.72) 0%, rgba(248, 250, 251, 0.96) 42%, rgba(237, 242, 246, 0.72) 84%);
  background-size: 220% 100%;
  animation: shimmer 1.05s ease-in-out infinite;
}

.offer-photo.photo-loading img,
.offer-photo.photo-loading .offer-photo-track,
.offer-photo.photo-loading .offer-photo-frame {
  opacity: 0;
}

.offer-photo-frame,
.offer-photo-track {
  display: flex;
  width: 100%;
  height: 100%;
}

.offer-photo-frame {
  overflow: hidden;
}

.offer-photo-track {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  will-change: scroll-position;
}

.offer-photo-track::-webkit-scrollbar {
  display: none;
}

.offer-photo-track img {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.offer-photo-frame img {
  flex: 0 0 100%;
}

.offer-photo-dots {
  position: absolute;
  right: 9px;
  bottom: 8px;
  left: 9px;
  display: flex;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}

.offer-photo-dots i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.28);
}

.offer-photo-dots i:first-child {
  width: 12px;
  background: var(--green);
}

.offer-photo.photo-generated {
  background: #eef4f1;
}

.offer-photo span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.offer-photo small {
  display: none;
}

.offer-photo.photo-fallback {
  min-height: 108px;
  gap: 6px;
  align-content: center;
  justify-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 78% 22%, rgba(47, 139, 70, 0.32), transparent 32%),
    linear-gradient(145deg, #102033 0%, #1f4f7d 100%);
  text-align: center;
}

.offer-photo.photo-fallback span {
  position: static;
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
}

.offer-photo.photo-fallback small {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 750;
}

.product-photo {
  min-height: 0;
  height: 100%;
  width: 100%;
  align-self: start;
  border-radius: 14px;
  background: #f6f9fb;
}

.product-photo img {
  object-fit: contain;
}

.product-photo span {
  display: none;
}

.product-card:focus-visible,
.order-card:focus-visible {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(31, 79, 125, 0.12), 0 10px 24px rgba(16, 32, 51, 0.06);
}

.product-head {
  display: grid;
  gap: 3px;
  height: 44px;
  min-width: 0;
  overflow: hidden;
}

.product-head strong {
  display: block;
  font-size: 13px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-head b {
  order: -1;
  color: var(--green-2);
  font-size: clamp(17px, 4.7vw, 20px);
  font-weight: 900;
  white-space: nowrap;
}

.product-card h4 {
  margin: 0;
  height: 34px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-variants-inline {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--soft-green);
  color: var(--green-2);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.product-variant-strip {
  display: grid;
  min-width: 0;
  height: 30px;
  align-content: center;
  gap: 1px;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 11px;
  background: #eef6f1;
  color: var(--green-2);
}

.product-variant-strip.is-empty {
  visibility: hidden;
}

.product-variant-strip span,
.product-variant-strip b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.05;
}

.product-variant-strip span {
  color: #5d6b7d;
  font-weight: 850;
}

.product-variant-strip b {
  color: var(--green-2);
  font-weight: 950;
}

.product-card dl {
  display: none;
  gap: 5px;
  margin: 0;
}

.product-card dl div {
  display: flex;
  min-height: 30px;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 10px;
  background: var(--soft-blue);
}

.product-card dt {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.product-card dd {
  margin: 0;
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}

.product-tags,
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-card .product-tags {
  display: none;
}

.product-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--soft-green);
  color: var(--green-2);
  font-size: 10px;
  font-weight: 850;
}

.product-card .product-tags span:nth-child(n + 3) {
  display: none;
}

.product-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 6px 7px;
  border-radius: 12px;
  background: var(--soft-blue);
}

.product-quantity > span {
  display: none;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-self: end;
}

.product-actions button {
  height: 40px;
  padding: 9px 8px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 850;
  overflow: hidden;
}

.product-card-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  height: 40px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--soft-green);
  color: var(--green-2);
}

.product-card-stepper button,
.product-card-stepper output {
  display: grid;
  min-width: 0;
  place-items: center;
  color: inherit;
  font-size: 18px;
  font-weight: 950;
}

.product-card-stepper button {
  background: transparent;
}

.product-card-stepper.pending {
  opacity: 0.78;
}

.product-card-stepper.pending button {
  color: rgba(47, 139, 70, 0.42);
}

.product-card-stepper output {
  border-inline: 1px solid rgba(47, 139, 70, 0.16);
  font-size: 15px;
}

.product-actions .secondary-action,
.product-actions .question-action {
  display: none;
}

.clarification-card {
  grid-column: 1 / -1;
}

.clarification-card strong {
  font-size: 17px;
  line-height: 1.3;
}

.clarification-card > span {
  color: var(--muted);
  font-size: 13px;
}

.clarification-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.clarification-options button {
  min-height: 46px;
  padding: 11px 10px;
  border-radius: 13px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.clarification-options button:active {
  transform: translateY(1px) scale(0.99);
}

.secondary-action {
  background: var(--blue);
  color: #fff;
}

.question-action,
.remove,
.secondary-wide,
.cart-quote,
.whatsapp-action,
.cart-whatsapp,
.cart-telegram {
  background: var(--soft-blue);
  color: var(--blue);
}

.whatsapp-action,
.cart-whatsapp {
  background: #eaf8ef;
  color: #177a38;
}

.cart-telegram {
  background: #eaf4ff;
  color: #1780c9;
}

.cart-share-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-icon-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(16, 32, 51, 0.06);
}

.share-icon-button svg {
  width: 32px;
  height: 32px;
  display: block;
}

.share-icon-button:disabled {
  opacity: 0.62;
}

.share-icon-button.loading svg {
  animation: shareSpin 0.8s linear infinite;
}

@keyframes shareSpin {
  to {
    transform: rotate(360deg);
  }
}

.secondary-wide {
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  font-weight: 850;
}

.cart-quote {
  min-height: 46px;
  background: #eef7ff;
  color: var(--blue);
}

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

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

.order-head-store {
  align-items: center;
}

.order-head strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.order-head span,
.order-preview span,
.order-line span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.order-head b {
  flex: 0 0 auto;
  color: var(--green-2);
  font-size: 16px;
  white-space: nowrap;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f7ed;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.order-status-badge-processing {
  background: #eef5ff;
  color: var(--blue);
}

.order-status-badge-ready {
  background: #fff4df;
  color: #a86400;
}

.order-status-badge-shipped {
  background: #e8f7ed;
  color: var(--green-2);
}

.order-status-badge-cancelled {
  background: #fff0f0;
  color: #b42318;
}

.order-status-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
  margin: 2px 0;
}

.order-status-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
  line-height: 1.15;
}

.order-status-step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: calc(-50% + 10px);
  right: calc(50% + 10px);
  height: 2px;
  background: var(--line);
}

.order-status-step:first-child::before {
  display: none;
}

.order-status-step i {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.order-status-step.done i {
  border-color: var(--green);
  background: var(--green);
}

.order-status-step.done::before {
  background: var(--green);
}

.order-status-step.current {
  color: var(--ink);
}

.order-status-step b {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.order-status-stepper.compact .order-status-step {
  gap: 0;
}

.order-status-stepper.compact .order-status-step i {
  width: 12px;
  height: 12px;
}

.order-status-stepper.cancelled .order-status-step i {
  border-color: #f1c5c0;
  background: #fff0f0;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.order-summary-grid div {
  min-width: 0;
  padding: 9px;
  border-radius: 14px;
  background: var(--soft-blue);
}

.order-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.order-summary-grid b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.order-meta,
.order-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.order-preview-photos {
  display: flex;
  gap: 7px;
  min-height: 42px;
  overflow: hidden;
}

.order-preview-photo,
.order-line-photo {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft-blue);
}

.order-preview-photo {
  width: 42px;
  height: 42px;
}

.order-line-photo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.order-preview-photo img,
.order-line-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.order-meta span,
.order-preview span {
  margin: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-weight: 800;
}

.order-meta .order-status {
  background: #e8f7ed;
  color: var(--green-2);
}

.order-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}

.order-actions button {
  min-height: 44px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 850;
}

.order-actions button:not(.secondary-action) {
  background: linear-gradient(145deg, var(--green), var(--green-2));
  color: #fff;
}

.order-line {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  box-shadow: none;
}

.order-line-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.order-line strong {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.order-line-code {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.order-line-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-line-facts span {
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.order-line-comment {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.order-line b {
  color: var(--green-2);
  font-size: 13px;
}

.order-detail-status {
  display: grid;
  gap: 10px;
}

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

.quote-detail {
  display: grid;
  gap: 12px;
}

.quote-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.quote-head h2 {
  margin-bottom: 4px;
}

.quote-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.quote-status-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: #eaf8ef;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 950;
}

.quote-validity {
  padding: 11px 13px;
  border-radius: 14px;
  background: #f5fbf7;
  color: var(--green-2);
  font-size: 13px;
  font-weight: 900;
}

.quote-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quote-meta span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--soft-blue);
}

.quote-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.quote-meta b {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

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

.quote-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(210, 220, 228, 0.9);
  border-radius: 16px;
  background: #fff;
}

.quote-line-photo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.quote-line-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quote-line strong,
.quote-line span,
.quote-line em,
.quote-line b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-line strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.quote-line span,
.quote-line em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.quote-line b {
  margin-top: 4px;
  color: var(--green-2);
  font-size: 13px;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #eaf8ef;
  color: var(--green-2);
  font-weight: 950;
}

.quote-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: #eaf8ef;
}

.quote-summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quote-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.quote-summary b {
  color: var(--green-2);
  font-size: 14px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.quote-actions {
  display: grid;
  gap: 9px;
}

.quote-error {
  padding: 14px;
  border-radius: 16px;
  background: #fff5f5;
  color: var(--danger);
  font-weight: 850;
  line-height: 1.35;
}

.account-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-tile {
  display: grid;
  grid-template-rows: 78px auto 1fr;
  gap: 8px;
  min-height: 174px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 75% 12%, rgba(47, 139, 70, 0.08), transparent 36%),
    linear-gradient(180deg, #fff 0%, #f7fbfb 100%);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 10px 26px rgba(16, 32, 51, 0.07);
  align-items: start;
  justify-items: center;
  overflow: hidden;
}

.account-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 246, 246, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(223, 231, 237, 0.72),
    0 12px 22px rgba(16, 32, 51, 0.08);
}

.account-icon img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.account-tile strong {
  width: 100%;
  font-size: 16px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.account-tile > span:not(.account-icon) {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-tile.active {
  border-color: rgba(30, 113, 61, 0.32);
  box-shadow: 0 10px 24px rgba(30, 113, 61, 0.12);
}

.account-profile-menu {
  display: grid;
  gap: 12px;
}

.account-profile-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(31, 79, 125, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 86% 18%, rgba(47, 139, 70, 0.12), transparent 34%),
    linear-gradient(180deg, #fff 0%, #f5faf9 100%);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.06);
}

.account-profile-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.12;
}

.account-profile-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.28;
}

.account-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-subtile {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(16, 32, 51, 0.05);
}

.account-subtile strong {
  font-size: 16px;
  line-height: 1.15;
}

.account-subtile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-subtile.active {
  border-color: rgba(30, 113, 61, 0.32);
  box-shadow: 0 8px 18px rgba(30, 113, 61, 0.12);
}

.account-section-title {
  display: grid;
  margin-bottom: 14px;
}

.account-panel {
  display: grid;
  gap: 10px;
}

.lookup-note {
  margin: -8px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.profile-form,
.garage-form,
.garage-list {
  display: grid;
  gap: 10px;
}

.profile-form,
.garage-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.05);
}

.profile-form .primary,
.garage-form .primary {
  width: 100%;
}

.profile-manager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgba(31, 79, 125, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 55, 88, 0.08), rgba(25, 128, 68, 0.08));
}

.profile-manager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-manager a {
  color: var(--blue);
  font-size: 17px;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.compact-title {
  margin-top: 18px;
}

.garage-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfc 100%);
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.06);
}

.garage-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.garage-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.garage-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.garage-actions button {
  min-height: 44px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 850;
}

.garage-actions button:first-child {
  background: linear-gradient(145deg, var(--green), var(--green-2));
  color: #fff;
}

.product-empty span {
  color: var(--muted);
}

.suggestion-chips button,
.chip-grid button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

h3 {
  margin: 8px 0 0;
  font-size: 17px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.items-list {
  display: grid;
  gap: 8px;
  padding-bottom: 188px;
}

.cart-office {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(167, 213, 180, 0.88);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(232, 247, 236, 0.96), rgba(244, 249, 252, 0.96));
  color: var(--green-2);
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.05);
}

.cart-office span {
  color: #5f7083;
  font-size: 12px;
  font-weight: 850;
}

.cart-office strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  text-align: right;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border-radius: 20px;
  align-items: start;
  contain: layout paint style;
}

.cart-item-media {
  min-width: 0;
}

.cart-item-photo {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  background: #f4f8f7;
}

.cart-item-photo img {
  object-fit: contain;
}

.cart-item-photo span,
.cart-item-photo .offer-photo-dots {
  display: none;
}

.cart-item-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.cart-item-top {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.cart-item-top span {
  min-width: 0;
  overflow: hidden;
  color: #5f7083;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-top strong {
  flex: 0 0 auto;
  color: var(--green-2);
  font-size: 16px;
  font-weight: 950;
}

.cart-item-main h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cart-item-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cart-item-facts span,
.cart-item-badge {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #5f7083;
  font-size: 11px;
  font-weight: 850;
}

.cart-item-facts span:first-child {
  background: var(--soft-green);
  color: var(--green-2);
}

.cart-item-badge {
  background: #fff5dd;
  color: #8a5a00;
}

.item-controls {
  display: grid;
  grid-template-columns: minmax(118px, 128px) minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin-top: 3px;
}

.cart-item-stepper {
  width: 100%;
  min-width: 0;
  background: var(--soft-green);
}

.cart-item-stepper button,
.cart-item-stepper output {
  background: transparent;
  color: var(--green-2);
}

.cart-note {
  min-width: 0;
  width: 100%;
}

.cart-note summary {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  overflow: hidden;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.cart-note summary::-webkit-details-marker {
  display: none;
}

.cart-note input {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  margin: 7px 0 0;
  padding: 0 11px;
  border-radius: 12px;
  font-size: 13px;
}

.cart-note input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(178, 56, 56, 0.12);
}

.checkout-profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft-green);
}

.checkout-profile-summary[hidden] {
  display: none;
}

.checkout-profile-summary div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.checkout-profile-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-profile-summary button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
}

.cart-item-remove {
  grid-column: 1 / -1;
  width: fit-content;
  min-height: 32px;
  margin-top: 0;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff5f5;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.08);
}

.cart-footer {
  position: sticky;
  bottom: calc(88px + var(--tg-safe-bottom));
  z-index: 50;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(210, 220, 228, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(16, 32, 51, 0.18);
  backdrop-filter: blur(16px);
}

.cart-summary {
  padding: 4px 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cart-summary strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.cart-checkout,
#submit {
  width: 100%;
  margin-top: 0;
  padding: 0 18px;
}

.empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #cbd8df;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  text-align: center;
}

.empty-state,
.manager-help {
  padding: 18px;
}

.manager-help {
  display: grid;
  gap: 10px;
}

label {
  display: block;
  margin: 0 0 8px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 48px;
  margin-bottom: 14px;
  padding: 0 13px;
}

textarea {
  min-height: 92px;
  padding: 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(31, 79, 125, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tabs {
  position: fixed;
  right: max(10px, var(--tg-safe-right), calc((100vw - 720px) / 2 + 12px));
  bottom: max(10px, var(--tg-safe-bottom));
  left: max(10px, var(--tg-safe-left), calc((100vw - 720px) / 2 + 12px));
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 7px;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid rgba(210, 220, 228, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(16, 42, 67, 0.18);
  backdrop-filter: blur(18px);
}

.tabs button {
  position: relative;
  min-width: 0;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 3px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.tab-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs button small {
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.tabs button.active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.tabs button::after {
  content: "";
  position: absolute;
  top: 33px;
  left: 50%;
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: var(--green);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.45);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.tabs button.active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.tabs button.active .tab-icon {
  color: var(--ink);
}

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

.detail-open,
.install-open,
.photo-lightbox-open {
  overflow: hidden;
}

.detail-sheet,
.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  align-items: end;
}

.detail-sheet[hidden],
.install-sheet[hidden] {
  display: none;
}

.detail-backdrop,
.install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 51, 0.42);
  animation: fade-in 0.18s ease-out both;
}

.detail-card,
.install-card {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: calc(var(--app-height) - var(--tg-safe-top) - 10px);
  margin: 0 auto;
  overflow: auto;
  padding: 20px max(14px, var(--tg-safe-right)) calc(18px + var(--tg-safe-bottom)) max(14px, var(--tg-safe-left));
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 60px rgba(16, 32, 51, 0.26);
  animation: sheet-in 0.22s ease-out both;
  transition: transform 0.18s ease;
}

.detail-card.detail-dragging {
  transition: none;
}

.install-card {
  display: grid;
  gap: 13px;
}

.install-card h2 {
  margin: 4px 48px 0 0;
  font-size: 24px;
  line-height: 1.12;
}

.install-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.install-steps {
  display: grid;
  gap: 8px;
}

.install-steps div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: var(--soft-blue);
}

.install-steps b {
  color: var(--blue);
  font-size: 14px;
}

.install-steps span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.install-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.install-actions button {
  min-height: 48px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 850;
}

.detail-close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
}

.detail-kicker {
  margin-right: 48px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.detail-card h2 {
  margin: 8px 48px 8px 0;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.detail-description {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.detail-price {
  margin-bottom: 14px;
  color: var(--green-2);
  font-size: 28px;
  font-weight: 950;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.detail-facts div {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: var(--soft-blue);
}

.detail-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.detail-facts dd {
  margin: 4px 0 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.detail-tags {
  margin-bottom: 14px;
}

.detail-photo {
  min-height: 188px;
  margin-bottom: 14px;
  aspect-ratio: 1.72 / 1;
  border-radius: 20px;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.detail-variants {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
}

.detail-variant-current,
.detail-variant-list {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(220, 228, 234, 0.92);
  background: #f8fbfc;
}

.detail-variant-current strong,
.detail-variant-list > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.detail-variant-current span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-variant-option {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid rgba(210, 220, 228, 0.96);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.detail-variant-option b {
  color: var(--green-2);
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.detail-variant-option span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-variant-option.active {
  border-color: rgba(47, 139, 70, 0.48);
  background: var(--soft-green);
}

.detail-variant-option:disabled {
  opacity: 0.56;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(16px, var(--tg-safe-top)) max(12px, var(--tg-safe-right)) max(24px, var(--tg-safe-bottom)) max(12px, var(--tg-safe-left));
  background: rgba(8, 19, 33, 0.94);
  touch-action: none;
  animation: fade-in 0.16s ease-out both;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox-stage {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  touch-action: none;
}

.photo-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 132px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.34);
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-lightbox-caption {
  position: fixed;
  right: max(14px, var(--tg-safe-right));
  bottom: calc(18px + var(--tg-safe-bottom));
  left: max(14px, var(--tg-safe-left));
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.photo-lightbox-close,
.photo-lightbox-nav {
  position: fixed;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-tap-highlight-color: transparent;
}

.photo-lightbox-close {
  top: max(14px, var(--tg-safe-top));
  right: max(14px, var(--tg-safe-right));
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.photo-lightbox-nav {
  top: 50%;
  width: 42px;
  height: 62px;
  border-radius: 999px;
  font-size: 36px;
  transform: translateY(-50%);
}

.photo-lightbox-nav.prev {
  left: max(10px, var(--tg-safe-left));
}

.photo-lightbox-nav.next {
  right: max(10px, var(--tg-safe-right));
}

.photo-lightbox-nav[hidden] {
  display: none;
}

.detail-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--soft-blue);
}

.detail-quantity > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 42px 52px 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.quantity-stepper.compact {
  grid-template-columns: 36px 44px 36px;
  border-radius: 12px;
}

.quantity-stepper button {
  display: grid;
  min-height: 40px;
  place-items: center;
  background: var(--surface);
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}

.quantity-stepper.compact button,
.quantity-stepper.compact output {
  min-height: 34px;
}

.quantity-stepper output {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-inline: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}

.detail-actions .whatsapp-action {
  grid-column: 1 / -1;
}

.detail-actions button {
  min-height: 48px;
  border-radius: 13px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 850;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-line,
.skeleton-grid span,
.skeleton-actions span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2f6 0%, #f8fafb 42%, #edf2f6 84%);
  background-size: 220% 100%;
  animation: shimmer 1.1s ease-in-out infinite;
}

.skeleton-line {
  width: 64%;
}

.skeleton-line.wide {
  width: 88%;
  height: 18px;
}

.skeleton-grid,
.skeleton-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.skeleton-grid.detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skeleton-grid span {
  height: 42px;
  border-radius: 13px;
}

.skeleton-actions span {
  height: 44px;
  border-radius: 13px;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(18px);
    opacity: 0.84;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  to {
    transform: translateY(8px);
    opacity: 0;
  }
}

@media (min-width: 700px) {
  .app {
    padding-right: max(18px, var(--tg-safe-right));
    padding-left: max(18px, var(--tg-safe-left));
  }

  .topbar {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .hero {
    padding: 24px 24px 18px;
  }

  .category-grid,
  .brand-grid,
  .sto-grid,
  .quick-mode-grid,
  .node-grid,
  .part-grid,
  .vehicle-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .account-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-results h3,
  .product-empty,
  .product-filters,
  .clarification-card {
    grid-column: 1 / -1;
  }

  .detail-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 780px) {
  .quick-mode-grid,
  .node-grid,
  .part-grid,
  .vehicle-brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .clarification-options {
    grid-template-columns: 1fr;
  }

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

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

  .category-grid,
  .brand-grid,
  .catalog-grid,
  .sto-grid,
  .advantages,
  .quick-mode-grid,
  .trust-strip,
  .product-card dl,
  .product-actions,
  .grid,
  .detail-actions,
  .install-actions,
  .garage-actions,
  .catalog-context {
    grid-template-columns: 1fr;
  }

  .product-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
  }

  .product-filter select {
    height: 32px;
    font-size: 11px;
  }

  .vehicle-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .section-title,
  .section-head,
  .compact-head,
  .product-head,
  .order-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head span {
    text-align: left;
  }

  .catalog-card.catalog-image-card,
  .category-grid .catalog-image-card,
  .brand-grid .catalog-image-card {
    min-height: 132px;
    aspect-ratio: 1.8 / 1;
  }

  .item-controls {
    grid-template-columns: minmax(118px, 128px) minmax(0, 1fr);
  }

  .remove,
  .cart-item-remove {
    grid-column: 1 / -1;
  }

  .tabs button small {
    font-size: 9.5px;
  }
}

@media (max-width: 360px) {
  .app {
    padding-right: 8px;
    padding-left: 8px;
  }

  .topbar {
    margin-inline: -8px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-search button {
    width: 100%;
  }

  .catalog-grid.catalog-section-grid,
  .catalog-filter-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-section-tile {
    min-height: 118px;
  }

  .catalog-section-visual {
    height: 56px;
  }

  .tabs {
    right: 6px;
    left: 6px;
    gap: 4px;
    padding: 5px;
  }

  .tabs button {
    height: 54px;
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
.telegram-auth-required {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #fff;
  color: #10243a;
}

.telegram-auth-required strong {
  font-size: 20px;
  line-height: 1.2;
}

.telegram-auth-required span {
  color: #64748b;
  line-height: 1.45;
}

.telegram-auth-required button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #123e68;
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.telegram-auth-form-locked > :not(.telegram-auth-required) {
  display: none !important;
}
