/**
 * Sidebar mobile menu - show on all screens (no inner-main-wrapper-desk)
 */
#side-bar .mobile-menu-main {
  display: block;
}

/**
 * Mobile sidebar - Products mega submenu
 */
#side-bar .has-mobile-mega.has-droupdown::after {
  display: none; /* Use inline arrow instead */
}

#side-bar .has-mobile-mega .mobile-mega-arrow {
  font-size: 0.75em;
  margin-left: 6px;
  opacity: 0.8;
  transition: transform 0.25s ease;
}

#side-bar .has-mobile-mega.mm-active .mobile-mega-arrow {
  transform: rotate(180deg);
}

#side-bar .mobile-mega-submenu {
  padding: 8px 0 12px !important;
  background: rgba(2, 114, 183, 0.05);
  border-left: 3px solid var(--color-primary, #0272b7);
  margin: 0 0 8px 12px !important;
}

#side-bar .mobile-mega-cat {
  border-bottom: none !important;
}

#side-bar .mobile-mega-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 16px !important;
  color: #1f1f25 !important;
  transition: background 0.2s, color 0.2s;
}

#side-bar .mobile-mega-link:hover {
  background: rgba(2, 114, 183, 0.08);
  color: var(--color-primary, #0272b7) !important;
}

#side-bar .mobile-mega-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
}

#side-bar .mobile-mega-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#side-bar .mobile-mega-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

/**
 * Hamburger menu button - visible only when main nav is hidden (mobile)
 * main-nav-one is hidden at max-width: 991px
 */
@media (min-width: 992px) {
  .main-haeder-wrapper-h2 .actions-area .menu-btn,
  #menu-btn {
    display: none !important;
  }
}

/**
 * Products mega menu
 * Overlays content, appears from top (below nav)
 */

/* Arrow indicator on Products nav link */
.mega-menu-trigger .mega-menu-arrow {
  font-size: 0.7em;
  margin-left: 4px;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

/* Arrow rotated only when mega menu is open (after click) */
.mega-menu-open .mega-menu-trigger .mega-menu-arrow {
  transform: rotate(180deg);
}

/* Positioning context for mega menu */
.header-main-h2.header-mega-wrapper {
    position: relative;
}

/* Mega menu - overlays content, appears below header */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border-bottom: 4px solid var(--color-primary, #0272b7);
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
}

.mega-menu.open {
    max-height: 900px;
    overflow: visible;
}

/* Inner content - constrained by container */
.mega-menu-inner {
    position: relative;
    padding-top: 24px;
}

/* Grid of category cards */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Category card link */
.mega-menu-item {
    display: block;
    text-decoration: none;
    color: #1f1f25;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mega-menu-item:hover {
    transform: translateY(-4px);
}

.mega-menu-item:hover .mega-menu-item-title {
    color: var(--color-primary, #0272b7);
}

/* Image wrapper - aspect ratio */
.mega-menu-item-img {
    position: relative;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    background: #f5f5f5;
    overflow: hidden;
}

.mega-menu-item-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder when no image - blue block */
.mega-menu-item-img-placeholder .mega-menu-item-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0272b7;
    display: block;
}

/* Category title */
.mega-menu-item-title {
    display: block;
    padding: 12px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f1f25;
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Mega menu footer - Close button small, bottom right */
.mega-menu-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding: 16px 0 20px;
    border-top: 1px solid #eee;
}

.mega-menu-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 8px 18px;
    border: none;
    background: var(--color-primary, #0272b7);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.mega-menu-close-btn:hover {
    opacity: 0.9;
}

.mega-menu-close-btn-arrow {
    font-size: 10px;
}
