
/* ===================================
   YANKEE MOTORS — SIDE NAVIGATION
   =================================== */

/* Hamburger button */
.site-header .ym-menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  padding: 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.ym-menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 3px;
  background: #16344e;
  transition: transform .25s ease;
}

.site-header .ym-menu-toggle:hover {
  background: #f3f5f7;
}

/* Login in top navigation */
.site-header nav a.ym-nav-login {
  color: #1169c8;
  font-weight: 700;
}

.site-header nav a.ym-nav-account,
.site-header nav button.ym-nav-signout {
  color: #1169c8;
  font: inherit;
  font-weight: 700;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* Dark overlay */
.ym-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(9, 20, 32, .40);
  opacity: 0;
  transition: opacity .3s ease;
}

.ym-menu-overlay[hidden] {
  display: none !important;
}

.ym-menu-overlay.is-visible {
  opacity: 1;
}

/* Side drawer */
.ym-side-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;

  display: flex;
  flex-direction: column;

  width: min(340px, 88vw);
  height: 100vh;
  height: 100dvh;

  background: #ffffff;
  box-shadow: 8px 0 32px rgba(0,0,0,.10);

  transform: translateX(-105%);
  visibility: hidden;

  transition:
    transform .32s cubic-bezier(.22,1,.36,1),
    visibility .32s;
}

.ym-side-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Drawer header */
.ym-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid #ededed;
}

.ym-menu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #18354d;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
}

.ym-menu-brand img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.ym-menu-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #f5f5f5;
  color: #30343a;
  font-size: 26px;
  cursor: pointer;
}

/* Menu body */
.ym-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 25px 17px;
}

.ym-menu-label {
  margin: 0 12px 12px;
  color: #9098a1;
  font: 700 10px "Inter", sans-serif;
  letter-spacing: 1.2px;
}

.ym-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ym-menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  padding: 15px 13px;
  border-radius: 10px;

  color: #263544;
  background: transparent;
  text-decoration: none;

  font: 600 13px "Inter", sans-serif;
  transition: background .2s ease;
}

.ym-menu-links a:hover {
  background: #f5f6f7;
}

.ym-menu-links a span:last-child {
  color: #9ba8b4;
  font-size: 22px;
  font-weight: 400;
}

/* Signed-in customers get a focused, task-first drawer. */
.ym-menu-links.ym-account-priority-links { gap: 7px; }
.ym-menu-links.ym-account-priority-links a { min-height: 48px; padding: 13px; border: 1px solid transparent; }
.ym-menu-links.ym-account-priority-links a > span:first-child { display: grid; gap: 3px; }
.ym-menu-links.ym-account-priority-links a b { color: #214f58; font-size: 12px; }
.ym-menu-links.ym-account-priority-links a small { color: #73898d; font-size: 10px; font-weight: 500; line-height: 1.35; }
.ym-menu-links.ym-account-priority-links .ym-menu-priority { min-height: 64px; border-color: #c9e1dc; background: #edf8f5; }
.ym-menu-links.ym-account-priority-links .ym-menu-priority:hover { background: #e4f4f0; }
.ym-menu-links.ym-account-priority-links .ym-menu-priority > span:last-child { color: #43877c; }

.ym-menu-separator {
  height: 1px;
  margin: 23px 9px;
  background: #eeeeee;
}

/* Login / register */
.ym-menu-account {
  display: grid;
  gap: 10px;
  padding: 0 8px;
}

.ym-menu-account a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 10px 15px;

  border-radius: 9px;
  text-decoration: none;
  font: 700 12px "Inter", sans-serif;

  transition: background .2s ease;
}

.ym-menu-account .ym-menu-login {
  color: #263544;
  background: #fafafa;
  border: 1px solid #e2e5e8;
}

.ym-menu-account .ym-menu-register {
  color: #ffffff;
  background: #1169c8;
}

.ym-menu-account .ym-menu-register:hover {
  background: #0959ad;
}

.ym-menu-account .ym-menu-signout {
  min-height: 43px;
  padding: 10px 15px;
  border: 1px solid #f0c7c7;
  border-radius: 9px;
  background: #fff7f7;
  color: #b42318;
  font: 700 12px "Inter", sans-serif;
  cursor: pointer;
}

/* Drawer footer */
.ym-menu-footer {
  padding: 18px 24px;
  border-top: 1px solid #eeeeee;
  color: #929ba5;
  font: 400 11px "Inter", sans-serif;
}

/* Keyboard focus */
.ym-menu-toggle:focus-visible,
.ym-side-menu button:focus-visible,
.ym-side-menu a:focus-visible {
  outline: 2px solid #1169c8;
  outline-offset: 3px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .site-header .ym-menu-toggle {
    width: 34px;
    height: 34px;
  }

  .ym-side-menu {
    width: min(310px, 88vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ym-side-menu,
  .ym-menu-overlay {
    transition: none;
  }
}

/* =============================================
   YANKEE MOTORS — RESPONSIVE HEADER LAYOUT
   ============================================= */

/* DESKTOP HEADER */

.site-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Logo stays left */

.site-header > .brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Navigation stays centered */

.site-header .ym-desktop-nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  white-space: nowrap;
}

.site-header .ym-desktop-nav a {
  text-decoration: none;
  font-weight: 600;
}

.site-header .ym-desktop-nav .ym-nav-login {
  color: #1169c8;
  font-weight: 700;
}

.site-header .ym-desktop-nav .ym-nav-account,
.site-header .ym-desktop-nav .ym-nav-signout {
  color: #1169c8;
  font-weight: 700;
}

.site-header .ym-desktop-nav .ym-nav-signout:hover {
  color: #a71d14;
}

/* US location stays right */

.site-header .ym-us-location {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

/* Hide mobile-only controls on desktop */

.site-header .ym-menu-toggle,
.site-header .ym-mobile-login {
  display: none !important;
}

/* =============================================
   MOBILE HEADER
   ============================================= */

@media (max-width: 900px) {

  .site-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 11px 15px;
  }

  /* Show hamburger on mobile */

  .site-header .ym-menu-toggle {
    display: flex !important;
    order: 1;
    flex-shrink: 0;
    margin: 0;
  }

  /* Logo beside hamburger */

  .site-header > .brand {
    order: 2;
    flex: 1;
    min-width: 0;
    font-size: 16px;
    white-space: nowrap;
  }

  .site-header > .brand img {
    width: 29px;
    height: 29px;
  }

  /* Hide desktop navigation */

  .site-header .ym-desktop-nav,
  .site-header .ym-us-location {
    display: none !important;
  }

  /* Mobile Login on far right */

  .site-header .ym-mobile-login {
    display: inline-flex !important;
    order: 3;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 8px;
    background: #1169c8;
    color: #ffffff;
    text-decoration: none;
    font: 700 12px "Inter", sans-serif;
    box-sizing: border-box;
  }

  .site-header .ym-mobile-login:hover {
    background: #0958aa;
  }
}

/* Very small phones */

@media (max-width: 360px) {

  .site-header {
    gap: 5px;
    padding-inline: 9px;
  }

  .site-header > .brand {
    font-size: 13px;
  }

  .site-header > .brand img {
    width: 24px;
    height: 24px;
  }

  .site-header .ym-mobile-login {
    padding: 7px 10px;
    font-size: 11px;
  }
}
