#mega-menu {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 20px;
  z-index: 1000 !important;
  font-family: "Ubuntu", sans-serif;
  animation: fadein 0.5s ease alternate;
}

#mega-menu.visible {
  display: block;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  font-family: "Ubuntu", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
}

.toggle .label {
  border: 1px solid #fff;
  border-radius: 10px;
  padding: 5px 20px;
  line-height: 1.1rem;
}

.toggle .label:hover,
.toggle .label:focus {
  color: var(--e-global-color-secondary);
  border: 1px solid var(--e-global-color-secondary);
  border-radius: 10px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 16px; /* smaller height */
  width: 20px; /* smaller width */
  gap: 3px; /* tighter spacing between bars */
  position: relative;
}

.bar {
  height: 1.5px;
  width: 20px; /* narrower bars for a lighter feel */
  background-color: #1e1e1e;
  transition: all 0.3s ease;
  position: absolute;
  border-radius: 0;
}

.arrow-left {
  transform: scaleX(-1);
  transition: transform 0.3s ease;
}

.top {
  top: 0;
}

.middle {
  top: 50%;
  transform: translateY(-50%);
}

.bottom {
  bottom: 0;
}

/* Animate to X */
.toggle.open .top {
  transform: rotate(45deg);
  top: 50%;
}

.toggle.open .middle {
  opacity: 0;
}

.toggle.open .bottom {
  transform: rotate(-45deg);
  bottom: 40%;
}

.mega-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
  cursor: url("/wp-content/uploads/2025/06/cursor-close-white.png"), auto;
}

ul {
  padding: 5px 0 10px 0;
  margin-left: 0;
}

li {
  color: #1e1e1e;
  font-weight: 500;
  list-style-type: none;
  margin-bottom: 10px;
  margin-left: 0;
  padding-left: 0;
}

.menu-subitem:hover,
.menu-subitem:focus,
.menu-subitem:active {
  color: red;
}

.title {
  text-transform: uppercase;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.mega-menu-container {
  position: relative;
  z-index: 1;
  background: transparent;
  width: 100%;
  max-width: 100%;
  margin: auto;
  margin-top: 80px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
}

.main-categories,
.subcategories {
  min-height: calc(100vh - 120px);
  padding: 20px;
  background: white;
  width: 33.3%;
  margin-right: 15px;
  max-width: 1200px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.subcategories {
  display: none; /* start hidden */
}

.subcat-panel,
.subcat-panel-2 {
  display: none;
}

.subcat-panel.active,
.subcat-panel-2.active {
  display: block;
  color: #1e1e1e;
  text-decoration: none;
}

.subcat-panel a,
.subcat-panel-2 a {
  color: #1e1e1e;
  text-decoration: none;
}

.subcat-panel-2 {
  font-size: 1rem;
}

.subcat-panel a:hover,
.subcat-panel-2 a:hover {
  color: red;
  text-decoration: none;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.menu-section,
.menu-section.menu-subitem {
  font-weight: bold !important;
  font-size: 1.3rem !important;
}

.menu-subitem,
.menu-subitem-2 {
  font-size: 1rem;
  font-weight: 500;
  padding: 0;
  background-color: transparent;
  border: none;
  color: #1e1e1e;
  text-decoration: none;
}

.menu-subitem a:hover,
.menu-subitem a:focus,
.menu-subitem-2 a:hover,
.menu-subitem-2 a:focus {
  color: red !important;
}

#kolesarska-oprema > ul > li:nth-child(1) > button:hover,
#kolesarska-oprema > ul > li:nth-child(1) > button:focus {
  color: red !important;
}

.menu-subitem,
.menu-subitem-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.menu-subitem .text {
  flex: 1;
}

.menu-subitem .icon,
.menu-subitem-2 .icon {
  margin-left: 8px;
  display: flex;
  align-items: center;
}

[data-subpanel] svg {
  vertical-align: middle;
}
.other-links {
  margin-top: 10px;
}

.other-links ul li a {
  color: #1e1e1e;
  text-transform: uppercase;
}

.btn {
  background-color: #1e1e1e;
  color: #fff;
  text-transform: uppercase;
  font-family: "Ubuntu", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 5px 20px;
  border: none;
  border-radius: 10px;
  margin-top: 20px;
}

.btn:hover,
.btn:focus {
  background-color: var(--e-global-color-secondary);
  color: #fff;
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
}

@media only screen and (max-width: 767px) {
  .mega-menu-container {
    display: block !important;
  }

  .label {
    display: none;
  }

  .main-categories,
  .subcategories {
    position: fixed;
    top: 60px;
    left: 10px;
    width: calc(100vw - 20px) !important;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}
