/* ============================================================
   CRC Header v2 — meniu Utilaje în cascadă + căutare live.
   Meniul în cascadă folosește doar clase .crc-mc-*, deci [crc_mega_menu]
   (v1, folosit pe site acum) NU este afectat.
   ============================================================ */

/* ---------- 1. Meniu Utilaje în cascadă ---------- */
.crc-mc {
  --mc-teal: #12abb0;
  --mc-teal-800: #097376;
  --mc-teal-50: #e8f7f7;
  --mc-ink: #0e0e10;
  --mc-fg-2: #4a4a4f;
  --mc-fg-3: #8b8b90;
  --mc-hair: rgba(0,0,0,.08);
  --mc-maxh: calc(100vh - 150px);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--mc-ink);
  text-align: left;
}
.crc-mc *, .crc-mc *::before, .crc-mc *::after { box-sizing: border-box; }

.crc-mc-col {
  width: 340px;
  max-height: var(--mc-maxh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 12px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(9,73,74,.20), 0 4px 14px rgba(0,0,0,.05);
}
.crc-mc-col--1 { width: 360px; }
/* Coloanele 2/3 apar doar când au o listă activă. */
.crc-mc-col--2:not(.has-active),
.crc-mc-col--3:not(.has-active) { display: none; }
.crc-mc-list[hidden] { display: none !important; }

.crc-mc-label {
  margin: 8px 14px 8px;
  font: 700 12.5px/1.2 "Work Sans", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mc-teal-800);
}
/* Titlul coloanei 3 = numele subcategoriei: text normal, nu majuscule. */
.crc-mc-title {
  margin: 4px 2px 6px;
  padding: 10px 12px 14px;
  border-bottom: 1px solid var(--mc-hair);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mc-teal-800);
}
.crc-mc-label--muted {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--mc-hair);
  color: var(--mc-fg-3);
}

.crc-mc .crc-mc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--mc-ink);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.crc-mc-col--3 .crc-mc-row { font-weight: 500; }
.crc-mc-row__t { flex: 1; min-width: 0; }
.crc-mc-row small {
  display: block;
  margin-top: 3px;
  font: 500 12.5px/1.3 "Work Sans", system-ui, sans-serif;
  color: var(--mc-fg-3);
}
.crc-mc .crc-mc-row:hover,
.crc-mc .crc-mc-row:focus-visible,
.crc-mc .crc-mc-row.is-active {
  background: var(--mc-teal-50);
  color: var(--mc-teal-800);
  outline: none;
}
.crc-mc-chev {
  flex: none;
  width: 16px; height: 16px;
  fill: none; stroke: var(--mc-fg-3);
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.crc-mc-row.is-active .crc-mc-chev,
.crc-mc-row:hover .crc-mc-chev { stroke: var(--mc-teal-800); }

.crc-mc-row__ic {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mc-teal-50);
  color: var(--mc-teal);
  overflow: hidden;
}
.crc-mc-row__ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crc-mc-row__ic img { width: 22px; height: 22px; object-fit: contain; }
.crc-mc-row.is-active .crc-mc-row__ic { background: var(--mc-teal); color: #fff; }
.crc-mc-row.is-active .crc-mc-row__ic img { filter: brightness(0) invert(1); }

.crc-mc .crc-mc-foot {
  display: block;
  margin: 8px 2px 2px;
  padding: 13px 14px 8px;
  border-top: 1px solid var(--mc-hair);
  font: 600 14px/1.2 "Work Sans", system-ui, sans-serif;
  color: var(--mc-teal-800);
  text-decoration: none;
}
.crc-mc .crc-mc-foot:hover { text-decoration: underline; }

/* Integrare în dropdown-ul Breakdance: floater-ul se poziționează din JS
   (sub „Utilaje”, cât e de lat conținutul). */
.bde-menu-custom-dropdown .breakdance-dropdown-floater.crc-mc-floater .breakdance-dropdown-body {
  padding: 10px 0 20px !important;
}

/* Mobil: cascada se ascunde, rămâne acordeonul existent. */
@media (max-width: 1023px) {
  .crc-mc { display: none !important; }
}

/* ---------- 2. Câmp de căutare (doar varianta din header, opțional) ---------- */
.crc-hv2-field {
  --hv2-teal: #12abb0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 14px 0 20px;
  border: 2px solid #d9eff0;
  border-radius: 999px;
  background: #f5fbfb;
  color: #4a4a4f;
  font: 500 16px/1.2 "Montserrat", system-ui, sans-serif;
  text-align: left;
  cursor: text;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.crc-hv2-field:hover,
.crc-hv2-field:focus-visible {
  border-color: var(--hv2-teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18,171,176,.14);
  outline: none;
}
.crc-hv2-field .crc-hv2-ico { width: 22px; height: 22px; color: var(--hv2-teal); flex: none; }
.crc-hv2-field__ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8b8b90; }
.crc-hv2-field__kbd {
  flex: none;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  font: 600 13px/1 "Work Sans", system-ui, sans-serif;
  color: #8b8b90;
  text-align: center;
}
/* Varianta din header (pastilă pe bara teal) */
.crc-hv2-field--header {
  min-height: 46px;
  max-width: 300px;
  padding-left: 16px;
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 15px;
}
.crc-hv2-field--header .crc-hv2-ico,
.crc-hv2-field--header .crc-hv2-field__ph { color: #fff; }
.crc-hv2-field--header .crc-hv2-field__kbd { display: none; }
.crc-hv2-field--header:hover,
.crc-hv2-field--header:focus-visible { background: rgba(255,255,255,.24); border-color: #fff; box-shadow: none; }

/* ---------- 3. Iconița de căutare din header ---------- */
.crc-hv2-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.crc-hv2-iconbtn:hover,
.crc-hv2-iconbtn:focus-visible { background: rgba(255,255,255,.28); outline: none; transform: scale(1.05); }
.crc-hv2-iconbtn .crc-hv2-ico { width: 22px; height: 22px; }

.crc-hv2-ico { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 4. Overlay de căutare ---------- */
html.crc-hv2-lock { overflow: hidden; }

.crc-hv2-ov {
  --hv2-teal: #12abb0;
  --hv2-teal-800: #097376;
  --hv2-ink: #0e0e10;
  --hv2-fg-2: #4a4a4f;
  --hv2-fg-3: #8b8b90;
  --hv2-hair: rgba(0,0,0,.08);
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 9vh 20px 20px;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--hv2-ink);
}
.crc-hv2-ov[hidden] { display: none; }
.crc-hv2-ov *, .crc-hv2-ov *::before, .crc-hv2-ov *::after { box-sizing: border-box; }

.crc-hv2-ov__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,40,41,.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .16s ease;
}
.crc-hv2-ov__dialog {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(9,73,74,.35);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(.985);
  transition: opacity .16s ease, transform .16s ease;
}
.crc-hv2-ov.is-open .crc-hv2-ov__backdrop { opacity: 1; }
.crc-hv2-ov.is-open .crc-hv2-ov__dialog { opacity: 1; transform: none; }

.crc-hv2-ov__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 18px 26px;
  border-bottom: 1px solid var(--hv2-hair);
}
.crc-hv2-ov__bar > .crc-hv2-ico { width: 26px; height: 26px; color: var(--hv2-teal); flex: none; }
.crc-hv2-ov.is-loading .crc-hv2-ov__bar > .crc-hv2-ico { animation: crc-hv2-pulse .8s ease-in-out infinite alternate; }
@keyframes crc-hv2-pulse { to { opacity: .35; } }

.crc-hv2-ov .crc-hv2-ov__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  font: 500 20px/1.2 "Montserrat", system-ui, sans-serif;
  color: var(--hv2-ink);
  -webkit-appearance: none;
  appearance: none;
}
.crc-hv2-ov__input::placeholder { color: var(--hv2-fg-3); }
.crc-hv2-ov__input::-webkit-search-cancel-button { display: none; }

.crc-hv2-ov__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f1f3;
  color: var(--hv2-fg-2);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.crc-hv2-ov__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.crc-hv2-ov__close:hover,
.crc-hv2-ov__close:focus-visible { background: #e6e6ea; color: var(--hv2-ink); outline: none; }

.crc-hv2-ov__results {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 14px 18px;
}

.crc-hv2-sec { padding: 10px 0 4px; }
.crc-hv2-sec + .crc-hv2-sec { border-top: 1px solid var(--hv2-hair); margin-top: 6px; }
.crc-hv2-sec__label {
  padding: 6px 12px 10px;
  font: 700 12px/1 "Work Sans", system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hv2-teal-800);
}
.crc-hv2-sec__label span { color: var(--hv2-fg-3); letter-spacing: .04em; font-weight: 600; text-transform: none; }

.crc-hv2-list { list-style: none; margin: 0; padding: 0; }
.crc-hv2-list li { margin: 0; }

.crc-hv2-ov .crc-hv2-res {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--hv2-ink);
  text-decoration: none;
  transition: background .1s ease;
}
.crc-hv2-ov .crc-hv2-res:hover,
.crc-hv2-ov .crc-hv2-res.is-active,
.crc-hv2-ov .crc-hv2-res:focus-visible { background: rgba(18,171,176,.09); outline: none; }

.crc-hv2-res__icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e8f7f7;
  color: var(--hv2-teal);
}
.crc-hv2-res__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.crc-hv2-res__thumb {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 12px;
  background: #f5f5f7;
  overflow: hidden;
}
.crc-hv2-res__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.crc-hv2-res__text { flex: 1; min-width: 0; }
.crc-hv2-res__name {
  display: block;
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.3;
}
.crc-hv2-res__name mark { background: #fde9b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.crc-hv2-res__meta {
  display: block;
  margin-top: 3px;
  font: 500 13px/1.3 "Work Sans", system-ui, sans-serif;
  color: var(--hv2-fg-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crc-hv2-res__count {
  flex: none;
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f1f3;
  font: 700 12px/1 "Work Sans", system-ui, sans-serif;
  color: var(--hv2-fg-2);
  text-align: center;
}
.crc-hv2-arrow {
  flex: none;
  width: 18px; height: 18px;
  fill: none; stroke: var(--hv2-teal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: translateX(-4px);
  transition: opacity .1s ease, transform .1s ease;
}
.crc-hv2-res:hover .crc-hv2-arrow,
.crc-hv2-res.is-active .crc-hv2-arrow { opacity: 1; transform: none; }

.crc-hv2-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 12px 6px; }
.crc-hv2-ov .crc-hv2-chip {
  padding: 10px 16px;
  border: 1px solid #d9eff0;
  border-radius: 999px;
  background: #f5fbfb;
  font: 600 15px/1 "Montserrat", system-ui, sans-serif;
  color: var(--hv2-teal-800);
  cursor: pointer;
}
.crc-hv2-ov .crc-hv2-chip:hover,
.crc-hv2-ov .crc-hv2-chip.is-active { background: var(--hv2-teal); border-color: var(--hv2-teal); color: #fff; }

.crc-hv2-empty { padding: 22px 14px 10px; font-size: 15px; line-height: 1.5; color: var(--hv2-fg-2); }
.crc-hv2-empty p { margin: 0 0 8px; }
.crc-hv2-empty strong { color: var(--hv2-ink); }
.crc-hv2-ov .crc-hv2-empty a { color: var(--hv2-teal-800); font-weight: 600; }

@media (max-width: 640px) {
  .crc-hv2-ov { padding: 0; }
  .crc-hv2-ov__dialog { max-width: none; max-height: 100%; height: 100%; border-radius: 0; }
  .crc-hv2-ov__bar { padding: 12px 12px 12px 18px; }
  .crc-hv2-ov .crc-hv2-ov__input { font-size: 17px; }
  .crc-hv2-res__name { font-size: 15.5px; }
}

/* ---------- 5. Opțional: header mai mare ----------
   Adaugă clasa „crc-hdr-v2" pe Header-ul de test din Breakdance
   (Header → Advanced → Classes). Înălțimea barei și logo-ul se reglează
   tot din Breakdance; aici doar meniul. */
.crc-hdr-v2 .breakdance-menu-link {
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: .005em;
}
.crc-hdr-v2 .breakdance-menu-link-arrow { transform: scale(1.15); }
@media (min-width: 1024px) {
  .crc-hdr-v2 .breakdance-menu-list { gap: 6px; }
}
