/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/


/* =============================================
   HOVER MENU DELAY - kameleonars.rs
   Applies a delay before submenus disappear
   so users have time to navigate to sub-items
   ============================================= */
   
/* --- Level 1: Main dropdown (e.g. "Prodavnica") --- */
/* Default/closed state with hover-OUT delay */
.bricks-menu-item.menu-item-has-children > .sub-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: block !important;
  /* Fade out after 0.5s delay when mouse leaves */
  transition: opacity 0.2s ease 1s,
              visibility 0s linear 1.2s,
              pointer-events 0s linear 0.7s !important;
}
/* Open state — show instantly on hover-IN */
.bricks-menu-item.menu-item-has-children:hover > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  /* No delay when opening */
  transition: opacity 0.15s ease 0s,
              visibility 0s linear 0s,
              pointer-events 0s linear 0s !important;
}


/* --- Level 2: Sub-submenu links (e.g. "Bruce Lee", "Deadpool" list) --- */
.sub-menu .sub-menu-links {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: block !important;
  /* Fade out after 0.5s delay when mouse leaves */
  transition: opacity 0.2s ease 1.5s,
              visibility 0s linear 1.7s,
              pointer-events 0s linear 0.7s !important;
}

/* Show immediately on hover */
.sub-menu:hover .sub-menu-links {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity 0.15s ease 0s,
              visibility 0s linear 0s,
              pointer-events 0s linear 0s !important;
}

/* CATEGORY POPUP — FINAL FIXED (no gap flicker) */

.category-popup {
    position: absolute !important;
    top: 100% !important;           /* ← No gap, starts right at parent edge */
    padding-top: 14px !important;   /* ← Visual gap via padding (mouse stays "inside") */
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 220px !important;
    background: #46526b !important;
    border-radius: 12px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-bottom: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25) !important;
    z-index: 99999 !important;
    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.15s ease 0.8s,
                visibility 0s linear 0.95s !important;
}

.category-item:hover > .category-popup {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: opacity 0.15s ease 0s,
                visibility 0s linear 0s !important;
}

.category-popup:hover {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: opacity 0.15s ease 0s,
                visibility 0s linear 0s !important;
}

body:has(.category-item:hover) .category-popup {
    transition: opacity 0.1s ease 0s,
                visibility 0s linear 0.1s !important;
}

body:has(.category-item:hover) .category-item:hover > .category-popup,
body:has(.category-popup:hover) .category-popup:hover {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;
}



