/* Shop Mega Menu Styles */
.av-shop-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.av-shop-with-toggle > a {
  margin-right: 5px;
}

.av-shop-categories-toggle {
  cursor: pointer;
  padding: 0 5px;
  font-size: 12px;
  color: #666;
  transition: transform 0.2s ease;
  user-select: none;
}

.av-shop-categories-toggle:hover {
  color: var(--av-brand, #ab8e66);
}

.av-shop-categories-open .av-shop-categories-toggle {
  transform: rotate(180deg);
}

.av-shop-mega-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 600px;
  max-width: 900px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 4px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  z-index: 9999;
}

.av-shop-categories-open .av-shop-mega-menu {
  display: block;
}

.av-mega-menu-grid {
  display: grid;
  gap: 20px;
  min-width: 600px;
}

.av-mega-menu-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  min-width: 500px;
}

.av-mega-menu-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  min-width: 600px;
}

.av-mega-menu-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  min-width: 800px;
}

.av-mega-menu-column {
  min-width: 0;
}

.av-mega-menu-title {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
}

.av-mega-menu-title a {
  color: inherit;
  text-decoration: none;
}

.av-mega-menu-title a:hover {
  color: var(--av-brand, #ab8e66);
}

.av-mega-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.av-mega-menu-list li {
  margin: 0;
  padding: 4px 0;
}

.av-mega-menu-list li a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.av-mega-menu-list li a:hover {
  color: var(--av-brand, #ab8e66);
}

/* Ensure the parent menu item has proper positioning */
.menu-item-has-children > .av-shop-mega-menu {
  display: none;
}

.menu-item-has-children:hover > .av-shop-mega-menu,
.menu-item-has-children:focus-within > .av-shop-mega-menu {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .av-shop-mega-menu {
    min-width: 100%;
    max-width: 100%;
    position: static;
    box-shadow: none;
    border: none;
    padding: 10px 0 10px 20px;
  }
  
  .av-mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .av-mega-menu-grid {
    grid-template-columns: 1fr;
  }
}
