:root { 
  --background-color: #ffffff; /* Background color for the entire website, including individual sections */
  --default-color: #444d4d; /* Default color used for the majority of the text content across the entire website */
  --heading-color: #003a36; /* Color for headings, subheadings and title throughout the website */
  --accent-color: #018880; /* Accent color that represents your brand on the website. It's used for buttons, links, and other elements that need to stand out */
  --bs-pagination-active-bg:#018880;
  --surface-color: #ffffff; /* The surface color is used as a background of boxed elements within sections, such as cards, icon boxes, or other elements that require a visual separation from the global background. */
  --contrast-color: #ffffff; /* Contrast color for text, ensuring readability against backgrounds of accent, heading, or default colors. */
}

/* (1) place panel exactly below the bar (no overlap, no gap) */
.ali-mega { 
  position: relative; 
  background: var(--accent-color);/* (2) Bootstrap dark tone */
  color: #fff;
  z-index: 1050; 
}


/* top-level nav links (white on dark) */
.ali-mega .mega-top .nav-link { 
  color: #f8f9fa; 
  display: inline-flex; 
  align-items: center; 
  gap: .5rem;
  transition: color .2s ease, transform .2s ease, text-shadow .2s ease;
}
.ali-mega .mega-top .nav-link:hover {
  color:  #e7e7e7; 
  transform: translateX(-4px);
  text-shadow: 0 0 6px color-mix(in srgb, var(--accent-color), transparent 65%);
}

/* Backdrop overlay (3) */
.ali-mega-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1030; /* below panel (1050) and bar (1060) */
}
.ali-mega-overlay.active {
  opacity: 1; pointer-events: auto;
}

/* category thumbnails next to titles (4) */
.ali-mega .cat-thumb-wrap { 
  inline-size: 28px; block-size: 28px; 
  border-radius: 50%; 
  overflow: hidden; 
  display: inline-grid; 
  place-items: center; 
  background: rgba(255,255,255,.08);
}
.ali-mega .cat-thumb { 
  inline-size: 100%; block-size: 100%; object-fit: cover; 
}
.ali-mega .cat-thumb--top { inline-size: 24px; block-size: 24px; }
.ali-mega .cat-thumb--sm { inline-size: 18px; block-size: 18px; }

/* (1) Panel anchored to the bottom edge of the bar */
.ali-mega .dropdown.position-static { position: static; }

.ali-mega .dropdown-menu.ali-mega-panel {
  position: absolute;
  inset-inline-start: 0; inset-inline-end: 0;
  top: 100%;
  margin-top: 0 !important;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 1050;

  opacity: 0;
  will-change: opacity;
  transition: opacity .16s ease; /* shorter & snappier */
  pointer-events: none;
}

.ali-mega .dropdown.show > .dropdown-menu.ali-mega-panel {
  opacity: 1; transform: none; pointer-events: auto;
}

/* Submenu card (slightly narrower than bar, rounded) */
.ali-mega .ali-mega-inner {
  width: min(1400px, calc(100% - 2rem));
  margin-inline: auto;
  background: #fff;
  color: #111;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  padding: 20px 20px 10px 20px;

  /* help browsers optimize */
  contain: layout paint;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .ali-mega .dropdown-menu.ali-mega-panel { transition: none; }
}

/* Tighter layout (fit ≥ 5 columns) */
.ali-mega .mega-cols-5 { --mega-gap: 12px; }
.ali-mega .mega-cols-5.g-3 { row-gap: var(--mega-gap); column-gap: var(--mega-gap); }
@media (min-width: 992px) {
  .ali-mega .mega-col { flex: 0 0 20%; max-width: 15%; }
}


/* Child and grandchild link styles (dark-on-white) with accent hovers (3,4) */
.ali-mega .mega-child-title,
.ali-mega .mega-grand-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #222; text-decoration: none;
  padding: 4px 2px; border-radius: 10px;
  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ali-mega .mega-child-title{
  font-weight: 600;
}

.ali-mega .mega-grand-link{
    color: #969696; text-decoration: none;
}

.ali-mega .mega-grand-link:hover {
  color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  transform: translateX(-2px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent-color), transparent 85%);
}

.ali-mega .mega-grand { margin: 0; padding: 0; }
.ali-mega .mega-grand li { margin: 0 0 6px 0; }

/* (9) gray spacer line below everything in submenu */
.ali-mega .ali-mega-spacer-line {
  height: 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-top: 10px;
}

/* Ensure the main content doesn't jump under sticky bars */
.ali-mega + .main { scroll-margin-top: 64px; }

/* Caret on parents (only visual; click still navigates) */
.ali-mega .mega-parent .mega-caret{
  margin-inline-start: .25rem;
  font-size: .9rem;
  color: currentColor;       /* inherits white on dark */
  opacity: .75;
  vertical-align: middle;
  transition: transform .16s ease, opacity .16s ease;
}
.ali-mega .dropdown.show > .mega-parent .mega-caret{
  transform: rotate(180deg);
  opacity: 1;
}

/* Footer wrapper */
.ali-mega .ali-mega-footer { padding: 12px 2px 16px; }

/* Light buttons that actually look light (not accent) */
.ali-mega .ali-mega-footer .btn.btn-light {
  /* Use BS variables so it stays consistent with Bootstrap */
  --bs-btn-color: #212529;
  --bs-btn-bg: #f8f9fa;
  --bs-btn-border-color: rgba(0,0,0,.08);
  --bs-btn-hover-color: var(--accent-color);
  --bs-btn-hover-bg: #eef0f2;
  --bs-btn-hover-border-color: color-mix(in srgb, var(--accent-color), transparent 70%);
  --bs-btn-active-bg: #e9ecef;

  font-weight: 600;
  border-radius: 12px;
}

/* A bit bigger text and icons */
.ali-mega .btn-mega-lg { 
    font-size: 1rem; 
    padding: .55rem .9rem; 
    background: var(--bs-btn-bg); 
    outline-offset: 0;
    border: 1px solid #6c757d;
 }
.ali-mega .btn-mega-lg:hover{
  border: 1px solid #bbbbbb !important;
  background: #d3d4d5 !important;
  box-shadow:0 22px 60px rgba(0,0,0,.14)!important;
}
.ali-mega .btn-mega-lg .bi { font-size: 1.15rem; line-height: 1; }

/* Make sure icon and text stay aligned nicely in RTL */
.ali-mega .btn-mega-lg .bi { transform: translateY(-1px); }

.ali-mega .ali-mega-footer .btn.btn-light {
  line-height: 1.25; /* nice text rhythm */
}

.ali-mega .ali-mega-footer .btn.btn-light .bi {
  display: inline-block;
  font-size: 1.25rem;     /* bigger icon */
  line-height: 1;         /* prevent extra leading */
  vertical-align: -0.125em; /* nudge down to sit on the text baseline */
  transform: translateY(1px); /* tiny optical tweak (0–2px as needed) */
}

.ali-mega .ali-mega-footer .btn.btn-light .bi::before {
  line-height: 1;         /* important: affect the glyph itself */
}

/* If you want this only for the big buttons we made earlier */
.ali-mega .btn-mega-lg { line-height: 1.25; }
.ali-mega .btn-mega-lg .bi { font-size: 1.25rem; line-height: 1; vertical-align: -0.125em; transform: translateY(1px); }
.ali-mega .btn-mega-lg .bi::before { line-height: 1; }

