/* ==========================================================================
   Cherokee Mega Dropdown
   ========================================================================== */

/* --- Main dropdown layout --- */
.cherokee-dropdown {
  display: flex;
  width: var(--cherokee-sidebar-width, 280px);
  max-width: calc(100vw - 32px);
  min-height: 420px;
  padding: 0 !important;
}

.cherokee-dropdown.is-expanded {
  width: min(1240px, calc(100vw - 32px));
}

/* --- LEFT SIDEBAR --- */
.cherokee-dropdown__sidebar {
  flex: 0 0 var(--cherokee-sidebar-width, 280px);
  background: #f5f5f5;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  overflow-y: auto;
  max-height: 520px;
}

.cherokee-dropdown__cat-item {
  display: flex;
  align-items: center;
  padding: 20px;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  gap: 10px;
  border-left: 3px solid transparent;
}

.cherokee-dropdown__cat-item:hover,
.cherokee-dropdown__cat-item.is-active {
  background: #fff;
  border-left-color: #b2df24;
  color: #000;
  font-weight: 500;
}

.cherokee-dropdown__cat-item .cherokee-cat-icon,
.cherokee-dropdown__cat-item i {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  font-size: 18px;
  text-align: center;
  opacity: 0.6;
}

.cherokee-dropdown__cat-item.is-active .cherokee-cat-icon,
.cherokee-dropdown__cat-item.is-active i {
  opacity: 1;
}

.cherokee-cat-emoji {
  font-size: 20px;
  line-height: 24px;
  opacity: 1;
}

.cherokee-dropdown__cat-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cherokee-dropdown__cat-count {
  font-size: 12px;
  color: #999;
  margin-left: auto;
  text-align: right;
  min-width: 32px;
}

.cherokee-dropdown__cat-arrow {
  font-size: 16px;
  color: #ccc;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Reserve space for arrow even when absent */
.cherokee-dropdown__cat-item {
  padding-right: 36px;
  position: relative;
}

.cherokee-dropdown__cat-arrow {
  position: absolute;
  right: 16px;
}

.cherokee-dropdown__cat-item.is-active .cherokee-dropdown__cat-arrow {
  color: #b2df24;
}

/* "Дивитись всі категорії" */
/* --- CENTER: subcategory panels --- */
.cherokee-dropdown__content {
  flex: 1;
  display: none;
  padding: 24px 28px;
  position: relative;
  overflow-y: auto;
  max-height: 520px;
}

.cherokee-dropdown__content.is-visible {
  display: block;
}

.cherokee-dropdown__panel {
  display: none;
}

.cherokee-dropdown__panel.is-active {
  display: block;
}

.cherokee-dropdown__groups-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 28px;
}

.cherokee-dropdown__group {
  min-width: 0;
}

.cherokee-dropdown__group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ececec;
  transition: color 0.15s ease;
}

.cherokee-dropdown__group-title:hover {
  color: #000;
}

.cherokee-dropdown__group-name {
  min-width: 0;
}

.cherokee-dropdown__group-count {
  font-size: 12px;
  color: #9a9a9a;
  flex-shrink: 0;
}

.cherokee-dropdown__subcats-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cherokee-dropdown__subcat-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #444;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease;
}

.cherokee-dropdown__subcat-item a:hover {
  color: #000;
}

.cherokee-dropdown__subcat-name {
  flex: 1;
}

.cherokee-dropdown__subcat-count {
  font-size: 12px;
  color: #aaa;
  margin-left: 12px;
  flex-shrink: 0;
}

.cherokee-dropdown__empty {
  color: #999;
  font-size: 13px;
}

.dropdown .is-dropdown-submenu a:hover,
.dropdown .is-dropdown-submenu .is-active > a,
.dropdown-pane a:hover,
.drilldown a:hover,
.gbt-mega-menu-content a:hover,
.gbt-mega-dropdown-content-inside a:hover,
.header_search_ajax_results a:hover,
.gbt-mega-menu-content .megamenu_blog_wrapper .megamenu_posts_category_list dt a:hover {
  color: #000 !important;
}


/* --- Кнопка "Каталог" стилізація --- */
.gbt-mega-dropdown-button,
.gbt-mega-dropdown-button:before,
.gbt-mega-dropdown-button:after {
  transition: none !important;
}
.gbt-mega-dropdown-button {
  padding: 10px 20px !important;
  font-size: 16px;
  font-weight: 400 !important;
}

.gbt-mega-dropdown-button:hover {
  background: #a0cc1a !important;
  color: #fff !important;
}

.gbt-mega-dropdown-button .thehanger-icons-hamburger {
  margin-right: 8px;
}

/* Override theme dropdown panel styles for our layout */
.gbt-mega-dropdown-content-inside.cherokee-dropdown {
  max-height: none;
}

.gbt-mega-dropdown .gbt-mega-dropdown-content {
  position: absolute;
  left: 0;
  width: auto;
  max-width: calc(100vw - 32px);
  z-index: 100;
}

/* Position relative on the wrapper row so dropdown aligns to it */
.gbt-mega-dropdown-wrapper .row {
  position: static;
}
.gbt-mega-dropdown-wrapper {
  position: relative;
}

/* Hide the old mega-dropdown megamenu placeholder when using cherokee */
.gbt-mega-dropdown-megamenu-offset {
  display: none;
}

/* --- Responsive --- */
@media screen and (max-width: 1200px) {
  .cherokee-dropdown__sidebar {
    flex: 0 0 240px;
  }

  .cherokee-dropdown {
    width: var(--cherokee-sidebar-width, 240px);
  }

}

@media screen and (max-width: 1024px) {
  .cherokee-dropdown {
    flex-direction: column;
    min-height: auto;
  }
  .cherokee-dropdown__sidebar {
    flex: none;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  .cherokee-dropdown__content {
    max-height: none;
  }
  .cherokee-dropdown__groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 640px) {
  .cherokee-dropdown__groups-grid {
    grid-template-columns: 1fr;
  }
}
