/* osnovno */
.cidm-container{ max-width:1200px; margin:0 auto; padding:0 12px; }

/* Top crvena traka */
.cidm-topbar{ background:#e31e24; color:#fff; }
.cidm-toplinks{
  display:flex; gap:14px; align-items:center; padding:8px 0; white-space:nowrap;
}
.cidm-toplinks a{ color:#fff; text-decoration:none; font-weight:600; }

/* Glavni bar */
.cidm-bar{
  background:#fff; border-bottom:1px solid #eee;
  display:grid; grid-template-columns:44px 1fr 80px;
  align-items:center; padding:8px 10px; position:relative;
}

/* hamburger – bez shadowa */
.cidm-hamburger{
  width:36px; height:36px; display:inline-grid; place-content:center;
  border:1px solid #ddd; border-radius:8px; background:#fff; cursor:pointer;
  box-shadow:none !important; /* traženo: bez sjene */
}
.cidm-hamburger span{ display:block; width:18px; height:2px; background:#222; margin:2.5px 0; }

.cidm-logo{ display:flex; justify-content:center; align-items:center; }
.cidm-logo img{ height:40px !important; width:auto; display:block; }

.cidm-icons{ display:flex; justify-content:flex-end; align-items:center; gap:12px; }
.cidm-ico{
  position:relative; width:36px; height:36px; display:grid; place-content:center;
  border:1px solid #ddd; border-radius:8px; color:#222; text-decoration:none;
}
.cidm-badge{
  position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 4px;
  border-radius:9px; background:#e31e24; color:#fff; font-size:11px; display:grid; place-items:center;
}

/* Tražilica */
.cidm-search{ padding:8px 10px; border-bottom:1px solid #eee; }

/* Overlay + Drawer */
.cidm-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:10040;
  opacity:0; transition:opacity .18s ease;
}
.cidm-drawer{
  position:fixed; top:0; left:0; bottom:0; width:75vw; max-width:380px; background:#fff;
  transform:translateX(-100%); transition:transform .22s ease;
  z-index:10050; display:flex; flex-direction:column;
  box-shadow: 6px 0 28px rgba(0,0,0,.15); /* želiš bez sjene panela? postavi na none */
}
.cidm-drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid #eee;
}
.cidm-close{ border:0; background:transparent; font-size:28px; line-height:1; cursor:pointer; }

.cidm-drawer-body{ padding:8px 10px 20px; overflow:auto; flex:1 1 auto; }

/* Meni u draweru (akordeon) */
.cidm-drawer-menu,
.cidm-drawer-menu ul{ list-style:none; margin:0; padding:0; }
.cidm-drawer-menu > li{/* border-bottom:1px solid #eee;*/ }
.cidm-drawer-menu a{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 8px; color:#222; text-decoration:none;
}
.cidm-drawer-menu .menu-item-has-children > a::after{
  content:"▾"; margin-left:8px; font-size:12px; opacity:.75; transition:transform .2s ease;
}
.cidm-drawer-menu .menu-item-has-children.open > a::after{ transform: rotate(-180deg); }
.cidm-drawer-menu .sub-menu{ display:none; padding-left:10px; border-top:1px dashed #eee; }
.cidm-drawer-menu .menu-item-has-children.open > .sub-menu{ display:block; }

/* open state */
.cidm-drawer.is-open{ transform:translateX(0); }
.cidm-overlay.is-open{ opacity:1; }

/* lock body */
body.cidm-no-scroll{ overflow:hidden; touch-action:none; }

/* Ograniči prikaz samo na mobitelu, ako želiš na silu: */
@media (min-width: 991px){
  .cidm-header-root{ display:none; }
}


/* === Overlay (tamni bg) === */
.cidm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}
.cidm-overlay.is-on {
  opacity: 1;
  pointer-events: auto;
}

/* === Drawer === */
.cidm-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(86vw, 420px);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translateX(-102%);
  transition: transform .22s ease;
  z-index: 9999;
}
.cidm-drawer.is-open { transform: translateX(0); }
.cidm-drawer[hidden] { display: block; /* da možemo animirati; JS kontrolira visibility */ }

/* === Drawer header === */
.cidm-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e8;
}
.cidm-drawer-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}
.cidm-close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: black !important;
}

/* === Menu reset + osnovni stil === */
.cidm-drawer-menu,
.cidm-drawer-menu ul {
  list-style: none;          /* bez bullet-a */
  margin: 0;
  padding: 0;
}
.cidm-drawer-body { padding: 6px 0 28px; }

/* svaki li red kao "stavka" */
.cidm-drawer-menu > li > a,
.cidm-drawer-menu .sub-menu > li > a {
  display: block;
  padding: 14px 44px 14px 18px;           /* prostor za caret desno */
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ddd;          /* traženi 1px #ddd separator */
  font-size: 16px;
}
.cidm-drawer-menu > li:last-child > a { border-bottom: 1px solid #ddd; } /* konzistentno */

/* hover/focus */
.cidm-drawer-menu a:hover,
.cidm-drawer-menu a:focus {
  background: #f7f7f7;
}

/* === Caret (toggle) za stavke s djecom === */
.cidm-caret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
}
.cidm-caret:after {
  content: "▾";        /* jednostavna strelica */
  display: block;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
  color: #555;
}
.cidm-item-open > .cidm-row .cidm-caret {
  transform: translateY(-50%) rotate(180deg);
}

/* “red” koji drži link + caret, radi boljeg targeta */
.cidm-row {
  position: relative;
  display: block;
}

/* === Submeniji (skriveni po defaultu) === */
.cidm-drawer-menu .sub-menu {
  display: none;
  background: #fff;
}
.cidm-item-open > .sub-menu { display: block; }

/* indent po razinama */
.cidm-drawer-menu .sub-menu > li > a { padding-left: 26px; }
.cidm-drawer-menu .sub-menu .sub-menu > li > a { padding-left: 34px; }
.cidm-drawer-menu .sub-menu .sub-menu .sub-menu > li > a { padding-left: 42px; }

/* tanke razdjelnice unutar submenija */
.cidm-drawer-menu .sub-menu > li > a { border-bottom: 1px solid #e9e9e9; }

/* sitno: ukloni default disc u nekim temama */
.cidm-drawer-menu li { list-style: none !important; }
/* -- Topbar link BIJELI (pregazi temu) -- */
.cidm-toplinks a { color:#fff !important; }

/* -- Ujednači tipografiju i border na SVE nivoe -- */
.cidm-drawer-menu a,
.cidm-drawer-menu .sub-menu a {
  font-size:16px;                /* isti font na svim nivoima */
  line-height:1.25;
  color:#222;
  text-decoration:none;
  display:block;
  padding:14px 44px 14px 18px;   /* prostor desno za caret */
  /*border-bottom:1px solid #ddd;*/  /* border između SVAKOG itema */
}

/* -- Submeniji: ukloni "display:none", koriste se tranzicije -- */
.cidm-drawer-menu .sub-menu {
  display:block !important;      /* pregazi raniji display:none */
  overflow:hidden;
  max-height:0;                  /* zatvoren */
  opacity:0;
  padding: 0;
  transform:translateY(-4px);
  transition:
    max-height .28s ease,
    opacity .22s ease,
    transform .22s ease;
  background:#fff;
  /* tanka linija iznad bloka podmenija (opcionalno) */
/*  border-top:1px solid #eee;*/
}

/* -- Otvoren podmeni (glatko "slide down") -- */
.cidm-item-open > .sub-menu {
  /* dovoljno velika gornja granica da stanu 3–4 nivoa */
  --cidm-submenu-max: 1200px;
  max-height:var(--cidm-submenu-max);
  opacity:1;
  transform:translateY(0);
}

/* -- Indent po razinama (lvl 2–4) -- */
.cidm-drawer-menu .sub-menu > li > a { padding-left:26px; }
.cidm-drawer-menu .sub-menu .sub-menu > li > a { padding-left:34px; }
.cidm-drawer-menu .sub-menu .sub-menu .sub-menu > li > a { padding-left:42px; }

/* -- Caret rotacija (radi i s klasom iz našeg JS-a) -- */
.menu-item-has-children.cidm-item-open > a::after,
.cidm-item-open > .cidm-row .cidm-caret { transform: translateY(-50%) rotate(180deg); }
.cidm-row{
    border-bottom: solid 1px #ddd;
}

/* -- Ako koristiš .cidm-caret dugme (iz mog ranijeg snippeta) -- */
.cidm-caret {
  position:absolute; right:8px; top:50%;
  transform:translateY(-50%);
  width:32px; height:32px;
  border:0; background:transparent; cursor:pointer; border-radius:6px;
}
.cidm-caret:after {
  content:"▾";
  display:block; font-size:16px; line-height:32px; text-align:center; color:#555;
}

/* -- Ljepši hover na svim nivoima -- */
.cidm-drawer-menu a:hover,
.cidm-drawer-menu a:focus { background:#f7f7f7; }

/* -- Overlay: osiguraj klikabilnost kad je upaljen -- */
.cidm-overlay.is-on { opacity:1; pointer-events:auto; }

/* -- Drawer: animacija ostaje ista, samo podsjetnik -- */
.cidm-drawer.is-open { transform:translateX(0); }

/* -- Ukloni bullet-e (safety net protiv tema) -- */
.cidm-drawer-menu, .cidm-drawer-menu ul, .cidm-drawer-menu li { list-style:none !important; margin:0; padding:0; }
/* overlay NIKAD ne smije loviti klikove dok nije upaljen */
.cidm-overlay{ pointer-events: none !important; }
.cidm-overlay.is-on{ pointer-events: auto !important; }

