:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #161616;
  --surface-strong: #202020;
  --ink: #f7f7f7;
  --muted: #b9b9b9;
  --line: #343434;
  --accent: #ff7900;
  --accent-strong: #ff8a1f;
  --warm: #ffb36b;
  --soft: rgba(255, 121, 0, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 121, 0, 0.20), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(17, 17, 17, 0.90)),
    var(--bg);
  color: var(--ink);
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  pointer-events: none;
  opacity: var(--cursor-glow-opacity, 0);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 238, 174, 0.96) 0 7%, rgba(255, 121, 0, 0.78) 18%, rgba(221, 35, 24, 0.36) 43%, rgba(255, 121, 0, 0) 78%);
  filter: blur(var(--cursor-blur, 4px));
  mix-blend-mode: screen;
  transform:
    translate3d(calc(var(--cursor-x, 50vw) - 50%), calc(var(--cursor-y, 50vh) - 50%), 0)
    rotate(var(--cursor-angle, 0deg))
    scale(var(--cursor-scale-x, 1), var(--cursor-scale-y, 1));
  transition: opacity 120ms ease;
  will-change: transform, opacity, filter;
}

.app {
  position: relative;
  z-index: 1;
}

button,
input,
select {
  font: inherit;
}

.app {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.social-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 28px 0 6px;
}

.social-link {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 22, 22, 0.78);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, background 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: var(--accent);
  background: var(--soft);
  color: #ffffff;
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 3px solid rgba(255, 121, 0, 0.24);
  outline-offset: 3px;
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-link-max span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.social-link-reviews {
  width: auto;
  min-width: 42px;
  height: auto;
  min-height: 42px;
  padding: 8px 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
}

.social-link-reviews svg {
  width: 20px;
  height: 20px;
}

.social-link-reviews__label {
  font-size: 9px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: 88px;
  color: inherit;
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.intro {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 10px 2px 14px;
}

.brand-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.brand-row__main {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.site-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.site-auth__login {
  display: none;
  border: 1px solid rgba(255, 121, 0, 0.55);
  background: rgba(255, 121, 0, 0.12);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.site-auth__login:hover {
  background: var(--accent);
  color: #1a0d00;
}

.site-auth__login.is-visible {
  display: inline-block;
}

.site-auth__user {
  display: none;
  align-items: center;
  gap: 10px;
}

.site-auth__user.is-visible {
  display: flex;
}

.site-auth__phone {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.site-auth__logout {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.site-auth__logout:hover {
  color: #fff;
  border-color: rgba(255, 121, 0, 0.45);
}

.site-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.site-auth-modal[hidden] { display: none; }

.site-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.82);
  backdrop-filter: blur(6px);
}

.site-auth-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid rgba(255, 121, 0, 0.22);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}

.site-auth-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-auth-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.site-auth-modal__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-auth-modal__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.site-auth-modal__body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}

.site-auth-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-auth-modal__status {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-auth-modal__status[data-kind="error"] { color: #ff8a80; }
.site-auth-modal__status[data-kind="ok"] { color: #8fd18f; }

body.site-auth-modal-open { overflow: hidden; }

@media (max-width: 720px) {
  .brand-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-auth {
    width: 100%;
    justify-content: flex-start;
  }

  .site-auth__phone {
    font-size: 13px;
  }
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(255, 121, 0, 0.24);
}

.brand-name {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(36px, 6vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--accent);
  text-transform: uppercase;
}

.intro p:last-child {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.calculator,
.summary {
  background: rgba(22, 22, 22, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.calculator {
  padding: 18px;
}

.summary {
  grid-column: 2;
  grid-row: 2;
}

.countries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.countries legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.country-option {
  position: relative;
  min-width: 0;
}

.country-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.country-option span {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 6px;
  text-align: center;
  line-height: 1.2;
}

.country-option input:checked + span {
  border-color: var(--accent);
  background: var(--soft);
  color: #ffffff;
}

.rates-panel {
  display: block;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.rates-panel strong {
  display: block;
  margin-bottom: 3px;
}

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

.rates-panel button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.rates-panel button:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.rates-details {
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.rates-details summary {
  min-height: 34px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style-position: inside;
}

.rates-details summary:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  outline-offset: 2px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.check input {
  width: auto;
  min-height: auto;
  margin-top: 2px;
}

.field-ev {
  margin-top: 2px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f0f0f;
  color: var(--ink);
  outline: none;
}

input {
  padding: 0 12px;
}

select {
  padding: 0 10px;
  cursor: pointer;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.summary {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.total-details {
  border-radius: 8px;
  overflow: hidden;
}

.total-details > summary {
  list-style: none;
  cursor: pointer;
}

.total-details > summary::-webkit-details-marker { display: none; }

.total-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff7900, #ff9a2f);
  color: #1b1007;
}

.total-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.total-label {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.total-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.total-card strong {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  color: #ffffff;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1;
  white-space: nowrap;
}

.total-auth-btn {
  display: none;
  width: 100%;
  margin-top: 6px;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, transform 0.18s;
}

.total-auth-btn.is-visible {
  display: block;
}

.total-auth-btn:hover {
  background: rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}

.total-details--auth-locked > summary {
  cursor: default;
}

.total-details--auth-locked .total-action,
.total-details--auth-locked .total-arrow {
  visibility: hidden;
}

.total-details--auth-locked > :not(summary) {
  display: none !important;
}

.total-action {
  font-size: 11px;
  font-weight: 700;
  color: rgba(73, 35, 5, 0.78);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.total-action::before {
  content: attr(data-open);
}

.total-details[open] .total-action::before {
  content: attr(data-close);
}

.total-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.total-arrow::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg);
  margin-top: -3px;
}

.total-details[open] .total-arrow {
  transform: rotate(180deg);
}

.breakdown {
  display: grid;
  gap: 0;
  margin: 0;
}

.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.breakdown dt {
  color: var(--muted);
  font-weight: 700;
}

.breakdown dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.formula-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.formula-box h2 {
  margin: 0;
  font-size: 17px;
}

.formula-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.formula-box .note {
  color: var(--warm);
  font-size: 13px;
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-column: auto;
    grid-row: auto;
  }

  .summary {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    background: var(--bg);
    overflow-x: hidden;
  }

  .app {
    width: min(100%, 430px);
    padding: 0;
  }

  .workspace {
    gap: 10px;
  }

  .intro {
    order: -2;
    padding: 16px 14px 4px;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-name {
    font-size: 16px;
  }

  .eyebrow {
    font-size: 11px;
  }

  h1 {
    max-width: 100%;
    font-size: 23px;
    line-height: 1.06;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .intro p:last-child {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .calculator,
  .summary {
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .calculator {
    padding: 12px 12px 18px;
  }

  .social-footer {
    padding: 18px 0 22px;
  }

  .summary {
    order: -1;
    gap: 10px;
    padding: 0 12px 12px;
    background: transparent;
    border: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .rates-grid {
    grid-template-columns: 1fr;
  }

  .rates-panel {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .rates-panel button {
    width: 100%;
  }

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

  .countries legend {
    margin-bottom: 2px;
    font-size: 13px;
  }

  .country-option span {
    min-height: 42px;
    padding: 0 4px;
    font-size: 14px;
  }

  .form-grid {
    gap: 11px;
  }

  .field.wide {
    grid-column: auto;
  }

  .field > span {
    font-size: 13px;
  }

  input,
  select {
    min-height: 44px;
    border-radius: 7px;
    font-size: 16px;
  }

  .money-input {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 6px;
  }

  .total-card {
    padding: 14px;
    border-radius: 8px;
  }

  .total-card span {
    font-size: 12px;
  }

  .total-card strong {
    font-size: 32px;
  }

  .breakdown {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .breakdown div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    padding: 9px 12px;
  }

  .breakdown dt,
  .breakdown dd {
    font-size: 14px;
  }

  .breakdown dt {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .breakdown dd {
    white-space: nowrap;
  }

  .formula-box {
    padding: 12px;
    background: var(--surface);
  }

  .formula-box h2 {
    font-size: 15px;
  }

  .formula-box p {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 22px;
  }

  .money-input {
    grid-template-columns: minmax(0, 1fr) 78px;
  }

  .country-option span,
  input,
  select {
    font-size: 15px;
  }

  .total-card strong {
    font-size: 28px;
  }
}

/* === Sunrise Import — carwin catalog integration === */

.intro {
  position: relative;
}

.stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 121, 0, 0.08);
  border: 1px solid rgba(255, 121, 0, 0.28);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stock-pill strong {
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

.selected-lot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 121, 0, 0.35);
  background: rgba(255, 121, 0, 0.06);
  align-items: center;
  margin-bottom: 6px;
}

.selected-lot[hidden] {
  display: none;
}

.selected-lot img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-strong);
}

.selected-lot__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.selected-lot__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.selected-lot__meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-lot__price {
  font-size: 13px;
  color: var(--accent);
  margin: 0;
  font-weight: 500;
}

.selected-lot__clear {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.selected-lot__clear:hover {
  color: var(--accent);
  border-color: rgba(255, 121, 0, 0.5);
  background: rgba(255, 121, 0, 0.08);
}

.catalog {
  margin-top: 28px;
  padding: 26px 28px 32px;
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.catalog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.catalog__head h2 {
  font-size: 22px;
  margin: 0 0 6px 0;
  color: var(--ink);
}

.catalog__head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.catalog__stats-link {
  text-decoration: none;
  white-space: nowrap;
}

.catalog__filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  padding: 16px;
  background: var(--surface-strong);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 22px;
}

.catalog__filters .field {
  gap: 6px;
}

.catalog__filters .field-search {
  grid-column: 1 / -1;
}

.lots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.lot-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.lot-card:hover {
  border-color: rgba(255, 121, 0, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.lot-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0c0c0c;
}

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

.lot-card__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
}

.lot-card__warn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(220, 30, 30, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lot-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
  flex: 1;
}

.lot-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.lot-card__sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.lot-card__meta {
  margin: 0;
  color: rgba(185, 185, 185, 0.7);
  font-size: 12px;
}

.lot-card__price {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.lot-card__price strong {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.lot-card__price--loading strong {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
}

.lot-card__price--quote strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.lot-card__price-note,
.lot-card__price span {
  color: var(--muted);
  font-size: 12px;
}

.lot-card__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
}

.btn-primary {
  background: var(--accent);
  color: #0d0700;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: #ff8a1e;
}

.btn-primary:active {
  transform: scale(0.98);
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ghost-btn:hover {
  color: var(--accent);
  border-color: rgba(255, 121, 0, 0.4);
  background: rgba(255, 121, 0, 0.04);
}

.ghost-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.02em;
  border-bottom: 1px dashed rgba(185, 185, 185, 0.4);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.ghost-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.catalog__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

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

.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 16px;
}

@media (max-width: 920px) {
  .catalog {
    padding: 20px 18px 24px;
  }
  .lots-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .selected-lot {
    grid-template-columns: 80px minmax(0, 1fr) auto;
  }
  .selected-lot img {
    width: 80px;
    height: 60px;
  }
}

@media (max-width: 640px) {
  .catalog__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog__filters .field-search {
    grid-column: 1 / -1;
  }
  .lots-grid {
    grid-template-columns: 1fr;
  }
}

/* Stats modal: opens when user clicks "Статистика цен" on a lot card.
   Shows historical sold-car rows; each row's RUB total is recomputed by
   SunCalc.computeFromYen so the price is always our calculator's number. */
.lot-card__btn-stats {
  background: transparent;
  border: 1px solid rgba(255, 121, 0, 0.5);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.lot-card__btn-stats:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 121, 0, 0.08);
}
.stats-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.stats-modal[hidden] { display: none; }
.stats-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.78);
  backdrop-filter: blur(6px);
}
.stats-modal__panel {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid rgba(255, 121, 0, 0.18);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.stats-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.stats-modal__head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.stats-modal__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.stats-modal__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.stats-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.stats-modal__status {
  padding: 12px 24px;
  color: var(--muted);
  font-size: 0.88rem;
}
.stats-modal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 0 24px 12px;
  color: var(--muted);
  font-size: 0.78rem;
}
.stats-modal__legend strong { color: var(--ink); font-weight: 500; }
.stats-modal__list {
  overflow-y: auto;
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}
.stats-row__pic {
  width: 92px;
  height: 64px;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stats-row__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stats-row__pic--empty {
  color: var(--muted);
  font-size: 0.72rem;
}
.stats-row__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.stats-row__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.stats-row__price {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  min-width: 260px;
  text-align: right;
}
.stats-row__jpy {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.stats-row__rub {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.stats-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px 0;
  text-align: center;
}
@media (max-width: 640px) {
  .stats-modal { padding: 0; }
  .stats-modal__panel { border-radius: 0; max-height: 100vh; }
  .stats-row { grid-template-columns: 72px 1fr; }
  .stats-row__pic { width: 72px; height: 54px; }
  .stats-row__price { grid-column: 1 / -1; align-items: flex-start; }
}

/* Lot detail modal — opens on lot card click. Shows photo gallery
   (main + thumbs), spec grid, start price and primary action buttons.
   The whole card / stats row is clickable; the inline buttons keep
   working via event.stopPropagation in list.js. */
.lot-card { cursor: pointer; }
.lot-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lot-card__hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
.stats-row { cursor: pointer; }
.stats-row--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lot-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lot-modal[hidden] { display: none; }
.lot-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.8);
  backdrop-filter: blur(6px);
}
.lot-modal__panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid rgba(255, 121, 0, 0.18);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.lot-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lot-modal__head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.lot-modal__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.lot-modal__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lot-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lot-modal__status {
  padding: 16px 24px;
  color: var(--muted);
  font-size: 0.88rem;
}
.lot-modal__body {
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0;
}
.lot-modal__gallery {
  padding: 16px 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.lot-gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lot-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.lot-gallery__main img[data-empty] {
  width: auto;
  height: auto;
  opacity: 0.4;
  font-size: 0.8rem;
}
.lot-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.lot-gallery__nav:hover {
  background: rgba(255, 121, 0, 0.18);
  border-color: var(--accent);
  color: var(--accent);
}
.lot-gallery__nav--prev { left: 12px; }
.lot-gallery__nav--next { right: 12px; }
.lot-gallery__counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--ink);
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.lot-gallery__thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}
.lot-gallery__thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #000;
  cursor: pointer;
  padding: 0;
}
.lot-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lot-gallery__thumb.is-active {
  border-color: var(--accent);
  outline: 1px solid rgba(255, 121, 0, 0.4);
}
.lot-modal__info {
  padding: 16px 24px 24px 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.lot-modal__pricing {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lot-modal__pricing .lot-price__main {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}
.lot-modal__pricing .lot-price__sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.lot-price {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lot-price--accent .lot-price__value {
  color: var(--accent);
  font-size: 1.35rem;
}

.lot-price__label {
  color: var(--muted);
  font-size: 0.85rem;
}

.lot-age-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 121, 0, 0.08);
  border: 1px solid rgba(255, 121, 0, 0.18);
}

.lot-age-options__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}

.lot-calc-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lot-calc-breakdown {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.lot-calc-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
}

.lot-calc-breakdown span { color: var(--muted); }

.lot-calc-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lot-calc-overlay[hidden] { display: none; }
.lot-calc-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}
.lot-calc-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100% - 24px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 121, 0, 0.35);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}
.lot-calc-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lot-calc-overlay__head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.lot-calc-overlay__body {
  padding: 14px 18px 18px;
}

.lot-calc-rates {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.lot-calc-rates__label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 211, 176, 0.65);
  font-family: Oswald, sans-serif;
}

.lot-calc-rates__item {
  font-size: 0.78rem;
  color: var(--muted, rgba(255, 255, 255, 0.48));
  line-height: 1.35;
}

.lot-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
}
.lot-specs > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.lot-specs dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lot-specs dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}
.lot-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}
.lot-modal__actions .btn-primary,
.lot-modal__actions .ghost-btn {
  flex: 1 1 auto;
}
@media (max-width: 920px) {
  .lot-modal__body { grid-template-columns: 1fr; }
  .lot-modal__info { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 16px 24px 24px; }
  .lot-modal__gallery { padding: 16px 24px; }
}
@media (max-width: 640px) {
  .lot-modal { padding: 0; }
  .lot-modal__panel { border-radius: 0; max-height: 100vh; }
  .lot-specs { grid-template-columns: 1fr; }
  .lot-gallery__nav { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ----- Share toast (lot deep-link copy confirmation) ----- */
.share-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 25, 0.95);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  max-width: 90vw;
  text-align: center;
  white-space: pre-wrap;
}
.share-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── intro actions row ─────────────────────────────────────────────────── */
.intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.summary-contract-btn {
  width: 100%;
  margin-top: 14px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
}

.contract-contact-cell {
  display: flex;
  align-items: flex-end;
  min-height: 100%;
}

.contract-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 121, 0, 0.55);
  background: rgba(255, 121, 0, 0.14);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.contract-contact-btn:hover {
  background: rgba(255, 121, 0, 0.24);
  color: #fff;
}

.contract-chat {
  margin: 0 24px 16px;
  border: 1px solid rgba(255, 121, 0, 0.28);
  border-radius: 14px;
  background: rgba(255, 121, 0, 0.06);
  overflow: hidden;
}
.contract-chat[hidden] { display: none; }
.contract-chat__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.contract-chat__title {
  margin: 0;
  font-size: 1rem;
}
.contract-chat__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.contract-chat__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.contract-chat__auth,
.contract-chat__body {
  padding: 14px 16px 16px;
}
.contract-chat__auth-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
}
.contract-chat__auth-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.contract-chat__auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.contract-chat__thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 2px 10px;
}
.contract-chat__msg {
  display: flex;
}
.contract-chat__msg--out { justify-content: flex-end; }
.contract-chat__msg--in { justify-content: flex-start; }
.contract-chat__bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.contract-chat__msg--out .contract-chat__bubble {
  background: rgba(255, 121, 0, 0.18);
  border-color: rgba(255, 121, 0, 0.35);
}
.contract-chat__text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}
.contract-chat__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}
.contract-chat__sender { color: var(--accent); }
.contract-chat__ticks { letter-spacing: -1px; }
.contract-chat__msg[data-state="error"] .contract-chat__ticks { color: #ff6b6b; }
.contract-chat__status {
  min-height: 1.1em;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.contract-chat__status[data-kind="error"] { color: #ff8a80; }
.contract-chat__status[data-kind="ok"] { color: #8fd18f; }
.contract-chat__composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.contract-chat__composer textarea {
  width: 100%;
  min-height: 46px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}
.contract-chat__composer .btn-primary {
  min-height: 46px;
  white-space: nowrap;
}

/* ── Contract button pill ─────────────────────────────────────────────── */
.stock-pill--contract {
  cursor: pointer;
  border-color: var(--accent);
  background: rgba(255, 121, 0, 0.10);
  color: var(--accent);
  font-weight: 700;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.stock-pill--contract:hover {
  background: var(--accent);
  color: #1a0d00;
  transform: translateY(-1px);
}

.stock-pill--catalog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 700;
  transition: background 0.18s, color 0.18s, transform 0.18s, border-color 0.18s;
}

.stock-pill--catalog:hover {
  border-color: var(--accent);
  background: rgba(255, 121, 0, 0.14);
  color: var(--accent);
  transform: translateY(-1px);
}

.catalog-page {
  display: grid;
  gap: 18px;
  padding: 10px 2px 24px;
}

.catalog-page__top {
  display: grid;
  gap: 14px;
}

.catalog-page__back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  width: fit-content;
}

.catalog-page__back:hover {
  color: var(--accent);
}

.catalog__title {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  color: #fff;
}

/* ── Contract modal ───────────────────────────────────────────────────── */
.contract-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.contract-modal[hidden] { display: none; }
.contract-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.82);
  backdrop-filter: blur(6px);
}
.contract-modal__panel {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid rgba(255, 121, 0, 0.22);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}
.contract-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.contract-modal__head h2 {
  margin: 0;
  font-size: 1.2rem;
}
.contract-modal__sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.contract-modal__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.contract-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.contract-modal__body {
  overflow-y: auto;
  padding: 20px 24px 24px;
}

/* ── Contract form ────────────────────────────────────────────────────── */
.contract-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.contract-form__grid .wide {
  grid-column: 1 / -1;
}
.contract-countries {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  border: 0;
  margin: 0;
}
.contract-countries legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.contract-form__footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.contract-form__note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}
.contract-form__submit {
  align-self: flex-start;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .contract-modal { padding: 0; }
  .contract-modal__panel { border-radius: 0; max-height: 100vh; }
  .contract-form__grid { grid-template-columns: 1fr; }
  .contract-form__grid .wide { grid-column: auto; }
  .contract-countries { grid-template-columns: repeat(3, 1fr); }
}

body.contract-modal-open .cursor-glow {
  opacity: 0 !important;
}

.contract-modal__head-text { flex: 1; min-width: 0; }
.contract-preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 121, 0, 0.55);
  background: rgba(255, 121, 0, 0.14);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.contract-preview-btn:hover {
  background: rgba(255, 121, 0, 0.24);
  color: #fff;
}
.contract-preview-btn[aria-expanded="true"] {
  background: rgba(255, 121, 0, 0.32);
  color: #1a0d00;
}
.contract-preview { margin-bottom: 18px; }
.contract-preview__title { margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
.contract-preview__note { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.contract-preview__frame {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(255, 121, 0, 0.22);
  border-radius: 12px;
  background: #fff;
}
.contract-preview__iframe { width: 100%; min-height: 280px; border: 0; display: block; }
.contract-form__divider { height: 1px; margin: 4px 0 18px; background: var(--line); }
.contract-form__section-title { margin: 0 0 14px; font-size: 1rem; font-weight: 700; }

.intro__vin-btn {
  min-height: 44px;
  padding: 0 20px;
  font-weight: 700;
  white-space: normal;
}

@media (max-width: 720px) {
  .intro__actions {
    flex-direction: column;
  }

  .intro__actions .btn-primary,
  .intro__actions .stock-pill {
    width: 100%;
    justify-content: center;
  }
}

.china-vin-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.china-vin-modal[hidden] { display: none; }

.china-vin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.china-vin-modal__panel {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 121, 0, 0.24);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}

.china-vin-modal__panel[data-step="payment"],
.china-vin-modal__panel[data-step="result"] {
  overflow: hidden;
}

.china-vin-modal__panel[data-step="payment"] .china-vin-modal__status,
.china-vin-modal__panel[data-step="result"] .china-vin-modal__status {
  display: none;
}

.china-vin-modal__panel[data-step="payment"] #chinaVinPayment:not([hidden]),
.china-vin-modal__panel[data-step="result"] #chinaVinResult:not([hidden]) {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 78px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--surface);
  overflow: auto;
}

.china-vin-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
}

.china-vin-modal__head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.china-vin-modal__sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.china-vin-modal__close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.china-vin-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.china-vin-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 24px 8px;
}

.china-vin-tab {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.china-vin-tab--active {
  border-color: rgba(255, 121, 0, 0.45);
  background: rgba(255, 121, 0, 0.12);
  color: #fff;
}

.china-vin-form {
  display: grid;
  gap: 14px;
  padding: 8px 24px 24px;
}

.china-vin-includes {
  padding: 14px 16px;
  border: 1px solid rgba(255, 121, 0, 0.22);
  border-radius: 14px;
  background: rgba(255, 121, 0, 0.06);
}

.china-vin-includes__title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffd7b0;
}

.china-vin-includes__list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.china-vin-includes__list li {
  padding-left: 2px;
}

.china-vin-includes__list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.china-vin-form textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  resize: vertical;
}

.china-vin-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.china-vin-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.china-vin-modal__status {
  min-height: 20px;
  padding: 0 24px 12px;
  color: var(--muted);
  font-size: 14px;
}

.china-vin-modal__status[data-kind="error"] { color: #ffb4a2; }

#chinaVinResult { padding: 0 24px 24px; }

.china-vin-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 121, 0, 0.18);
  border-radius: 14px;
  background: rgba(255, 121, 0, 0.06);
}

.china-vin-result__lead {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.china-vin-result__label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.china-vin-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.china-vin-preview {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
}

.china-vin-preview__img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.china-vin-preview__platform {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 121, 0, 0.16);
  color: #ffd7b0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .china-vin-modal { padding: 0; }
  .china-vin-modal__panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .china-vin-preview { grid-template-columns: 1fr; }
}

/* china-vin payment */
.china-vin-payment {
  width: 100%;
  max-width: 420px;
  padding: 8px 0;
  text-align: center;
}
.china-vin-payment__lead {
  margin: 0 0 8px;
  font-size: .95rem;
  color: var(--text-muted, rgba(255,255,255,.6));
}
.china-vin-payment__amount {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 20px;
  color: var(--text, #fff);
}
.china-vin-payment__amount span {
  font-size: 1.4rem;
  opacity: .7;
}
.china-vin-payment__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.china-vin-result {
  width: 100%;
  max-width: 420px;
  padding: 8px 0;
}
.china-vin-result__lead {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text, #fff);
}
.china-vin-result__label {
  display: inline-block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .55;
  margin-right: 6px;
}
.top-orders {
  display: grid;
  gap: 18px;
  padding: 4px 2px 8px;
}

.top-orders__heading {
  margin: 0;
  max-width: 900px;
  font-size: clamp(36px, 6vw, 82px);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #ffffff;
}

.intro__lead {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
}

.top-orders__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.top-orders__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
}

.top-orders__card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.top-orders__photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.top-orders__photo--empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.top-orders__body {
  display: grid;
  gap: 8px;
}

.top-orders__model {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.top-orders__year {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 600;
}

.top-orders__price {
  margin: 0;
  color: var(--accent, #ff7900);
  font-size: 15px;
  font-weight: 700;
}

.top-orders__order {
  width: 100%;
  margin-top: 4px;
}

