/* =====================================================================
   ControlUnits Mega Menu — desktop only.
   Scoped under .cu-mega so it won't leak into the WoodMart theme.
   ===================================================================== */

.cu-mega{
  --cu-red:#be1622; --cu-red-dark:#9c1019; --cu-red-tint:#fbecee;
  --cu-ink:#1c1d20; --cu-body:#5b616e; --cu-muted:#8a909c;
  --cu-line:#e7e8ec; --cu-line-soft:#eef0f3; --cu-panel:#f6f6f8;
  --cu-radius:7px; /* matches the site-wide global border-radius */
  font-family:"Inter",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--cu-ink); line-height:1.4; box-sizing:border-box;
  width:100%; max-width:1350px; margin-left:auto; margin-right:auto;
  background:#fff; /* opaque panel so the page behind never shows through */
  border-radius:var(--cu-radius); box-shadow:0 14px 34px -12px rgba(0,0,0,.28);
  /* NOTE: deliberately NO position/z-index here. Setting z-index on the
     dropdown's content root creates a stacking context that breaks
     WoodMart's mega-menu hover handling (the panel snapped shut the moment
     the cursor left the menu item). The opaque background alone is enough
     to stop the page showing through; let WoodMart own the stacking. */
}
.cu-mega *,.cu-mega *::before,.cu-mega *::after{box-sizing:border-box;}
.cu-mega a{color:inherit;text-decoration:none;}
/* hidden must always win over the display rules below (grids, flex panels, etc.) */
.cu-mega [hidden]{display:none !important;}
/* no thick outline on click; keep a subtle ring for keyboard users only */
.cu-mega a:focus,.cu-mega button:focus{outline:none;}
.cu-mega a:focus-visible,.cu-mega button:focus-visible{outline:2px solid var(--cu-red);outline-offset:2px;}
.cu-mega img{max-width:100%;height:auto;}

/* ---------------------------------------------------------------------
   Theme-proofing. WoodMart / WooCommerce style bare <button> and <a>
   elements (grey fills, hover tints, UPPERCASE, underlines, shadows).
   Strip those defaults here, and force every component's own colours
   with !important below, so the menu NEVER inherits theme colours,
   highlights, alignment or borders.
   ------------------------------------------------------------------- */
.cu-mega button{
  -webkit-appearance:none !important; appearance:none !important;
  font-family:inherit; text-transform:none !important; letter-spacing:normal !important;
  text-shadow:none !important; text-align:left; min-height:0 !important; cursor:pointer;
}
.cu-mega a{ text-decoration:none !important; text-shadow:none !important; text-transform:none !important; }

/* hide on small screens — desktop-only widget */
@media (max-width:1024px){ .cu-mega{display:none;} }

/* ---- layout ---- */
.cu-grid{display:grid;grid-template-columns:300px minmax(0,1fr) 300px;}
.cu-col{padding:20px;}
.cu-left{border-right:1px solid var(--cu-line-soft);}
.cu-mid{padding-left:30px;padding-right:30px;}
.cu-right{background:var(--cu-panel);border-radius:0 var(--cu-radius) var(--cu-radius) 0;}

/* ---- headings ---- */
.cu-heading{
  font-size:12.5px;font-weight:700;letter-spacing:.085em;text-transform:uppercase;
  color:var(--cu-ink);margin:0 0 18px;position:relative;padding-bottom:10px;
}
.cu-heading::after{content:"";position:absolute;left:0;bottom:0;width:34px;height:3px;border-radius:2px;background:var(--cu-red);}
.cu-heading-sm{margin-top:24px;}

/* ---- left: part types ---- */
.cu-parts{display:flex;flex-direction:column;}
.cu-part{
  display:grid;grid-template-columns:46px 1fr 16px;align-items:center;gap:14px;
  padding:13px 10px;border-radius:var(--cu-radius);border-bottom:1px solid var(--cu-line-soft);transition:background .15s;
}
.cu-part:last-of-type{border-bottom:none;}
.cu-part-icon{width:44px;height:44px;display:flex;align-items:center;justify-content:center;}
.cu-part-icon img{width:38px;height:38px;object-fit:contain;display:block;}
.cu-part-text{min-width:0;}
.cu-part-title{display:block;font-size:15px;font-weight:700;color:var(--cu-ink);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cu-part-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12.5px;color:var(--cu-muted);margin-top:3px;line-height:1.35;}
.cu-part .cu-chev{color:#c4c8d0;}
.cu-part:hover{background:#f6f7f9 !important;}
.cu-part.is-active{background:var(--cu-red-tint) !important;border-bottom-color:transparent;}
.cu-part.is-active .cu-part-title{color:var(--cu-red) !important;}
.cu-part.is-active .cu-chev{color:var(--cu-red) !important;}

/* ---- buttons ---- */
.cu-btn-block,.cu-btn-link{
  display:flex;align-items:center;justify-content:center;gap:9px;width:100%;
  border:1px solid var(--cu-line) !important;border-radius:var(--cu-radius);background:#fff !important;cursor:pointer;
  font-size:13.5px;font-weight:700;font-family:inherit;transition:.15s;
}
.cu-btn-block{padding:13px;margin-top:16px;color:var(--cu-ink) !important;}
.cu-btn-block svg{width:16px;height:16px;color:var(--cu-body);}
.cu-btn-block:hover{border-color:var(--cu-red) !important;color:var(--cu-red) !important;background:var(--cu-red-tint) !important;}
.cu-btn-link{padding:12px;margin-top:14px;color:var(--cu-red) !important;}
.cu-btn-link:hover{background:var(--cu-red-tint) !important;border-color:var(--cu-red) !important;}

/* ---- middle: mode row (toggle + sub-category pill tabs, separated) ---- */
.cu-modes-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 0;margin-bottom:22px;}
.cu-modes{display:inline-flex;gap:4px;background:#f1f2f4;border-radius:var(--cu-radius);padding:4px;}
.cu-mode{
  background:transparent !important;border:none !important;font-family:inherit;cursor:pointer;
  padding:9px 18px !important;border-radius:var(--cu-radius);font-size:13.5px !important;font-weight:700;color:var(--cu-body) !important;transition:.15s;text-align:center;
}
.cu-mode:hover{color:var(--cu-ink) !important;}
.cu-mode.is-active{background:#fff !important;color:var(--cu-red) !important;box-shadow:0 1px 3px rgba(0,0,0,.08);}

/* model section head: title on the left, small sub-tab pills (+ separator) on the right */
.cu-models-head{display:flex;align-items:center;gap:12px;margin-bottom:16px;}
.cu-models-head .cu-models-title{margin:0;margin-right:auto;}
.cu-models-title{margin-bottom:16px;}
.cu-sep{width:1px;height:20px;background:var(--cu-line);flex:0 0 auto;}
.cu-subtabs{display:inline-flex;gap:2px;background:#f1f2f4;border-radius:var(--cu-radius);padding:2px;}
.cu-subtab{
  background:transparent !important;border:none !important;font-family:inherit;cursor:pointer;
  padding:4px 9px !important;border-radius:var(--cu-radius);font-size:11px !important;font-weight:700;color:var(--cu-body) !important;transition:.15s;white-space:nowrap;
}
.cu-subtab:hover{color:var(--cu-ink) !important;}
.cu-subtab.is-active{background:#fff !important;color:var(--cu-red) !important;box-shadow:0 1px 3px rgba(0,0,0,.08);}

/* ---- middle: "Find by vehicle" mode (3 list columns inside the part panel) ---- */
#cu-vehmode .cu-veh-col{padding:0 10px;min-height:0;border-right:1px solid var(--cu-line-soft);}
#cu-vehmode .cu-veh-col:first-child{padding-left:0;}
#cu-vehmode .cu-veh-col:last-child{padding-right:0;border-right:none;}
#cu-vehmode .cu-heading-sm{margin-top:0;}
/* One CONSISTENT row size across all three columns. The makes column is
   server-rendered (present at load) so a WoodMart button rule was nuking
   its padding, while the JS-injected model/year rows kept ours — hence
   makes looked cramped and models too airy. The #cu-vehmode ID gives this
   rule (1,2,0) specificity, which beats any theme class selector, so all
   three columns get the same comfortable height regardless of the theme. */
#cu-vehmode .cu-veh-list .cu-veh-item{padding:7px 10px !important;min-height:36px !important;}

/* ---- middle: models ---- */
.cu-model-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;}
.cu-model-grid + .cu-model-grid{margin-top:10px;}
.cu-model-tile{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:10px 6px 12px;border:1px solid var(--cu-line) !important;border-radius:var(--cu-radius);background:#fff !important;transition:.15s;
}
.cu-model-tile:hover{border-color:var(--cu-red) !important;box-shadow:0 6px 16px -8px rgba(226,0,26,.5);}
.cu-model-thumb{
  width:100%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;
  background:#fff;border-radius:var(--cu-radius);color:#b9bec8;overflow:hidden;
}
.cu-model-thumb img{max-width:100%;max-height:100%;object-fit:contain;}
.cu-model-thumb svg{width:26px;height:26px;}
.cu-model-name{font-size:11.5px;font-weight:600;color:#41454e;text-align:center;line-height:1.25;min-height:28px;display:flex;align-items:center;}

/* ---- right: help / cta / badges ---- */
.cu-help-title{font-size:16px;font-weight:800;line-height:1.25;color:var(--cu-ink);}
.cu-help-text{font-size:13px;color:var(--cu-body);line-height:1.45;margin-top:6px;}
.cu-cta{display:flex;flex-direction:column;gap:10px;margin-top:18px;}
.cu-cta-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--cu-radius);background:#fff !important;border:1px solid var(--cu-line) !important;color:var(--cu-ink) !important;font-size:13.5px;font-weight:700;transition:.15s;}
.cu-cta-card:hover{border-color:var(--cu-red) !important;}
.cu-cta-card .cu-call-num{color:var(--cu-red) !important;}
.cu-cta-card img{width:26px;height:26px;object-fit:contain;flex:0 0 auto;}
.cu-cta-card svg{width:20px;height:20px;flex:0 0 auto;color:var(--cu-ink);}
.cu-cta-call .cu-call-text{display:flex;flex-direction:column;line-height:1.2;}
.cu-call-label{font-size:12px;font-weight:700;color:var(--cu-ink);}
.cu-call-num{font-size:16px;font-weight:800;color:var(--cu-red);}
.cu-badges{display:flex;flex-direction:column;gap:14px;margin-top:24px;padding-top:18px;border-top:1px solid #e4e5ea;}
/* left-aligned trust rows: icon + (title / description) */
.cu-badge{display:flex;align-items:center;gap:12px;text-align:left;}
.cu-badge img{width:30px;height:30px;object-fit:contain;flex:0 0 auto;}
.cu-badge-text{display:flex;flex-direction:column;line-height:1.3;}
.cu-badge-title{font-size:13px;font-weight:700;color:var(--cu-ink);}
.cu-badge-sub{font-size:12px;color:var(--cu-body);}
/* separator + big centered star rating on a white card */
.cu-rating{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;
  margin-top:4px;padding:16px 12px;background:#fff;border:1px solid var(--cu-line);border-radius:var(--cu-radius);}
.cu-stars{display:flex;gap:3px;color:#f5a623;}
.cu-stars svg{width:24px;height:24px;fill:currentColor;stroke:none;}
.cu-rating-score{font-size:16px;font-weight:800;color:var(--cu-ink);}
.cu-rating-sub{font-size:12px;color:var(--cu-body);}

/* ---- shared bits ---- */
.cu-chev{display:inline-flex;}
.cu-chev svg{width:15px;height:15px;display:block;}
.cu-empty,.cu-veh-hint{font-size:13px;color:var(--cu-muted);padding:8px 2px;}

/* =====================================================================
   Find by Vehicle — cascading columns
   ===================================================================== */
.cu-veh-grid{display:grid;}
.cu-veh-grid-3{grid-template-columns:repeat(3,1fr);}
.cu-veh-list{display:flex;flex-direction:column;gap:2px;max-height:360px;overflow-y:auto;}
/* Delicate, thin scrollbars instead of the bulky native ones (Firefox +
   WebKit/Chromium). Subtle grey thumb, invisible track, slightly darker on
   hover — keeps the list area clean. */
.cu-mega .cu-veh-list{scrollbar-width:thin;scrollbar-color:#cfd3da transparent;}
.cu-mega .cu-veh-list::-webkit-scrollbar{width:6px;height:6px;}
.cu-mega .cu-veh-list::-webkit-scrollbar-track{background:transparent;}
.cu-mega .cu-veh-list::-webkit-scrollbar-thumb{background:#cfd3da;border-radius:8px;border:1px solid transparent;background-clip:content-box;}
.cu-mega .cu-veh-list:hover::-webkit-scrollbar-thumb{background:#b8bdc7;}
.cu-mega .cu-veh-list::-webkit-scrollbar-thumb:hover{background:#a4aab6;}
.cu-veh-item{
  display:flex !important;align-items:center !important;gap:9px;
  background:transparent !important;border:none !important;box-shadow:none !important;font-family:inherit;cursor:pointer;
  text-align:left !important;justify-content:flex-start !important;
  padding:10px 10px !important;border-radius:var(--cu-radius);font-size:14px !important;font-weight:600;
  line-height:1.3 !important;color:var(--cu-ink) !important;transition:.12s;width:100% !important;
}
.cu-veh-item:hover{background:#f6f7f9 !important;color:var(--cu-ink) !important;}
.cu-veh-item.is-active{background:var(--cu-red-tint) !important;color:var(--cu-red) !important;}
.cu-veh-item.is-active .cu-chev{color:var(--cu-red);}
.cu-veh-ic{color:var(--cu-muted);display:flex;flex:0 0 auto;}
.cu-veh-ic svg{width:20px;height:20px;}
.cu-veh-item.is-active .cu-veh-ic{color:var(--cu-red);}
.cu-veh-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left !important;}
.cu-veh-item .cu-chev{color:#c4c8d0;flex:0 0 auto;}
.cu-veh-allbtn{
  display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:8px;
  padding:10px 12px !important;border:1px dashed var(--cu-line) !important;border-radius:var(--cu-radius);background:#fff !important;
  font-size:13px !important;font-weight:700;color:var(--cu-red) !important;cursor:pointer;font-family:inherit;
}
.cu-veh-allbtn:hover{background:var(--cu-red-tint) !important;}
.cu-veh-loading{font-size:13px;color:var(--cu-muted);padding:10px 2px;}
