/* MBVNS Design System v2 — presentation only, no DB/SEO changes.
 * Reverse-engineered UI behavior from mercedes-benz.com.vn/vi (blocked by bot-wall,
 * so derived from local DAM mapping + public MB OneWeb patterns) + reusable ideas
 * from reference repos (see /root/mercedes-ui-reference/README-MBVNS.md).
 * No !important. Single source of tokens. Components: mb-header/nav/mega/mobile/
 * hero/section/vehicle-grid/vehicle-card/button/breadcrumb/footer.
 */
/* Brand webfaces. Local files only (assets/fonts); every weight below has a real file. */
@font-face {
  font-family: "MBCorpoSText";
  src: url("fonts/mbcorpos-text-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MBCorpoSText";
  src: url("fonts/mbcorpos-text-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MBCorpoSTitle";
  src: url("fonts/mbcorpos-title-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MBCorpoSTitle";
  src: url("fonts/mbcorpos-title-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
/* Source headings resolve to MBCorpo Title regular, with DaimlerCAC as the serif fallback. */
@font-face {
  font-family: "MBCorpo Title";
  src: url("fonts/mbcorpos-title-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DaimlerCAC-Regular";
  src: url("fonts/daimlercac-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MBCorpoATitleCond";
  src: url("fonts/mbcorpoa-titlecond-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DaimlerCS-Regular";
  src: url("fonts/daimlercs-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --mb-black: #000;
  --mb-white: #fff;
  --mb-ink: #1a1a1a;
  --mb-gray-900: #1a1a1a;
  --mb-gray-700: #333;
  --mb-gray-600: #63666a;
  --mb-gray-400: #cfcfcf;
  --mb-gray-200: #e6e6e6;
  --mb-gray-100: #f5f5f5;
  --mb-grey: #63666a;
  --mb-line: #e6e6e6;
  --mb-blue: #0078d6;
  --mb-blue-dark: #005fa3;
  --mb-bg: #fff;
  --mb-bg-soft: #f5f5f5;
  --mb-container: 1280px;
  --mb-wrap: 1280px;
  --mb-space-1: 4px;
  --mb-space-2: 8px;
  --mb-space-3: 12px;
  --mb-space-4: 16px;
  --mb-space-5: 20px;
  --mb-space-6: 24px;
  --mb-space-8: 32px;
  --mb-space-12: 48px;
  --mb-radius-sm: 4px;
  --mb-radius: 8px;
  --mb-radius-lg: 12px;
  --mb-radius-pill: 999px;
  --mb-transition: 0.25s ease;
  --mb-header-h: 84px;
  --mb-font-text: "MBCorpoSText", "DaimlerCS-Regular", "Helvetica Neue", Arial, sans-serif;
  /* DaimlerCAC is the source stack's serif fallback and matches its title metrics
     (26px card title fits one line in 283px); MBCorpo S Title is a wider cut. */
  --mb-font-title: "DaimlerCAC-Regular", "MBCorpo Title", "MBCorpoSTitle", serif;
  --mb-font-cond: "MBCorpoATitleCond", Arial, sans-serif;
}

/* Base */
html { box-sizing: border-box; }
html, body { overflow-x: clip; }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; color: var(--mb-ink); font-family: var(--mb-font-text); background: var(--mb-bg); }
img { max-width: 100%; height: auto; }
a { color: inherit; }

/* mb-section: canonical section container (alias .mb-wrap kept for BC) */
.mb-section, .mb-wrap { max-width: var(--mb-container); margin: 0 auto; padding: var(--mb-space-12) var(--mb-space-6); }
.mb-section h1, .mb-wrap h1 { font-family: var(--mb-font-title); font-size: 64px; line-height: 1.1; margin: 0 0 var(--mb-space-4); font-weight: 400; }
.mb-section h2, .mb-wrap h2 { font-family: var(--mb-font-title); font-size: 40px; line-height: 1.2; margin: 0 0 var(--mb-space-2); font-weight: 400; }
.mb-sub { color: var(--mb-gray-600); margin: 0 0 28px; font-size: 17px; }
.mb-kicker { color: var(--mb-gray-600); font-size: 17px; margin: 0 0 var(--mb-space-2); }

/* mb-button system (alias .mb-btn kept) */
.mb-button, .mb-btn { display: inline-block; background: var(--mb-blue); color: var(--mb-white); border-radius: var(--mb-radius-pill); padding: 12px 28px; text-decoration: none; font-size: 15px; border: 0; cursor: pointer; transition: background var(--mb-transition); line-height: 1.4; }
.mb-button:hover, .mb-btn:hover { background: var(--mb-blue-dark); }
.mb-button-small, .mb-btn-small { padding: 9px 20px; font-size: 14px; }
.mb-button-outline { display: inline-block; border: 1px solid var(--mb-white); color: var(--mb-white); border-radius: var(--mb-radius-pill); padding: 9px 20px; text-decoration: none; font-size: 14px; transition: background var(--mb-transition), color var(--mb-transition); }
.mb-button-outline:hover { background: var(--mb-white); color: var(--mb-black); }
.mb-btn-outline { display: inline-block; border: 1px solid #fff; color: #fff; border-radius: var(--mb-radius-pill); padding: 9px 20px; text-decoration: none; font-size: 14px; align-self: flex-start; }
.mb-btn-outline-dark { display: inline-block; border: 1px solid var(--mb-ink); color: var(--mb-ink); border-radius: var(--mb-radius-pill); padding: 9px 20px; text-decoration: none; font-size: 14px; }

/* mb-header / mb-nav / mega / mobile — ref: header 84px, logo centered, 4 primary left + actions right */
.mb-header, .mbvns-header { background: var(--mb-black); min-height: var(--mb-header-h); padding: 0 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: sticky; top: 0; z-index: 50; }
.mb-header .mb-logo, .mbvns-header .mb-logo { position: absolute; left: 50%; transform: translateX(-50%); display: block; }
.mb-header .mb-logo img, .mbvns-header .mb-logo img { height: 48px; width: 48px; display: block; }
.mb-header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mb-icon-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; border-radius: var(--mb-radius-sm); color: var(--mb-white); font-size: 14px; cursor: pointer; padding: 10px; transition: opacity var(--mb-transition), background var(--mb-transition); }
.mb-icon-btn svg { width: 20px; height: 20px; display: block; }
.mb-icon-btn:hover { opacity: .75; }
.mb-icon-btn:focus-visible { outline: 2px solid var(--mb-white); outline-offset: 2px; }
.mb-lang-code { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.mb-login { border: 1px solid rgba(255,255,255,.4); border-radius: var(--mb-radius-lg); padding: 8px 16px; margin-left: 8px; }
.mb-login:hover { background: rgba(255,255,255,.12); opacity: 1; }
:focus-visible { outline-offset: 2px; }
.mb-nav ul, .mbvns-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.mb-nav a, .mbvns-nav a { color: var(--mb-white); text-decoration: none; font-size: 16px; padding: 6px 0; }
.mb-nav a:hover, .mbvns-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mb-nav .has-mega { position: relative; }
.mb-mega-menu { display: none; position: absolute; left: 0; top: 100%; background: var(--mb-white); color: var(--mb-ink); min-width: 680px; max-width: min(920px, calc(100vw - 48px)); border: 1px solid var(--mb-line); border-radius: var(--mb-radius); box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 24px 28px; z-index: 60; }
.has-mega:hover .mb-mega-menu, .has-mega:focus-within .mb-mega-menu, .has-mega.open .mb-mega-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mb-mega-col { display: flex; flex-direction: column; gap: 2px; }
.mb-mega-cta { display: flex; flex-direction: column; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--mb-line); }
.mb-mega-cta a { font-size: 13px; color: var(--mb-gray-600); white-space: nowrap; }
.mb-mega-menu a { color: var(--mb-ink); font-size: 14px; display: block; padding: 6px 0; }
.mb-mega-menu strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--mb-gray-600); margin-bottom: 6px; }
.mb-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.mb-header-compact { display: none; }
.mb-burger span { display: block; width: 24px; height: 2px; background: var(--mb-white); margin: 5px 0; transition: transform var(--mb-transition), opacity var(--mb-transition); }
.mb-mobile-menu { display: none; }

/* mb-hero single — ref 1425x594 stage, CTA 170x53 pill, overlay, pause, brand switcher */
.mb-hero { position: relative; background: var(--mb-black); height: 594px; display: flex; align-items: flex-end; overflow: hidden; }
.mb-hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.mb-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.mb-hero-inner { position: relative; z-index: 1; max-width: var(--mb-container); margin: 0 auto; padding: 0 20px 199px; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: var(--mb-space-4); }
.mb-hero .mb-btn { padding: 16px 32px; font-size: 16px; line-height: 1.25; }
.mb-hero-pause { position: absolute; z-index: 2; left: max(20px, calc((100vw - var(--mb-container)) / 2 + 20px)); bottom: 24px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.35); color: var(--mb-white); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--mb-transition); }
.mb-hero-pause:hover { background: rgba(0,0,0,.6); }
.mb-hero-pause .mb-ic-play { display: none; }
.mb-hero-pause[aria-pressed="true"] .mb-ic-play { display: block; }
.mb-hero-pause[aria-pressed="true"] .mb-ic-pause { display: none; }
.mb-brand-switch { position: relative; z-index: 5; width: max-content; max-width: calc(100vw - 32px); margin: -32px auto 0; display: flex; background: var(--mb-white); border: 1px solid var(--mb-line); border-radius: var(--mb-radius-pill); padding: 6px; box-shadow: 0 8px 28px rgba(0,0,0,.22); overflow-x: auto; }
.mb-brand-tab { border: 0; background: none; border-radius: var(--mb-radius-pill); padding: 12px 28px; font-size: 14px; font-family: inherit; cursor: pointer; color: var(--mb-ink); display: flex; align-items: center; white-space: nowrap; }
.mb-brand-tab img { height: 10px; width: auto; display: block; }
.mb-brand-tab.active { background: var(--mb-black); color: var(--mb-white); }
.mb-brand-tab { text-decoration: none; justify-content: center; }
.mb-brand-tab.active img { filter: brightness(0) invert(1); }
.mb-hero .mb-breadcrumb { color: rgba(255,255,255,.75); }
.mb-hero .mb-breadcrumb a { color: rgba(255,255,255,.9); }
.mb-hero-kicker { color: var(--mb-white); font-size: 22px; margin: 0 0 var(--mb-space-4); }

/* mb-vehicle-grid / mb-vehicle-card — ideas: phnam CarGrid 3col + CarItem hover swap, pattarapong product grid */
.mb-vehicle-grid, .mb-model-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mb-featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mb-vehicle-card, .mb-model, .mb-vehicle { text-decoration: none; color: inherit; border: 1px solid var(--mb-line); border-radius: var(--mb-radius); overflow: hidden; background: var(--mb-white); display: flex; flex-direction: column; }
.mb-vehicle-card img, .mb-model img, .mb-vehicle > img { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: block; background: var(--mb-bg-soft); }
.mb-vehicle-card h3, .mb-model h3, .mb-vehicle h3 { margin: 12px 16px 4px; font-size: 17px; font-family: var(--mb-font-title); }
.mb-vehicle .mb-price, .mb-vehicle-card .mb-price { font-size: 15px; color: var(--mb-ink); font-weight: 600; }
.mb-price { margin: 0 16px 16px; color: var(--mb-gray-600); font-size: 14px; }
.mb-specs { list-style: none; margin: 0 20px 12px; padding: 0; color: var(--mb-gray-600); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.mb-result-count { color: var(--mb-gray-600); font-size: 14px; min-height: 20px; margin: 0 0 16px; }
.mb-empty-note { color: var(--mb-gray-600); }
.mb-empty-note[hidden] { display: none; }
.mb-model { transition: transform var(--mb-transition), box-shadow var(--mb-transition); }
.mb-model:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }

/* mb-breadcrumb */
.mb-breadcrumb { font-size: 13px; color: var(--mb-gray-600); margin: 0 0 var(--mb-space-4); }
.mb-breadcrumb ol { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; flex-wrap: wrap; }
.mb-breadcrumb a { text-decoration: none; }
.mb-breadcrumb a:hover { text-decoration: underline; }
.mb-breadcrumb [aria-current="page"] { color: var(--mb-ink); }

/* mb-footer — 4-col grid + legal bar */
.mb-footer, .mbvns-footer { background: var(--mb-black); color: var(--mb-gray-400); padding: var(--mb-space-12) var(--mb-space-6) var(--mb-space-6); display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mb-foot-top { grid-column: 1 / -1; display: flex; justify-content: center; margin-bottom: 8px; }
.mb-foot-totop { display: flex; flex-direction: column; align-items: center; gap: 0; background: none; border: 0; color: var(--mb-white); font-family: inherit; cursor: pointer; padding: 8px 16px; }
.mb-foot-totop-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #e8e8e8; }
.mb-foot-totop-label { font-size: 12px; line-height: 16px; color: #e8e8e8; }
.mb-foot-head { color: var(--mb-white); font-size: 15px; margin: 0 0 12px; font-weight: 700; }
button.mb-foot-head { background: none; border: 0; padding: 0; font-family: inherit; text-align: left; }
.mb-chat-panel[hidden] { display: none; }
.mb-icon-label { font-size: 14px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--mb-gray-700); padding-top: 16px; display: flex; gap: 20px; font-size: 13px; flex-wrap: wrap; align-items: center; }
.mb-foot-legal a { color: var(--mb-gray-400); text-decoration: none; }
/* Social row: phone/tablet footer only (assets/footer-mobile.css); the desktop grid keeps its four columns. */
.mb-foot-social { display: none; }
.mbvns-footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mbvns-footer-nav a { color: var(--mb-gray-400); text-decoration: none; font-size: 14px; }
.mbvns-footer-nav a:hover { color: var(--mb-white); }

/* Responsive — true mobile layouts, no horizontal scroll */
@media (max-width: 1280px) {
  .mb-vehicle-grid, .mb-model-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .mb-header, .mbvns-header { padding: 0 24px; }
  .mb-vehicle-grid, .mb-model-grid, .mb-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .mb-footer, .mbvns-footer { grid-template-columns: repeat(4, 1fr); }
  .mb-section, .mb-wrap { padding: 36px 20px; }
}
@media (max-width: 768px) {
  .mb-hero { height: auto; min-height: 560px; }
  .mb-hero-inner { padding: 32px 24px 110px; }
  .mb-section h1, .mb-wrap h1 { font-size: 40px; }
  .mb-section h2, .mb-wrap h2 { font-size: 28px; }
  .mb-mega-menu { display: none; }
}
@media (max-width: 600px) {
  .mb-brand-switch { padding: 4px; }
  .mb-brand-tab { padding: 8px 14px; font-size: 12px; }
  .mb-brand-tab img { height: 10px; }
  .mb-vehicle-grid, .mb-model-grid, .mb-featured-grid { grid-template-columns: 1fr; }
  .mb-section h2, .mb-wrap h2 { font-size: 24px; }
  .mb-footer, .mbvns-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  /* Source keeps a 5% container inset at every mobile width (20.1@402, 22@440). */
  .mb-section, .mb-wrap { padding: 28px 5vw; }
  .mb-button, .mb-btn { width: auto; max-width: 100%; }
}
@media (max-width: 390px) {
  .mb-footer, .mbvns-footer { grid-template-columns: 1fr; }
}
@media (max-width: 375px) {
  .mb-section h2, .mb-wrap h2 { font-size: 22px; }
}

/* Ref desktop shows 4 primary left links; extras stay in DOM/mobile+footer to preserve URLs */
@media (min-width: 901px) {
  .mb-nav-extra { display: none; }
}
/* Mobile nav behavior */
@media (max-width: 900px) {
  /* Compact header and phone/tablet footer: assets/header-mobile.css, assets/footer-mobile.css. */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none; }
}
