/* =============================================================
   custom-navigation.css — DSY Group Navbar
   Complete file: paste this as your full custom-navigation.css
============================================================= */
html, body { overflow: visible !important; }
/* ── Reset & tokens ───────────────────────────────────────── */
:root {
  --nav-bg:       #ffffff;
  --nav-border:   #e8e8e8;
  --nav-height:   72px;
  --brand-blue:   #0055a5;
  --accent:       #0055a5;
  --text-nav:     #1a1a2e;
  --text-muted:   #666;
  --mega-bg:      #ffffff;
  --mega-shadow:  0 20px 60px rgba(0,0,0,.13);
  --mega-radius:  14px;
  --hover-bg:     #f0f6ff;
  --font-main:    'Segoe UI', system-ui, sans-serif;
  --transition:   .25s cubic-bezier(.4,0,.2,1);
}

/* ── Base nav shell ───────────────────────────────────────── */
.dsy-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  font-family: var(--font-main);
}

.dsy-navbar .container {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── Logo ─────────────────────────────────────────────────── */
.dsy-logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* ── Desktop nav links ────────────────────────────────────── */
.dsy-nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex-wrap: nowrap;
}

.dsy-nav-links > li > a,
.dsy-nav-links > li > button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-nav);
  text-decoration: none;
  border-radius: 7px;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  letter-spacing: .01em;
}

.dsy-nav-links > li > a:hover,
.dsy-nav-links > li > button:hover,
.dsy-nav-links > li.active > a {
  background: var(--hover-bg);
  color: var(--accent);
}

.dsy-nav-links > li > a.active {
  color: var(--accent);
}

/* chevron icon */
.dsy-chevron {
  width: 14px; height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.has-mega:hover .dsy-chevron {
  transform: rotate(180deg);
}

/* ── Right side ───────────────────────────────────────────── */
.dsy-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dsy-social-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}

.dsy-social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  color: #0a7aca;
  font-size: 15px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.dsy-social-links a:hover {
  background: var(--hover-bg);
  color: var(--accent);
}

.dsy-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: #f3f3f3;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.dsy-sidebar-toggle:hover { background: var(--hover-bg); }

/* =============================================================
   MEGA MENU — Two-panel layout (sidebar left, cards right)
   THE KEY RULE: .mega-menu must be display:flex + flex-direction:row
============================================================= */
.has-mega { position: relative; }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);

  width: 860px;
  max-height: 520px;

  /* ↓↓ THESE TWO LINES are what places sidebar + panel side-by-side ↓↓ */
  display: flex;
  flex-direction: row;
  /* ↑↑ ───────────────────────────────────────────────────────────── ↑↑ */

  background: var(--mega-bg);
  border-radius: var(--mega-radius);
  box-shadow: var(--mega-shadow);
  border: 1px solid #e4e8ee;
  overflow: hidden;               /* clips sidebar bg to rounded corners */
  padding: 0;                     /* NO padding — sidebar/panel handle their own */

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1000;
}

/* Hover bridge — fills gap between trigger and menu top edge */
.mega-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0; right: 0;
  height: 16px;
  pointer-events: none;
}

/* Show menu on hover / keyboard focus */
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.has-mega:hover .mega-menu::before,
.has-mega:focus-within .mega-menu::before {
  pointer-events: auto;
}

/* ── LEFT SIDEBAR ─────────────────────────────────────────── */
.mega-sidebar {
  width: 220px;
  min-width: 220px;               /* prevent flex from shrinking it */
  flex-shrink: 0;
  background: #f7f9fc;
  border-right: 1px solid #e4e8ee;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  align-self: stretch;            /* fill full height of menu */
}

.mega-sidebar-section {
  padding: 0 0 8px;
}

.mega-sidebar-heading {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #999;
  padding: 10px 20px 6px;
  display: block;
}

.mega-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-nav);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border-left: 3px solid transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  background: none;
  width: 100%;
  text-align: left;
  line-height: 1.4;
}

.mega-sidebar-link:hover,
.mega-sidebar-link.active {
  background: #ffffff;
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.mega-sidebar-link svg {
  opacity: 0;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.mega-sidebar-link:hover svg,
.mega-sidebar-link.active svg { opacity: 1; }

.mega-sidebar-divider {
  height: 1px;
  background: #e4e8ee;
  margin: 8px 16px;
}

/* ── RIGHT PANEL ──────────────────────────────────────────── */
.mega-panel {
  flex: 1;                        /* takes all remaining width */
  min-width: 0;                   /* prevents overflow past mega-menu width */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Individual category panel — hidden by default */
.mega-panel-section {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 0;
}

/* Only the active panel is shown */
.mega-panel-section.active {
  display: flex;
}

.mega-panel-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

/* ── Vehicle cards grid ───────────────────────────────────── */
.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.mega-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition), border-color var(--transition);
  border: 1px solid transparent;
}

.mega-card:hover {
  background: var(--hover-bg);
  border-color: #ddeeff;
}

.mega-card-img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  background: #eef2f8;
  border: 1px solid #e0e8f0;
}

.mega-card-img-placeholder {
  width: 72px;
  height: 52px;
  border-radius: 7px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8f0fe, #c8daff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.mega-card-body  { flex: 1; min-width: 0; }

.mega-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-nav);
  margin-bottom: 3px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-card:hover .mega-card-title { color: var(--accent); }

.mega-card-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mega-card-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  background: #e8f0fe;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Panel footer ─────────────────────────────────────────── */
.mega-footer {
  flex-shrink: 0;
  padding: 12px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.mega-footer a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mega-footer a:hover { text-decoration: underline; }

/* ── FIXED offcanvas ──────────────────────────────────────── */
.dsy-offcanvas {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  visibility: hidden;   
  pointer-events: none;
}

.dsy-offcanvas.open {
  visibility: visible;
  pointer-events: auto;
}

.dsy-offcanvas-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity var(--transition);
}

.dsy-offcanvas.open .dsy-offcanvas-backdrop { opacity: 1; }

.dsy-offcanvas-panel {
  position: relative;
  margin-left: auto;
  width: 320px;
  max-width: 90vw;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dsy-offcanvas.open .dsy-offcanvas-panel { transform: translateX(0); }

.dsy-offcanvas-close {
  align-self: flex-end;
  background: #f3f3f3;
  border: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dsy-offcanvas-close:hover { background: #ffe0e0; color: #c00; }

.sidebar-contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sidebar-contact-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--hover-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.sidebar-contact-value {
  font-size: 13px;
  color: var(--text-nav);
  line-height: 1.5;
}

.sidebar-social { display: flex; gap: 8px; }

.sidebar-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #f3f3f3;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-nav); font-size: 15px; text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.sidebar-social a:hover { background: var(--hover-bg); color: var(--accent); }

.sidebar-login-btn {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  padding: 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  transition: opacity var(--transition);
}

.sidebar-login-btn:hover { opacity: .85; }

hr.sidebar-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 0;
}

/* ── Mobile hamburger ─────────────────────────────────────── */
.dsy-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 7px;
}

.dsy-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-nav);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ── Mobile drawer ────────────────────────────────────────── */
.dsy-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  visibility: hidden;    /* hides from event stack entirely - prevents scroll block */
  pointer-events: none;
}

.dsy-mobile-drawer.open {
  visibility: visible;
  pointer-events: auto;
}

.dsy-mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity var(--transition);
}

.dsy-mobile-drawer.open .dsy-mobile-backdrop { opacity: 1; }

.dsy-mobile-panel {
  position: relative;
  width: 80vw;
  max-width: 340px;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  padding: 0 0 40px;
}

.dsy-mobile-drawer.open .dsy-mobile-panel { transform: translateX(0); }

.mobile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.mobile-panel-close {
  background: #f3f3f3;
  border: none;
  width: 34px; height: 34px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}

.mobile-nav-list {
  list-style: none;
  margin: 0; padding: 0;
}

.mobile-nav-list > li > a,
.mobile-nav-list > li > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-nav);
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  background: none;
  border-left: none; border-right: none; border-top: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.mobile-nav-list > li > a:hover,
.mobile-nav-list > li > button:hover { background: var(--hover-bg); color: var(--accent); }

.mobile-sub {
  list-style: none;
  margin: 0; padding: 0;
  background: #f8f9fb;
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease;
}

.mobile-sub.open { max-height: 600px; }

.mobile-sub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 28px;
  text-decoration: none;
  color: var(--text-nav);
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.mobile-sub-item:hover { background: var(--hover-bg); color: var(--accent); }

.mobile-sub-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, #e8f0fe, #c8daff);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Responsive breakpoints ───────────────────────────────── */
@media (max-width: 1024px) {
  .dsy-nav-links  { display: none; }
  .dsy-hamburger  { display: flex; }
  .dsy-social-links { display: none; }
}

@media (min-width: 1025px) {
  .dsy-hamburger      { display: none !important; }
  .dsy-mobile-drawer  { display: none !important; }
}
