/**
 * VinFast eBus theme. Values measured from the eBus header/footer designs
 * (1440px) and, for the mobile drawer, copied from vinfast_v2's #menu-main-nav.
 */

@font-face { font-family: Mulish; font-weight: 300; font-display: swap; src: url(../fonts/Mulish-Light.woff2) format("woff2"); }
@font-face { font-family: Mulish; font-weight: 400; font-display: swap; src: url(../fonts/Mulish-Regular.woff2) format("woff2"); }
@font-face { font-family: Mulish; font-weight: 500; font-display: swap; src: url(../fonts/Mulish-Medium.woff2) format("woff2"); }
@font-face { font-family: Mulish; font-weight: 600; font-display: swap; src: url(../fonts/Mulish-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Mulish; font-weight: 700; font-display: swap; src: url(../fonts/Mulish-Bold.woff2) format("woff2"); }

:root {
  --ebus-blue: #1464f4;
  --ebus-text: #3c3c3c;
  --ebus-black: #000;
  --ebus-page-bg: #ffffff;
  --ebus-footer-bg: #d9e1e2;
  --ebus-header-h: 60px;
  --ebus-gutter: 75px;
}

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

body.ebus {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Mulish, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ebus-text);
  background: var(--ebus-page-bg);
}

.ebus a { color: inherit; text-decoration: none; }
.ebus img { max-width: 100%; height: auto; display: block; }
.ebus ul { list-style: none; margin: 0; padding: 0; }
.ebus button { font: inherit; }
.ebus .visually-hidden {
  position: absolute !important; clip: rect(1px, 1px, 1px, 1px); overflow: hidden;
  height: 1px; width: 1px; word-wrap: normal;
}
.ebus :focus-visible { outline: 2px solid var(--ebus-blue); outline-offset: 2px; }

/* Core wraps the page in .dialog-off-canvas-main-canvas: keep the flex
 * chain through it so the footer sits at the bottom of short pages. */
body.ebus > .dialog-off-canvas-main-canvas {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.ebus-main { flex: 1 0 auto; }

/* ---------------------------------------------------------------- Header */

.ebus-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
}

.ebus-header__inner {
  display: flex;
  align-items: center;
  height: var(--ebus-header-h);
  padding-left: var(--ebus-gutter);
  padding-right: var(--ebus-gutter);
}

.ebus-header__brand .ebus-logo img { width: 155px; }

.ebus-header__nav { margin-left: 60px; }
.ebus-header__nav ul { display: flex; gap: 50px; }
.ebus-header__nav a { display: block; line-height: var(--ebus-header-h); color: var(--ebus-text); }
.ebus-header__nav a:hover,
.ebus-header__nav a.is-active { color: var(--ebus-blue); }

.ebus-header__actions,
.ebus-header__actions .region { display: flex; align-items: center; height: 100%; }
.ebus-header__actions { margin-left: auto; }
.ebus-header__actions .region { gap: 50px; }
.ebus-header__actions .block { height: 100%; display: flex; align-items: center; }

/* Language indicator (static: the site has no language module). */
.ebus-lang { display: inline-flex; align-items: center; gap: 6px; color: var(--ebus-text); }
.ebus-lang__icon {
  width: 18px; height: 18px; flex: none;
  background: url(../images/icon-language.svg) center / contain no-repeat;
}
.ebus-lang--full { color: var(--ebus-black); gap: 12px; }
.ebus-lang--full .ebus-lang__icon { width: 20px; height: 20px; margin-left: 3px; margin-right: -3px; filter: brightness(0); }
.ebus-lang--full::after {
  content: ""; width: 14px; height: 14px;
  background: url(../images/icon-chevron-down.svg) center / contain no-repeat;
}

/* Contact Us button: full header height, flush right. */
.ebus-cta--button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: var(--ebus-header-h);
  min-width: 147px;
  padding: 0 24px;
  font-size: 14px;
  color: #fff !important;
  background: var(--ebus-blue);
  transition: background-color .2s;
}
.ebus-cta--button::after {
  content: ""; width: 20px; height: 20px;
  background: url(../images/icon-arrow-up-right.svg) center / contain no-repeat;
}
.ebus-cta--button:hover { background: #0f4fc4; }

/* Mobile drawer toggle: hamburger icon with a "Menu" label under it. */
.ebus-header__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  height: var(--ebus-header-h);
  margin-left: auto;
  margin-right: -6px;
  padding: 0 6px;
  border: 0;
  cursor: pointer;
  color: #000;
  background: none;
}
.ebus-header__toggle-icon {
  width: 24px;
  height: 24px;
  background: url(../images/icon-menu.svg) center / 24px no-repeat;
}
.ebus-header__toggle-label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: .02em;
}
.ebus-header__toggle:hover { color: var(--ebus-blue); }

/* ---------------------------------------------------------------- Footer */

.ebus-footer {
  position: relative;
  margin-top: 60px;
  padding: 126px 16px 60px;
  background: var(--ebus-footer-bg);
  border-radius: 20px 20px 0 0;
  color: var(--ebus-black);
}

/* Centred notch cut into the top edge (136 x 50 in the design). */
.ebus-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 136px;
  height: 50px;
  transform: translateX(-50%);
  background: var(--ebus-page-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 136 50'%3E%3Cpath d='M0 0C10 0 14 3 20 9L58 45Q68 53 78 45L116 9C122 3 126 0 136 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 136 50'%3E%3Cpath d='M0 0C10 0 14 3 20 9L58 45Q68 53 78 45L116 9C122 3 126 0 136 0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.ebus-footer__inner {
  display: grid;
  grid-template-columns: 330px 332px minmax(0, 408px);
  max-width: 1070px;
  margin: 0 auto;
}

/* Fixed columns, so a hidden (unconfigured) column leaves the others in place. */
.ebus-footer__brand { grid-column: 1; }
.ebus-footer__links { grid-column: 2; }
.ebus-footer__info { grid-column: 3; }

.ebus-footer__brand .ebus-logo img { width: 115px; }

.ebus-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  column-gap: 30px;
}
/* Flatten the region so the built-in Cookies Settings link can sit between
 * the footer menu and the language/social row. */
.ebus-footer__links .region { display: contents; }
.ebus-footer__links nav { order: 1; flex-basis: 100%; }
.ebus-footer__links nav li + li { margin-top: 16px; }
.ebus-footer__links nav a,
.ebus-footer__cookies { color: var(--ebus-black); line-height: 24px; }
.ebus-footer__cookies { order: 2; flex-basis: 100%; margin: 16px 0 30px; }
.ebus-footer__links nav:not(:has(li)) + .ebus-footer__cookies,
.ebus-footer__links .region:empty + .ebus-footer__cookies { margin-top: 0; }
.ebus-footer__links .block--ebus-language { order: 3; }
.ebus-footer__links .block--ebus-social { order: 4; }
.ebus-footer__links a:hover { color: var(--ebus-blue); }

.ebus-footer__info p { margin: 0; line-height: 24px; color: var(--ebus-black); }
.ebus-footer__info a { color: var(--ebus-blue); }

.ebus-footer__bottom {
  margin-top: 57px;
  text-align: center;
  font-size: 12px;
  color: var(--ebus-text);
}
.ebus-footer__bottom p { margin: 0; }

.ebus-social { display: flex; gap: 16px; }
.ebus-social__link {
  display: block; width: 18px; height: 18px;
  background: url(../images/icon-linkedin.svg) center / contain no-repeat;
}

/* ---------------------------------------------------------------- Drawer
 * Mirrors vinfast_v2 #menu-main-nav (common.css / common-mobile.css).
 */

.ebus-drawer { display: none; }

@media only screen and (max-width: 1199px) {
  .ebus-header__inner { padding-left: 16px; padding-right: 16px; }
  .ebus-header__nav,
  .ebus-header__actions { display: none; }
  .ebus-header__toggle { display: flex; }

  .ebus-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
  }
  .ebus-drawer.is-open { display: block; animation: ebus-fade-in .3s ease both; }
  .ebus-drawer.is-closing { display: block; animation: ebus-fade-out .3s ease both; }

  .ebus-drawer__overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .7);
  }

  .ebus-drawer__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    padding: 3rem;
    overflow-y: auto;
    background: #fff;
    border-left: .25rem solid var(--ebus-blue);
  }

  .ebus-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2.25rem;
  }
  .ebus-drawer__label {
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 150%;
    letter-spacing: -.02rem;
    text-transform: uppercase;
    color: #000;
  }
  .ebus-drawer__close {
    padding: 0; border: 0; background: none; cursor: pointer;
    font-size: 1.25rem; line-height: 1; color: #000;
  }
  .ebus-drawer__close:hover { color: var(--ebus-blue); }

  .ebus-drawer nav li { margin: 0 0 1.875rem; }
  .ebus-drawer nav li:last-child { margin: 0; }
  .ebus-drawer nav a { color: var(--ebus-text); padding: 0 0 .625rem; }
  .ebus-drawer nav a:hover { color: var(--ebus-blue); }

  /* Language row: like #btn-multilanguages. */
  .ebus-lang--drawer {
    position: relative;
    display: block;
    margin: 1.5rem 0;
    padding-left: 3.125rem;
    background: url(../images/icon-language.svg) 0 center / 28px no-repeat;
  }
  .ebus-lang--drawer .ebus-lang__region { display: block; color: #000; }
  .ebus-lang--drawer .ebus-lang__language {
    display: block; margin-top: .25rem;
    font-size: .75rem; line-height: .875rem; color: rgba(0, 0, 0, .7);
  }
  .ebus-lang--drawer::after {
    content: ""; position: absolute; right: 0; top: 50%;
    width: .375rem; height: .625rem; transform: translateY(-50%);
    background: url(../images/icon-chevron-right.svg) center / contain no-repeat;
  }

  /* Full-width CTA: like the main drawer's "My Account" button. */
  .ebus-cta--block {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #fff !important;
    background: var(--ebus-blue);
    border: 1px solid var(--ebus-blue);
  }

  /* Mobile footer (Footer_MB.png, 390px): left-aligned stack, horizontal
   * logo, links, full-width divider, info text, then language + social. */
  .ebus-footer {
    margin-top: 40px;
    padding: 28px 16px 17px;
    border-radius: 15px 15px 0 0;
  }
  .ebus-footer::before { width: 70px; height: 26px; }

  .ebus-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 32px;
    max-width: none;
  }
  /* Flatten the links region so its blocks can be ordered individually. */
  .ebus-footer__links,
  .ebus-footer__links .region { display: contents; }

  .ebus-footer__brand { order: 1; flex-basis: 100%; }
  .ebus-footer__brand .ebus-logo img { width: 333px; max-width: 100%; margin-left: -2px; }

  /* Menu blocks render as a bare <nav> (core template), other blocks as .block. */
  .ebus-footer__links nav,
  .ebus-footer__links .block { order: 2; flex-basis: 100%; }
  .ebus-footer__links nav { margin: 24px 0 0; }
  .ebus-footer__links nav li + li { margin-top: 24px; }
  .ebus-footer__cookies { order: 2; flex-basis: 100%; margin: 24px 0 0; }

  .ebus-footer__info {
    order: 3;
    flex-basis: calc(100% + 32px);
    margin: 29px -16px 0;
    padding: 30px 16px 0;
    border-top: 2px solid #e8eded;
  }

  .ebus-footer__links .block--ebus-language { order: 4; flex-basis: auto; margin-top: 31px; }
  .ebus-footer__links .block--ebus-social { order: 5; flex-basis: auto; margin-top: 31px; }

  .ebus-footer__bottom { margin-top: 42px; }
}

body.ebus-drawer-open { overflow: hidden; }

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

@media (prefers-reduced-motion: reduce) {
  .ebus-drawer.is-open,
  .ebus-drawer.is-closing { animation-duration: 1ms; }
}
