:root {
  color-scheme: dark;
  --page: #03070b;
  --surface: #071019;
  --surface-soft: #0b141e;
  --surface-raised: #101923;
  --border: #26313c;
  --line: rgba(255,255,255,.08);
  --text: #f7f8fa;
  --muted: #9aa5b2;
  --accent: #8a42e8;
  --accent-strong: #a35cf4;
  --accent-rgb: 138, 66, 232;
  --brand-title: #fff;
  --shadow: 0 24px 70px rgba(0,0,0,.45);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #e9ebef;
  --surface: #fff;
  --surface-soft: #fafafa;
  --surface-raised: #fff;
  --border: #d7dbe1;
  --line: rgba(15,23,42,.1);
  --text: #17191d;
  --muted: #626974;
  --accent: #e1262d;
  --accent-strong: #fa3b36;
  --accent-rgb: 225, 38, 45;
  --brand-title: #16181c;
  --shadow: 0 20px 60px rgba(15,23,42,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 12px;
  background: var(--page);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  transition: background-color .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.site-shell {
  width: min(1680px, calc(100% - 16px));
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: background-color .35s ease, border-color .35s ease;
}

.header {
  min-height: 126px;
  display: grid;
  grid-template-columns: 310px minmax(320px, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 22px 38px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 15px; min-width: 0; }
.brand__mark {
  width: 63px; height: 63px; flex: 0 0 auto; display: grid; place-items: center;
  border: 1px solid rgba(123,143,255,.4); border-radius: 13px;
  background: linear-gradient(145deg,#2148a8,#08184c); color: #fff;
  font-size: 27px; font-weight: 800; box-shadow: inset 0 1px 8px rgba(255,255,255,.13);
}
.brand__copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand__copy strong { color: var(--brand-title); font-size: 23px; white-space: nowrap; }
.brand__copy small { color: var(--muted); font-size: 13px; white-space: nowrap; }

.search {
  height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 20px; border: 1px solid var(--line); border-radius: 30px;
  background: var(--surface-raised); transition: background .35s ease, border-color .35s ease, box-shadow .2s ease;
}
.search:focus-within { border-color: rgba(var(--accent-rgb),.7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1); }
.search > svg, .search button svg { width: 23px; height: 23px; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--muted); opacity: .85; }
.search button { display: grid; place-items: center; padding: 4px; border: 0; background: transparent; cursor: pointer; }
.header__actions { display: flex; align-items: center; gap: 25px; }
.theme-toggle {
  position: relative; width: 85px; height: 70px; padding: 5px; border: 2px solid var(--accent);
  border-radius: 14px; background: rgba(var(--accent-rgb),.06); cursor: pointer;
  transition: border-color .35s, background .35s, transform .2s;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle__thumb { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: #a78bed; transition: transform .35s cubic-bezier(.25,.8,.25,1), color .35s; }
.theme-toggle svg { grid-area: 1/1; width: 33px; height: 33px; transition: opacity .25s, transform .35s; }
.icon-sun { opacity: 0; transform: rotate(-70deg) scale(.5); }
:root[data-theme="light"] .theme-toggle__thumb { transform: translateX(20px); color: #16181c; }
:root[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(70deg) scale(.5); }
:root[data-theme="light"] .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
.cart { position: relative; width: 47px; height: 56px; padding: 4px; border: 0; background: transparent; cursor: pointer; }
.cart svg { width: 38px; height: 38px; }
.cart__count { position: absolute; top: 0; right: -3px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #f42127; color: white; font-size: 12px; font-weight: 800; border: 2px solid var(--surface); }
.account-link { width: 47px; height: 47px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%; color: var(--text); transition: border-color .2s, color .2s, background .2s; }
.account-link:hover,.account-link.is-current { color: var(--accent-strong); border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.account-link svg { width: 27px; height: 27px; }

.hero { position: relative; min-height: 530px; overflow: hidden; border-bottom: 1px solid var(--line); }
.quick-links {
  height: 108px; width: 55%; margin-left: auto; display: grid; grid-template-columns: repeat(4,1fr);
  border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 0 0 0 22px;
}
.quick-links a { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; transition: color .2s; }
.quick-links a:hover { color: var(--accent); }
.quick-links__icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--text); }
.quick-links svg { width: 28px; height: 28px; }
.hero__content { min-height: 422px; display: grid; grid-template-columns: 43% 57%; }
.hero__copy { position: relative; z-index: 3; padding: 28px 0 36px 40px; }
.hero h1 { margin: 0 0 24px; color: var(--text); font-size: clamp(29px,3.1vw,43px); line-height: 1.18; letter-spacing: -.025em; text-transform: uppercase; }
.hero ul { display: flex; flex-direction: column; gap: 12px; margin: 0 0 34px; padding: 0; list-style: none; color: var(--text); font-size: 16px; }
.hero li::before { content: "◆"; margin-right: 13px; color: var(--accent); font-size: 10px; vertical-align: 2px; }
.catalog-button {
  min-width: 235px; min-height: 60px; display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px;
  background: linear-gradient(135deg,var(--accent-strong),color-mix(in srgb,var(--accent) 75%,#4d168c));
  color: white; font-weight: 700; box-shadow: 0 8px 22px rgba(var(--accent-rgb),.22); transition: transform .2s, box-shadow .2s;
}
.catalog-button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--accent-rgb),.3); }
.hero__visual { position: relative; min-width: 0; overflow: hidden; }
.hero__visual::before { content: ""; position: absolute; inset: -25% 0 0 -40%; background: linear-gradient(135deg,transparent 40%,rgba(30,50,72,.16) 40% 48%,transparent 48%); z-index: 1; }
.hero__visual img { position: absolute; z-index: 2; right: 2%; bottom: 0; width: 96%; height: 100%; object-fit: contain; object-position: center bottom; mix-blend-mode: normal; transition: filter .35s, opacity .35s; }
.hero__accent { display: none; }

:root[data-theme="light"] .hero { background: linear-gradient(120deg,#fff 0%,#fff 48%,#f6f6f6 100%); }
:root[data-theme="light"] .hero h1 { color: var(--accent); }
:root[data-theme="light"] .hero__visual img { opacity: 1; filter: none; mix-blend-mode: normal; }
:root[data-theme="light"] .hero__visual::after { content: ""; position: absolute; z-index: 1; right: -6%; top: 6%; width: 48%; height: 90%; background: linear-gradient(140deg,#df1f27,#ac0610); transform: skewX(-25deg); }
:root[data-theme="light"] .hero__accent { display: block; position: absolute; z-index: 1; height: 3px; background: #f0474c; transform: rotate(-41deg); transform-origin: left center; }
:root[data-theme="light"] .hero__accent--one { width: 340px; left: 2%; top: 69%; }
:root[data-theme="light"] .hero__accent--two { width: 215px; left: 31%; top: 28%; }

.brands { padding: 28px 30px 34px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 8px 28px; }
.section-heading small { color: var(--muted); font-size: 10px; }
.section-heading h2 { margin: 1px 0 0; font-size: 24px; }
.section-heading a { color: var(--accent-strong); font-size: 14px; font-weight: 600; }
.section-heading__count { color: var(--accent-strong); font-size: 14px; font-weight: 600; }
.brand-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 17px; }
.brand-card {
  min-width: 0; height: 142px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.008);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.brand-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 25px rgba(var(--accent-rgb),.1); }
.brand-card strong { font-size: 14px; white-space: nowrap; }
.brand-logo { width: 116px; height: 52px; display: grid; place-items: center; }
.brand-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1) brightness(0) invert(1) drop-shadow(0 2px 2px rgba(0,0,0,.45)); transition: filter .2s, transform .2s; }
.brand-card:hover .brand-logo img { transform: scale(1.04); filter: grayscale(1) brightness(0) invert(1) drop-shadow(0 3px 5px rgba(var(--accent-rgb),.3)); }
:root[data-theme="light"] .brand-logo img { filter: grayscale(1) brightness(.18) drop-shadow(0 1px 1px rgba(15,23,42,.18)); }
:root[data-theme="light"] .brand-card:hover .brand-logo img { filter: grayscale(1) brightness(.18) drop-shadow(0 3px 5px rgba(var(--accent-rgb),.2)); }
.brand-card[href="#haval"] .brand-logo,.brand-card[href="#great-wall"] .brand-logo { width: 122px; height: 42px; }
.brand-card[href="#changan"] .brand-logo { width: 72px; }
.brand-card[href="#jac"] .brand-logo { width: 105px; }

.benefits { display: grid; grid-template-columns: repeat(4,1fr); padding: 18px 26px; }
.benefit { min-height: 78px; display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-right: 1px solid var(--line); }
.benefit:last-child { border-right: 0; }
.benefit svg { width: 36px; height: 36px; flex: 0 0 auto; color: var(--accent-strong); }
.benefit div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.benefit strong { font-size: 12px; white-space: nowrap; }
.benefit span { color: var(--muted); font-size: 11px; white-space: nowrap; }

@media (min-width: 1400px) {
  .header { min-height: 138px; padding: 24px 44px; }
  .hero { min-height: 590px; }
  .hero__content { min-height: 482px; }
  .hero__copy { padding-top: 38px; padding-left: 48px; }
  .hero h1 { font-size: 48px; }
  .hero ul { font-size: 17px; }
  .brand-card { height: 154px; }
  .benefits { padding-top: 22px; padding-bottom: 22px; }
}

@media (max-width: 930px) {
  .header { grid-template-columns: 1fr auto; gap: 18px; padding: 18px 24px; }
  .search { grid-row: 2; grid-column: 1/-1; }
  .quick-links { width: 65%; }
  .hero__content { grid-template-columns: 50% 50%; }
  .hero__copy { padding-left: 28px; }
  .brand-grid { grid-template-columns: repeat(4,1fr); }
  .benefits { grid-template-columns: repeat(2,1fr); }
  .benefit:nth-child(2) { border-right: 0; }
  .benefit:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (min-width: 931px) and (max-width: 1200px) {
  .brand-grid { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 640px) {
  body { padding: 0; }
  .site-shell { border-width: 0; border-radius: 0; }
  .header { min-height: auto; grid-template-columns: 1fr auto; padding: 15px; gap: 14px; }
  .brand__mark { width: 47px; height: 47px; font-size: 21px; border-radius: 10px; }
  .brand__copy strong { font-size: 17px; }
  .brand__copy small { font-size: 9px; }
  .header__actions { gap: 8px; }
  .theme-toggle { width: 55px; height: 47px; border-radius: 11px; }
  .theme-toggle__thumb { width: 33px; height: 33px; }
  .theme-toggle svg { width: 25px; height: 25px; }
  :root[data-theme="light"] .theme-toggle__thumb { transform: translateX(12px); }
  .cart { width: 39px; height: 45px; }
  .cart svg { width: 30px; height: 30px; }
  .cart__count { width: 19px; height: 19px; font-size: 10px; }
  .account-link { width: 39px; height: 39px; }
  .account-link svg { width: 23px; height: 23px; }
  .search { height: 50px; padding: 0 14px; }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .quick-links { order: 2; width: 100%; height: 85px; border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .quick-links a { gap: 5px; font-size: 10px; }
  .quick-links svg { width: 23px; height: 23px; }
  .hero__content { order: 1; min-height: 600px; display: block; }
  .hero__copy { padding: 30px 20px 0; }
  .hero h1 { font-size: clamp(27px,8vw,37px); }
  .hero ul { font-size: 13px; gap: 10px; }
  .catalog-button { min-width: 200px; min-height: 52px; }
  .hero__visual { position: absolute; inset: 300px 0 85px 0; }
  .hero__visual img { right: 2%; bottom: 0; width: 96%; height: 100%; object-position: center bottom; }
  .brands { padding: 25px 15px 30px; }
  .section-heading { margin: 0 3px 20px; }
  .section-heading h2 { font-size: 20px; }
  .brand-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .brand-card { height: 120px; gap: 16px; }
  .benefits { grid-template-columns: 1fr; padding: 8px 15px; }
  .benefit { border-right: 0; border-bottom: 1px solid var(--line); }
  .benefit:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
