/* sinomotors.ru redesign — layout & components (tokens in tokens.css) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-body);
  color: var(--c-ink); background: var(--c-page); line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-orange); }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }

:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--c-navy-bg); color: var(--c-on-dark-1); padding: 10px 18px;
  border-radius: 0 0 var(--r-small) 0;
}
.skip-link:focus { left: 0; }

.shell { max-width: 1440px; margin: 0 auto; padding: 0 var(--sp-margin); }
.dark { background: var(--c-navy-bg); color: var(--c-on-dark-1); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-navy-bg); color: var(--c-on-dark-1); border-bottom: 1px solid var(--c-navy-border); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 83px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand svg { height: 33px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a { font-size: var(--fs-body); color: var(--c-on-dark-1); padding: 6px 2px; }
.main-nav a:hover { color: var(--c-orange); }
.nav-sep { color: var(--c-navy-border); }
.city-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--c-on-dark-2); font-size: var(--fs-body); padding: 6px 2px; }
.city-btn::after { content: "▾"; font-size: 10px; color: var(--c-on-dark-3); }
.header-auth { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.header-auth a { font-size: var(--fs-body); color: var(--c-on-dark-1); }
.burger { display: none; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 80px; background-image: radial-gradient(circle at 88% 12%, rgb(143 97 20 / 22%), transparent 34%), radial-gradient(circle at 12% 90%, rgb(255 80 39 / 14%), transparent 30%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 576px; gap: 40px; align-items: start; }
.eyebrow { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: var(--ls-eyebrow); color: var(--c-on-dark-3); text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-family: var(--font-display); font-size: var(--fs-display); font-weight: var(--fw-display); line-height: var(--lh-display); margin-bottom: 18px; }
.hero-sub { color: var(--c-on-dark-2); max-width: 640px; margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-pill); padding: 13px 26px; font-size: var(--fs-body); font-weight: 600; transition: border-color .15s, background-color .15s, color .15s; }
.btn-primary { background: var(--c-orange); color: #fff; }
.btn-primary:hover { background: #E6441F; color: #fff; }
.btn-ghost { border: 1px solid #3A4C73; color: var(--c-on-dark-1); }
.btn-ghost:hover { border-color: var(--c-orange); color: var(--c-on-dark-1); }
.btn-highlight { background: var(--c-yellow); color: var(--c-ink); }
.btn-highlight:hover { background: #E8BF0F; color: var(--c-ink); }
.hero-panels { display: grid; gap: var(--sp-gutter); }
.promo-panel { background: var(--c-navy-panel); border: 1px solid var(--c-navy-border); border-radius: var(--r-panel); padding: 26px 28px; transition: border-color .15s; }
.promo-panel:hover { border-color: var(--c-orange); }
.promo-panel h2 { font-size: var(--fs-h2); line-height: 1.2; margin-bottom: 14px; }
.promo-panel p { color: var(--c-on-dark-2); margin-bottom: 14px; }
.usp-list { display: grid; gap: 10px; margin-bottom: 18px; }
.usp-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--c-on-dark-2); }
.usp-list li::before { content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c-orange); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.panel-link { display: inline-flex; gap: 8px; align-items: center; color: var(--c-on-dark-1); font-weight: 600; }
.panel-link:hover { color: var(--c-orange); }
.promo-panel.alt { background: var(--c-navy-panel-alt); }

/* ---------- sections ---------- */
.section { padding: var(--sp-section) 0 0; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.section-head h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-h2); }
.section-sub { color: var(--c-muted); margin-bottom: 18px; }
.section-more { margin-left: auto; font-size: var(--fs-body); font-weight: 600; color: var(--c-blue-legacy); white-space: nowrap; }
.section-more:hover { color: var(--c-orange); }
.carousel-meta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.counter { font-size: var(--fs-meta); color: var(--c-muted); white-space: nowrap; }

/* carousel */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--sp-gutter)) / 5); gap: var(--sp-gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 0 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-btn { position: absolute; top: 42%; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: var(--c-card); border: 1px solid var(--c-line); color: var(--c-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgb(16 22 35 / 8%); }
.rail-btn:hover { border-color: var(--c-orange); }
.rail-btn[disabled] { opacity: .35; cursor: default; }
.rail-btn.prev { left: -18px; }
.rail-btn.next { right: -18px; }
.rail-btn svg { width: 16px; height: 16px; }
.rail-btn.next svg { transform: rotate(180deg); }

/* ad card (premium / listings) */
.card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-card); overflow: hidden; transition: border-color .15s; display: block; }
.card:hover { border-color: var(--c-orange); }
.card:hover .card-title { color: var(--c-orange); }
.photo { aspect-ratio: 4 / 3; background: var(--c-tile-neutral); position: relative; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.broken img, .photo img[alt=""], .photo .fallback { position: absolute; inset: 0; }
.photo .fallback { display: none; align-items: center; justify-content: center; color: var(--c-muted); font-size: var(--fs-meta); background: linear-gradient(160deg, var(--c-tile-neutral), var(--c-tile-cool)); }
.photo.is-broken img { display: none; }
.photo.is-broken .fallback { display: flex; }
.card-body { padding: var(--sp-card-inner, 16px); display: grid; gap: 4px; }
.card-title { font-size: var(--fs-card-title); font-weight: var(--fw-card-title); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-trim { font-size: var(--fs-meta); color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-spec { font-size: var(--fs-meta); color: var(--c-muted); }
.card-price { font-size: var(--fs-price); font-weight: var(--fw-price); color: var(--c-orange); margin-top: 4px; }
.card-city { font-size: var(--fs-meta); color: var(--c-muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* category card */
.cat-card { position: relative; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-card); padding: 22px 20px 20px 26px; overflow: hidden; transition: border-color .15s; display: block; }
.cat-card:hover { border-color: var(--c-orange); }
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c-orange); }
.cat-card.alt::before { background: var(--c-yellow); }
.cat-name { font-size: var(--fs-card-title); font-weight: 700; margin-bottom: 6px; }
.cat-count { font-size: var(--fs-meta); color: var(--c-muted); }

/* model card */
.model-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-small); overflow: hidden; transition: border-color .15s; display: block; }
.model-card:hover { border-color: var(--c-orange); }
.model-card .photo { aspect-ratio: 3 / 2; }
.model-body { padding: 10px 12px 12px; }
.model-name { font-size: var(--fs-model); font-weight: 600; line-height: 1.3; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.model-price { font-size: var(--fs-model); font-weight: 700; color: var(--c-orange); white-space: nowrap; }

/* brand blocks */
.brand-block { margin-top: 26px; }
.brand-block-head { display: flex; align-items: baseline; margin: 0 0 4px; }
.brand-block-head h3 { font-family: var(--font-display); font-size: var(--fs-h2-m); font-weight: 400; }
.brand-block-head .section-more { font-size: var(--fs-body); }
.rail.catalog { grid-auto-columns: calc((100% - 5 * 17px) / 6); }
.rail.listings { grid-auto-columns: calc((100% - 3 * var(--sp-gutter)) / 4); }
.hairline { border-top: 1px solid var(--c-line); margin-top: 40px; }

/* ---------- press ---------- */
.press-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 336px 336px; gap: var(--sp-gutter); align-items: start; margin-top: 18px; }
.press-lead { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-card); overflow: hidden; transition: border-color .15s; display: block; }
.press-lead:hover { border-color: var(--c-orange); }
.press-lead .photo { aspect-ratio: 16 / 9; }
.press-lead-body { padding: 16px; }
.chip { display: inline-block; background: var(--c-soft-orange); color: var(--c-orange); border-radius: 999px; font-size: var(--fs-meta); font-weight: 700; padding: 4px 10px; margin-bottom: 10px; }
.press-lead h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.press-col h3 { font-size: var(--fs-h2-m); font-weight: 700; margin-bottom: 12px; }
.press-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--c-line); align-items: baseline; }
.press-item:first-child { border-top: 0; }
.press-item time { flex: none; font-size: var(--fs-meta); color: var(--c-muted); width: 62px; }
.press-item .t { font-size: var(--fs-body); line-height: 1.35; }
.press-item:hover .t { color: var(--c-orange); }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--sp-section); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand svg { height: 33px; width: auto; margin-bottom: 18px; }
.footer-contacts { display: grid; gap: 8px; }
.footer-contacts a { color: var(--c-on-dark-1); font-weight: 600; }
.footer-contacts a:hover { color: var(--c-orange); }
.footer-col h4 { font-size: var(--fs-body); font-weight: 700; margin-bottom: 14px; color: var(--c-on-dark-1); }
.footer-col a { display: block; color: var(--c-on-dark-2); font-size: var(--fs-body); padding: 5px 0; }
.footer-col a:hover { color: var(--c-orange); }
.footer-legal { margin-top: 40px; color: var(--c-on-dark-3); font-size: var(--fs-meta); }

/* ---------- cookie ---------- */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--c-navy-panel); color: var(--c-on-dark-2); border-top: 1px solid var(--c-navy-border); padding: 14px 0; }
.cookie-inner { display: flex; align-items: center; gap: 20px; }
.cookie-inner p { flex: 1; font-size: var(--fs-meta); }
.cookie-inner a { color: var(--c-on-dark-1); text-decoration: underline; }
.cookie-bar[hidden] { display: none; }
.cookie-cta { flex: none; }

/* ---------- skeletons / empty states ---------- */
.skeleton { background: linear-gradient(90deg, var(--c-tile-neutral) 25%, var(--c-tile-hint) 50%, var(--c-tile-neutral) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: var(--r-small); min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.empty-state { padding: 24px; color: var(--c-muted); font-size: var(--fs-body); text-align: center; border: 1px dashed var(--c-line); border-radius: var(--r-card); }

/* ---------- mobile bottom nav ---------- */
.bottom-nav { display: none; }

/* ================= responsive ================= */
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panels { grid-template-columns: 1fr 1fr; display: grid; }
  .rail { grid-auto-columns: calc((100% - 2 * var(--sp-gutter)) / 3); }
  .rail.catalog { grid-auto-columns: calc((100% - 3 * 17px) / 4); }
  .rail.listings { grid-auto-columns: calc((100% - var(--sp-gutter)) / 2); }
  .press-grid { grid-template-columns: 1fr 1fr; }
  .press-col { grid-column: span 1; }
}
@media (max-width: 1023px) {
  .main-nav { display: none; }
  .nav-sep, .header-auth .reg { display: none; }
  .burger { display: inline-flex; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--c-navy-border); border-radius: var(--r-small); align-items: center; justify-content: center; }
  .header-auth { margin-left: 0; }
  .mobile-nav { display: none; background: var(--c-navy-panel); border-bottom: 1px solid var(--c-navy-border); }
  .mobile-nav.open { display: block; }
  .mobile-nav a { display: block; padding: 12px var(--sp-margin); color: var(--c-on-dark-1); }
}
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }
@media (min-width: 768px) and (max-width: 1023px) { .shell { padding-left:24px; padding-right:24px; } .section { padding-top:80px; } .hero { padding-top:56px; } }
@media (max-width: 767px) {
  .shell { padding: 0 var(--sp-margin-m); }
  .header-inner { gap: 14px; }
  .brand img[alt="SINOMOTORS"] { display: none; }
  .brand::after { content: "SINOMOTORS"; font-weight: 700; letter-spacing: .06em; font-size: 16px; color: var(--c-on-dark-1); }
  .header-auth { display: none; }
  .city-btn { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding: 32px 0 40px; }
  .hero h1 { font-family: var(--font-display); font-size: var(--fs-display-m); line-height:1.2; }
  .hero-sub { font-size: 13.5px; }
  .hero-panels { grid-template-columns: 1fr; }
  .promo-panel { padding: 20px; }
  .promo-panel h2 { font-size: var(--fs-h2-m); }
  .section { padding-top: 48px; }
  .section-head h2 { font-size: var(--fs-h2-m); }
  .rail { grid-auto-columns: 222px; }
  .rail.catalog { grid-auto-columns: 186px; }
  .rail.listings { grid-auto-columns: 252px; gap: 12px; }
  .press-grid { grid-template-columns: 1fr; }
  .press-lead { display: flex; }
  .press-lead .photo { width: 92px; flex: none; aspect-ratio: 1; }
  .press-lead-body { padding: 12px; }
  .press-lead h3 { font-size: 13.5px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding-bottom: 88px; }
  .cookie-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 55; background: var(--c-card); border-top: 1px solid var(--c-line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; color: var(--c-muted); }
  .bottom-nav a.active { color: var(--c-ink); }
  .bottom-nav a.active::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--c-orange); }
  .hero-ctas .btn { flex: 1 1 46%; }
}


/* a6 corrective layer: align the admitted light/dark bands and exact tablet/mobile contract */
.site-header { background:#FBF8F3; color:#181310; border-bottom-color:#DED2C5; }
.site-header .main-nav a,.site-header .header-auth a { color:#241A15; }
.site-header .main-nav a:hover,.site-header .header-auth a:hover { color:var(--c-orange); }
.site-header .nav-sep { color:#BBAA99; }
.site-header .city-btn { color:#6F6258; }
.site-header .burger { color:#181310; border-color:#DED2C5; }
.site-header .brand img { filter: brightness(0) saturate(100%) invert(8%) sepia(9%) saturate(1177%) hue-rotate(341deg) brightness(95%) contrast(91%); }
.site-header .header-auth .reg { display:inline-flex; align-items:center; justify-content:center; padding:8.5px 13px; border-radius:19px; background:#181310; color:#FBF8F3; }
.site-header .header-auth .reg:hover { color:#fff; background:#33271f; }
.site-header .mobile-nav { background:#FBF8F3; border-color:#DED2C5; }
.site-header .mobile-nav a { color:#181310; }
.hero { background-color:#FBF8F3; background-image:radial-gradient(circle at 88% 12%,rgb(143 97 20 / 9%),transparent 34%),radial-gradient(circle at 12% 90%,rgb(255 80 39 / 7%),transparent 30%); color:#181310; }
.hero .eyebrow { color:#6F6258; }
.hero .hero-sub { color:#6F6258; }
.hero .btn-ghost { border-color:#DED2C5; color:#181310; }
.hero .btn-ghost:hover { color:#181310; }
.promo-panel.usp-panel { background:#fff; color:#181310; border-color:#DED2C5; }
.promo-panel.usp-panel p,.promo-panel.usp-panel .usp-list li { color:#6F6258; }
.promo-panel.usp-panel .panel-link { color:#181310; }
.world-band { background:#181310; color:#FBF8F3; padding-bottom:72px; }
.world-band .section-sub { color:#D9CEC2; }
.world-band .section-head h2,.world-band .brand-block-head h3 { color:#FBF8F3; }
.world-band .section-more { color:#E6C37C; }
.world-band .model-card,.world-band .card { background:#211A15; border-color:#514235; color:#FBF8F3; }
.world-band .model-name,.world-band .card-title { color:#FBF8F3; }
.world-band .model-price,.world-band .card-price { color:#E6C37C; }
.press-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.press-lead { grid-row:1; height:352px; display:flex; flex-direction:column; }
.press-lead .photo { aspect-ratio:auto; height:230px; flex:none; }
.press-col { grid-row:2; }
@media (min-width:1181px) { .hero-grid { grid-template-columns:minmax(0,1fr) 576px; } }
@media (min-width:768px) and (max-width:1023px) {
  .site-header .brand img { width:130px; height:auto; }
  .header-inner { gap:12px; height:83px; }
  .main-nav { display:flex; gap:13px; }
  .main-nav a { font-size:13px; }
  .nav-sep,.city-btn,.header-auth { display:none !important; }
  .burger { display:none !important; }
  .hero { padding-top:56px; }
  .hero-grid { grid-template-columns:1fr; }
  .hero h1 { font-size:48px; line-height:58px; }
  .hero-panels { grid-template-columns:1fr; }
  .hero-ctas { flex-wrap:nowrap; }
  .hero-ctas .btn { flex:1 1 0; white-space:nowrap; padding-left:12px; padding-right:12px; }
  .rail.listings { grid-auto-columns:calc((100% - var(--sp-gutter)) / 2); }
  .press-grid { grid-template-columns:1fr; }
  .press-lead,.press-col { grid-row:auto; }
  .press-lead .photo { aspect-ratio:16 / 9; }
  .press-col { display:block; }
  #world-h,#china-h,#press-h,.section-head h2 { font-size:32px; }
}
@media (max-width:767px) {
  .site-header .header-inner { position:relative; justify-content:flex-start; height:64px; }
  .site-header .burger { display:inline-flex !important; order:-1; margin:0; }
  .site-header .brand { position:absolute; left:50%; transform:translateX(-50%); }
  .site-header .brand img { display:none; }
  .site-header .brand::after { content:"SINOMOTORS"; color:#181310; font-size:16px; font-weight:700; letter-spacing:.06em; white-space:nowrap; }
  .site-header .city-btn,.site-header .header-auth { display:none !important; }
  .site-header .hero { color:#181310; }
  .promo-panel.usp-panel { background:#fff; color:#181310; }
  .promo-panel.usp-panel h2,.promo-panel.usp-panel p,.promo-panel.usp-panel .usp-list li,.promo-panel.usp-panel .panel-link { color:#181310; }
  .hero-ctas .btn-primary { flex:0 0 100%; width:100%; }
  .hero-ctas .btn:not(.btn-primary) { flex:1 1 calc(50% - 7px); }
  .cookie-bar { bottom:calc(40px + env(safe-area-inset-bottom)); }
  .press-grid { grid-template-columns:1fr; }
  .press-lead,.press-col { grid-row:auto; }
}
