/* ===================================================================
   Velsoft Header 2026
   All rules are scoped under .vh2026 so they never leak into the theme.
   =================================================================== */

/* Hide the theme / Elementor default header while this header is in use. */
#site-header,
header#site-header,
body #site-header {
  display: none !important;
}

.vh2026 {
  --vh-text: #171a20;
  --vh-grey: #5c5e62;
  --vh-hover-bg: rgba(0, 0, 0, 0.05);
  --vh-header-height: 56px;
  /* Font is intentionally not set — it inherits from the active theme. */
  color: var(--vh-text);
  -webkit-font-smoothing: antialiased;
}

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

/* Spacer that offsets the fixed header when enabled */
.vh-header-spacer {
  height: 56px;
}

/* ===================== Header ===================== */
.vh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  color: var(--vh-text);
}

.vh-header .header-inner {
  height: var(--vh-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
}

/* Logo */
.vh-header .logo {
  display: flex;
  align-items: center;
  color: inherit;
  z-index: 2;
  text-decoration: none;
}

.vh-header .logo-wordmark {
  height: 28px;
  width: auto;
  display: block;
}

.vh-header .logo-img {
  height: 20px;
  width: auto;
  display: block;
}

/* Custom logo width (set via the "Logo width" option) overrides the defaults. */
.vh-header .logo[style*="--vh-logo-w"] .logo-wordmark,
.vh-header .logo[style*="--vh-logo-w"] .logo-img,
.vh-header .logo[style*="--vh-logo-w"] svg,
.vh-header .logo[style*="--vh-logo-w"] img {
  width: var(--vh-logo-w) !important;
  height: auto !important;
}

/* Center navigation */
.vh-header .primary-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}

.vh-header .primary-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.vh-header .primary-nav a,
.vh-header .primary-nav button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 16px;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.vh-header .primary-nav a:hover,
.vh-header .primary-nav button:hover,
.vh-header .primary-nav li.active button {
  background-color: var(--vh-hover-bg);
}

/* Right controls */
.vh-header .header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.vh-header .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.vh-header .icon-btn:hover {
  background-color: var(--vh-hover-bg);
}

.vh2026 .tds-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

/* Defensive: keep the right-side control icons visible even if the theme /
   Elementor resets svg sizing or fill. The svg is a flex item inside the
   round button, so it must not be allowed to shrink to 0 width. */
.vh-header .header-controls .icon-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex: 0 0 auto !important;
  display: block;
  color: var(--vh-text);
  fill: currentColor;
}
.vh-header .header-controls .icon-btn svg path {
  fill: currentColor;
}

.vh-header .menu-btn {
  display: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 16px;
  border-radius: 100px;
  transition: background-color 0.15s ease;
}

.vh-header .menu-btn:hover {
  background-color: var(--vh-hover-bg);
}

/* ===================== Mega Menu ===================== */
.vh2026 .mega-menu {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding-top: var(--vh-header-height);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: height 0.5s cubic-bezier(0.5, 0, 0, 0.75),
              visibility 0s linear 0.5s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  z-index: -1;
}

.vh-header.menu-open .mega-menu {
  visibility: visible;
  transition: height 0.5s cubic-bezier(0.5, 0, 0, 0.75),
              visibility 0s;
}

/* Backdrop scrim (dims + blurs the page behind the open menu) */
.vh2026 .menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  visibility: hidden;
  z-index: 900;
  transition: background-color 0.5s cubic-bezier(0.5, 0, 0, 0.75) 0.25s,
              backdrop-filter 0.5s cubic-bezier(0.5, 0, 0, 0.75) 0.25s,
              -webkit-backdrop-filter 0.5s cubic-bezier(0.5, 0, 0, 0.75) 0.25s,
              visibility 0s linear 0.75s;
}

.vh2026 .menu-scrim.show {
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  visibility: visible;
  transition: background-color 0.5s cubic-bezier(0.5, 0, 0, 0.75) 0.25s,
              backdrop-filter 0.5s cubic-bezier(0.5, 0, 0, 0.75) 0.25s,
              -webkit-backdrop-filter 0.5s cubic-bezier(0.5, 0, 0, 0.75) 0.25s,
              visibility 0s;
}

.vh2026 .mega-panel {
  display: none;
  padding: 20px 48px 48px;
  max-width: 1700px;
  margin: 0 auto;
}

.vh2026 .mega-panel.active {
  display: block;
}

/* Product panels: grid on the left, secondary links sidebar on the right */
.vh2026 .mega-panel.active:has(.panel-secondary) {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.vh2026 .panel-products {
  flex: 1;
  min-width: 0;
}

.vh2026 .panel-secondary {
  flex-shrink: 0;
  width: 210px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e8e8e8;
  padding-left: 48px;
  padding-top: 8px;
}

.vh2026 .panel-secondary a {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--vh-text);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.vh2026 .panel-secondary a:hover {
  color: var(--vh-grey);
}

/* --- Product card grid --- */
.vh2026 .vehicle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 24px;
}

.vh2026 .v-card {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 16px;
  text-align: center;
}

.vh2026 .v-img {
  width: 100%;
  max-width: 184px;
  height: 104px;
  object-fit: contain;
  object-position: center;
  margin-bottom: 6px;
}

.vh2026 .v-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--vh-text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.vh2026 .v-links {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.vh2026 .v-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--vh-grey);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.vh2026 .v-links a:hover {
  color: var(--vh-text);
}

/* Product panels without a sidebar (e.g. Shop): center the cards */
.vh2026 .mega-panel:not(:has(.panel-secondary)) .vehicle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.vh2026 .mega-panel:not(:has(.panel-secondary)) .v-card {
  width: 200px;
}

/* Whole-card link (Shop-style category cards) */
.vh2026 .v-card-link {
  text-decoration: none;
  color: inherit;
}

/* --- Text columns --- */
.vh2026 .discover-columns {
  display: flex;
  gap: 96px;
  padding-left: 356px;
  padding-top: 12px;
}

.vh2026 .d-col {
  display: flex;
  flex-direction: column;
}

.vh2026 .d-heading {
  font-size: 14px;
  font-weight: 500;
  color: var(--vh-grey);
  margin: 0 0 20px;
}

.vh2026 .d-col a {
  font-size: 14px;
  font-weight: 500;
  color: var(--vh-text);
  text-decoration: none;
  padding: 8px 0;
  white-space: nowrap;
}

.vh2026 .d-col a:hover {
  color: var(--vh-grey);
}

/* --- Fade-in-down entrance (re-runs every time a panel opens / switches) --- */
@keyframes vhFadeInDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vh2026 .mega-panel .v-card,
.vh2026 .mega-panel .d-col,
.vh2026 .mega-panel .panel-secondary a {
  opacity: 0;
}

.vh-header.menu-open .mega-panel.active .v-card,
.vh-header.menu-open .mega-panel.active .d-col,
.vh-header.menu-open .mega-panel.active .panel-secondary a {
  animation: vhFadeInDown 0.4s cubic-bezier(0.5, 0, 0, 0.75) both;
}

/* Gentle left-to-right stagger across the cards / columns */
.vh-header.menu-open .mega-panel.active .v-card:nth-child(2),
.vh-header.menu-open .mega-panel.active .d-col:nth-child(2) { animation-delay: 0.05s; }
.vh-header.menu-open .mega-panel.active .v-card:nth-child(3),
.vh-header.menu-open .mega-panel.active .d-col:nth-child(3) { animation-delay: 0.09s; }
.vh-header.menu-open .mega-panel.active .v-card:nth-child(4) { animation-delay: 0.13s; }
.vh-header.menu-open .mega-panel.active .v-card:nth-child(5) { animation-delay: 0.05s; }
.vh-header.menu-open .mega-panel.active .v-card:nth-child(6) { animation-delay: 0.09s; }
.vh-header.menu-open .mega-panel.active .v-card:nth-child(7) { animation-delay: 0.13s; }

/* ===================== Mobile Menu ===================== */
.vh2026 .mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  visibility: hidden;
  pointer-events: none;
  z-index: 3000;
  transition: background-color 0.5s cubic-bezier(0.5, 0, 0, 0.75),
              visibility 0s linear 0.5s;
}

.vh2026 .mobile-overlay.open {
  background: rgba(0, 0, 0, 0.3);
  visibility: visible;
  pointer-events: auto;
  transition: background-color 0.5s cubic-bezier(0.5, 0, 0, 0.75),
              visibility 0s;
}

.vh2026 .mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 480px;
  background: #fff;
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.5, 0, 0, 0.75),
              opacity 0.5s cubic-bezier(0.5, 0, 0, 0.75);
}

.vh2026 .mobile-overlay.open .mobile-panel {
  transform: translateX(0);
  opacity: 1;
}

/* Shared header row for root + submenus */
.vh2026 .mm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 12px;
  flex-shrink: 0;
}

.vh2026 .mm-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--vh-text);
}

.vh2026 .mm-header-spacer {
  width: 40px;
}

.vh2026 .mm-back,
.vh2026 .mm-close {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  color: var(--vh-text);
  transition: background-color 0.2s ease;
}

.vh2026 .mm-back:hover,
.vh2026 .mm-close:hover {
  background-color: var(--vh-hover-bg);
}

.vh2026 .mm-header .tds-icon {
  width: 32px;
  height: 32px;
}

/* Root level */
.vh2026 .mm-root {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.vh2026 .mm-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.vh2026 .mm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--vh-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 24px;
  text-decoration: none;
  font-family: inherit;
  transition: color 0.33s, background-color 0.33s;
}

.vh2026 .mm-item:hover {
  background-color: var(--vh-hover-bg);
}

.vh2026 .mm-chevron {
  width: 20px;
  height: 20px;
  color: var(--vh-grey);
  flex-shrink: 0;
}

/* Right controls inside the mobile menu (icon + label) */
.vh2026 .mm-controls {
  margin-top: auto;
  border-top: 1px solid #e8e8e8;
  padding: 4px 0;
}

.vh2026 .mm-ctrl-item {
  justify-content: flex-start !important;
  gap: 16px;
  text-align: left;
}

.vh2026 .mm-ctrl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--vh-text);
}

.vh2026 .mm-ctrl-icon .tds-icon {
  width: 24px;
  height: 24px;
}

/* Region row */
.vh2026 .mm-region {
  margin-top: auto;
  border-top: 1px solid #e8e8e8;
  padding-top: 4px;
}

.vh2026 .mm-region-label {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vh2026 .mm-globe {
  width: 24px;
  height: 24px;
  color: var(--vh-text);
  flex-shrink: 0;
}

.vh2026 .mm-region-country {
  display: block;
  font-size: 16px;
  font-weight: 500;
}

.vh2026 .mm-region-lang {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--vh-grey);
}

/* Submenu levels (push navigation) */
.vh2026 .mm-sub {
  position: absolute;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.5, 0, 0, 0.75);
}

.vh2026 .mm-sub.active {
  transform: translateX(0);
}

.vh2026 .mm-sub-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 40px;
}

/* Reflow the cloned desktop panels for mobile */
.vh2026 .mm-sub-body .vehicle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vh2026 .mm-sub-body .v-card {
  width: auto;
}

.vh2026 .mm-sub-body .v-img {
  width: 100%;
  height: 96px;
}

.vh2026 .mm-sub-body .discover-columns {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 8px 8px 0;
}

.vh2026 .mm-sub-body .d-col a {
  white-space: normal;
}

/* Secondary links stack full-width below the product grid on mobile */
.vh2026 .mm-sub-body .panel-secondary {
  width: auto;
  border-left: none;
  border-top: 1px solid #e8e8e8;
  padding-left: 0;
  margin-top: 16px;
  padding-top: 8px;
}

.vh2026 .mm-sub-body .panel-secondary a {
  padding: 12px 8px;
  font-size: 16px;
}

/* ===================== Responsive ===================== */
/* Medium desktop: tighten spacing so the grid + sidebar still fit */
@media (max-width: 1300px) {
  .vh2026 .mega-panel {
    padding-left: 24px;
    padding-right: 24px;
  }
  .vh2026 .mega-panel.active:has(.panel-secondary) {
    gap: 32px;
  }
  .vh2026 .panel-secondary {
    width: 190px;
    padding-left: 32px;
  }
  .vh2026 .discover-columns {
    padding-left: 200px;
    gap: 64px;
  }
}

@media (max-width: 1130px) {
  .vh-header .primary-nav,
  .vh-header .icon-btn {
    display: none;
  }
  .vh-header .menu-btn {
    display: inline-block;
  }
  .vh2026 .discover-columns {
    padding-left: 40px;
    gap: 48px;
    flex-wrap: wrap;
  }
}
