/* TEMPORARY - for debugging */
/* .nojq {
  display: none;
}

.mega-menu .mega-overlay {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  display: flex !important;
} */

/* Font faces */

@font-face {
  font-family: 'Apercu Pro';
  src: url('../../fonts/ApercuPro/ApercuPro-Regular.woff2') format('woff2'),
    url('../../fonts/ApercuPro/ApercuPro-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Apercu Pro';
  src: url('../../fonts/ApercuPro/ApercuPro-Bold.woff2') format('woff2'),
    url('../../fonts/ApercuPro/ApercuPro-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== Primary navigation ===== */

.mega-menu .main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  align-self: stretch;
  /*  min-width: 74.75rem; */
  max-width: 120rem;
  background: #FFF;
  box-shadow: 0 0 20px 0 rgba(183, 183, 183, 0.16);
}

/* === Logo  === */

.mega-menu .main-nav .brand img {
  display: block;
  width: 6.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  object-fit: contain;
  margin-right: 3rem;
  margin-top: 1.5rem;
  margin-bottom: 1.75rem;
}

/* === Navigation Links  === */

.mega-menu .main-nav .main-nav-list {
  display: flex;
  width: 50.75rem;
  padding-right: 2.5rem;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
}

.mega-menu .main-nav .main-nav-item {
  flex: 0 0 auto;
}

.mega-menu .main-nav .main-nav-item>a {
  color: #000;
  text-overflow: ellipsis;
  font-family: "Apercu Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  display: inline-block;
  max-width: none;
  position: relative;
}

.mega-menu .main-nav .main-nav-item>a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #000;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.mega-menu .main-nav .main-nav-list li.is-active>a::after,
.mega-menu .main-nav .main-nav-list a.is-active::after,
.mega-menu .main-nav .main-nav-item>a:hover::after {
  transform: scaleX(1);
}

.mega-menu .main-nav .main-nav-list li.is-active>a,
.mega-menu .main-nav .main-nav-list a.is-active,
.mega-menu .main-nav .main-nav-item>a:hover {
  text-decoration: none;
}

/* === Action buttons === */

.mega-menu .main-nav .main-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Generic button styles */
/* Primary (Type 1) */
.mega-menu .btn--primary {
  display: flex;
  padding: 0.5rem 1rem 0.625rem 1rem;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  border-radius: 0.5rem;
  background: #678FFF;
  overflow: hidden;
  color: #000;
  text-align: center;
  font-family: "Apercu Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: 140%;
  white-space: nowrap;
  cursor: pointer;
}

.mega-menu .btn--primary:hover,
.mega-menu .btn--primary:focus-visible {
  background: #3B5BBE;
  color: #ffffff;
  text-decoration: none;
}

.mega-menu .btn--primary:active,
.mega-menu .btn--primary.is-pressed {
  background: #1C325F;
  color: #FFF;
}

/* Secondary (Type 2) */
.mega-menu .btn--secondary {
  display: flex;
  padding: 0.5rem 1rem 0.625rem 1rem;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid #678FFF;
  background: #FFF;
  overflow: hidden;
  color: #000;
  text-align: center;
  font-family: "Apercu Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  white-space: nowrap;
  cursor: pointer;
}

.mega-menu .btn--secondary:hover,
.mega-menu .btn--secondary:focus-visible {
  border: 1px solid #678FFF;
  background: #E1E9FF;
  text-decoration: none;
}

.mega-menu .btn--secondary:active,
.mega-menu .btn--secondary.is-pressed {
  border: 1px solid #678FFF;
  background: #A9C4FF;
  color: #000;
}

/* Tertiary (Type 3) */
.mega-menu .btn--tertiary {
  display: flex;
  padding: 0.5rem 1rem 0.625rem 1rem;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background: #FFF;
  color: #000;
  text-overflow: ellipsis;
  font-family: "Apercu Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  white-space: nowrap;
  cursor: pointer;
}

.mega-menu .btn--tertiary:hover,
.mega-menu .btn--tertiary:focus-visible {
  background: #F0F0F0;
  text-decoration: none;
}

.mega-menu .btn--tertiary:active,
.mega-menu .btn--tertiary.is-pressed {
  border: 1px solid #678FFF;
  background: #A9C4FF;
  color: #000;
}

.mega-menu .btn__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
}

.mega-menu .btn--icon-left .btn__icon {
  margin-right: 4px;
}

.mega-menu .btn--icon-right .btn__icon {
  margin-left: 4px;
  order: 2;
}

.mega-menu .btn--icon-only {
  padding: 0;
  width: 40px;
  min-width: 40px;
  justify-content: center;
}

.mega-menu .btn--icon-only .btn__icon {
  margin: 0;
}

.mega-menu .main-nav .main-nav-actions .btn span {
  display: inline-block;
}

/* ===== Mega overlay ===== */
.mega-menu .mega-overlay {
  position: fixed;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .08);
  transition: .2s opacity, .2s visibility, .2s transform;
  /* Faster for hover */
  display: flex;
  justify-content: center;
  pointer-events: none;
  /* Allow mouse to pass through when closed */
  overscroll-behavior: contain;
}

/* Center mega-grid horizontally */
.mega-menu .mega-overlay .mega-grid {
  display: flex;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  box-sizing: border-box;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.mega-menu .mega-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  /* Re-enable mouse events when open */
}

.mega-menu .main-nav .main-nav-item>a:hover {
  text-decoration: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.125rem;
  text-decoration-thickness: 0.125rem;
}

.mega-menu .mega-overlay .mega-grid {
  display: flex;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2.5rem 3.75rem;
  align-items: flex-start;
  gap: 3rem;
}

/* ===== Feature column ===== */

.mega-menu .mega-overlay .api-feature {
  display: flex;
  max-width: 17.125rem;
  flex-direction: column;
  align-items: flex-start;

}

.mega-menu .mega-overlay .api-feature h1 {
  margin: 0;
  font-family: "WeWork Serif";
  font-size: 2.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
}

.mega-menu .mega-overlay .api-feature p {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-family: "Apercu Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
}

/*  ===== Generic column & links =====*/


.mega-menu .mega-overlay .api-col.api-col--with-detail {
  display: flex;
  flex-direction: row;
  /* max-width: 32.5rem; */
  gap: 1.5rem;
  align-items: flex-start;
}

.mega-menu .mega-overlay .api-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.625rem 1rem 0.75rem 1rem;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu .mega-overlay .api-links li {
  display: flex;
  width: 15rem;
  /* padding: 0.75rem 1rem 0.75rem 1rem; */
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  border-radius: 0.5rem;
  transition: background .2s;
}

.mega-menu .mega-overlay .api-links li.is-active {
  background: #E1E9FF;
}


/* Description box now part of li background */
.mega-menu .mega-overlay .api-links li .api-link__desc {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-family: "Apercu Pro";
  font-size: 0.8125rem;
  line-height: 140%;
  color: #000;
  padding-right: 0.25rem;
}

.mega-menu .mega-overlay .api-links li.is-active .api-link__desc {
  display: block;
}

/* Tighten vertical rhythm since li now holds background */
.mega-menu .mega-overlay .api-links li.is-active>a {
  /* reduce bottom margin to visually connect with description */
  margin-bottom: 0.125rem;
}

.mega-menu .mega-overlay .api-links li a {
  color: #000;
  font-family: "Apercu Pro";
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 130%;
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 1rem;

  /*  padding: 0.5rem 0.75rem; */
  border-radius: 0.5rem;
  text-decoration: none;
}

.mega-menu .mega-overlay .api-links li a div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex-direction: row;
}

.mega-menu .mega-overlay .api-links li p {
  color: #444;
  font-family: "Apercu Pro";
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 130%;
  padding: 0;
}

.mega-menu .mega-overlay .api-links li .api-links__desc {
  padding-left: 1rem;
  opacity: 0;
  transform: translateY(-4px);
  animation: fadeInDesc 0.75s ease forwards;
}

@keyframes fadeInDesc {
  from {
    opacity: 0;
    transform: translateY(0);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Persist enlarged label while mouse is over the paragraph by targeting anchor/li hover, not span:hover */
.mega-menu .mega-overlay .api-links li a:hover,
.mega-menu .mega-overlay .api-links li a:hover span,
.mega-menu .mega-overlay .api-links li:hover a,
.mega-menu .mega-overlay .api-links li:hover a span,
.mega-menu .mega-overlay .api-links li:hover p,
.mega-menu .mega-overlay .api-links li:focus-within a,
.mega-menu .mega-overlay .api-links li:focus-within a span,
.mega-menu .mega-overlay .api-links li:focus-within p,
.mega-menu .mega-overlay .api-links li a span.is-active,
.mega-menu .mega-overlay .api-links li.is-active>a span {
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 600;
  line-height: 130%;
  color: #000;
}

/* Keep paragraph text black when parent link or li hovered/active */
.mega-menu .mega-overlay .api-links li a:hover p,
.mega-menu .mega-overlay .api-links li:hover p,
.mega-menu .mega-overlay .api-links li:focus-within a p,
.mega-menu .mega-overlay .api-links li:focus-within p,
.mega-menu .mega-overlay .api-links li a p.is-active,
.mega-menu .mega-overlay .api-links li.is-active>a p {
  color: #000;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 130%;
}

.mega-menu .mega-overlay .api-links a .api-link__icon-svg {
  /* default: hidden */
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: .75rem;
  flex: 0 0 1.25rem;
  transition: opacity .18s ease;
  opacity: 0;
}

.mega-menu .mega-overlay .api-links li.is-active>a .api-link__icon-svg,
.mega-menu .mega-overlay .api-links li>a:hover .api-link__icon-svg,
.mega-menu .mega-overlay .api-links li>a:focus-visible .api-link__icon-svg {
  display: block;
  opacity: 1;
}


.mega-menu .mega-overlay .api-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu .mega-overlay .api-detail .links-all {
  color: #000;
  font-family: "Apercu Pro";
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 130%;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  /*  padding: 0.625rem 1rem 0.75rem 1rem; */
}


.mega-menu .mega-overlay .api-detail .api-detail__view-all {
  padding: 0.625rem 1rem 0.75rem 1rem;
}


/* ===== Gallery column ===== */
.mega-menu .mega-grid .api-col--gallery {}

/* === Promo image cards (gallery) === */
.mega-menu .mega-grid .api-gallery {
  /* existing grid definition retained */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;

}

.mega-menu .mega-grid .api-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 16.25rem;
  min-width: 4rem;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.90) 100%),
    var(--api-card-bg) lightgray 50% / cover no-repeat;
  justify-content: space-between;
}

.mega-menu .mega-grid .api-card:hover {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.90) 100%),
    var(--api-card-bg) lightgray 50% / cover no-repeat;
}

.mega-menu .mega-grid .api-card--no-chip {
  justify-content: flex-end;
}

.mega-menu .mega-grid .api-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(30px);
  transition: transform .40s cubic-bezier(.4, 0, .2, 1);
}

.mega-menu .mega-grid .api-card:hover .api-card__body,
.mega-menu .mega-grid .api-card:focus-visible .api-card__body {
  transform: translateY(0);
}

.mega-menu .api-card__chip {
  align-self: flex-start;
  display: inline-block;
  justify-content: center;
  align-items: center;
  padding: 0.25rem 0.5rem 0.25rem 0.5rem;
  border-radius: 2.5rem;
  font-family: "Apercu Pro";
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  line-height: 140%;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
}

/* ChipTypeEnum:
   1 None (hide)
   2 White
   3 Purple (Popular)
   4 Yellow (Offer)
   5 Blue (New)
   6 Black (General) */
.mega-menu .chip-type-1.api-card__chip,
.mega-menu .chip-type-0.api-card__chip {
  display: none;
}

.mega-menu .chip-type-2.api-card__chip {
  background: #FFFFFF;
  color: #000;
}

.mega-menu .chip-type-3.api-card__chip {
  background: #D6CEF4;
  color: #512F52;
}

.mega-menu .chip-type-4.api-card__chip {
  background: #E6C416;
  color: #000;
}

.mega-menu .chip-type-5.api-card__chip {
  background: #E1E9FF;
  color: #3B5BBE;
}

.mega-menu .chip-type-6.api-card__chip {
  background: rgba(0, 0, 0, 0.80);
  color: #FFF;
}

/* Optional: stronger focus outline when chip itself focused (if ever tabbable) */
.mega-menu .mega-grid.api-card__chip:focus-visible {
  outline: 2px solid #678FFF;
  outline-offset: 2px;
}

.mega-menu .mega-grid .api-card__title {
  color: #FFF;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.48);
  font-family: "Apercu Pro";
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 700;
  line-height: 130%;

}

.mega-menu .mega-grid .api-card__desc {
  color: #FFF;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.48);
  font-family: "Apercu Pro";
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
}

.mega-menu .mega-grid.api-card__hover-spacer {
  height: auto;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.4, 0, .2, 1);
}

.mega-menu .mega-grid .api-card__hover-spacer .api-card__arrow {
  display: block;
}

.mega-menu .mega-grid .api-card:hover .api-card__hover-spacer,
.mega-menu .mega-grid .api-card:focus-visible .api-card__hover-spacer {
  opacity: 1;
  transform: translateY(0);
}



/* === Language modal (scoped) === */
.mega-menu .lang-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .34);
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 100;
}

.mega-menu .lang-modal__backdrop.is-open {
  opacity: 1;
}

.mega-menu .lang-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(100%, 44.5rem);
  background: #FFF;
  border-radius: 0.5rem;
  border-color: rgb(103, 143, 255);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 48px));
  z-index: -1;
  font-family: "Apercu Pro";
}

.mega-menu .lang-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  z-index: 101;
}

.mega-menu .lang-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #EEE;
}

.mega-menu .lang-modal__title {
  margin: 0;
  font-family: "Apercu Pro";
  line-height: 1.25;
  font-weight: 400;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;

}

.mega-menu .lang-modal__close {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1.4;
  padding: .5rem;
  border-radius: 6px;
}

.mega-menu .lang-modal__close:hover,
.mega-menu .lang-modal__close:focus-visible {
  background: #F2F2F2;
  outline: 0;
}

.mega-menu .lang-modal__body {
  padding: 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.mega-menu .lang-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 18.75rem;
  column-gap: 2.5rem;
}

@media (max-width:640px) {
  .mega-menu .lang-modal__list {
    columns: 1 12.5rem;
  }
}

.mega-menu .lang-modal__list li {
  break-inside: avoid;
  margin-bottom: .4rem;
}

.mega-menu .lang-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .75rem;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  font-size: .875rem;
  line-height: 1.3;
  background: #FFF;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}

.mega-menu .lang-option:hover,
.mega-menu .lang-option:focus-visible {
  background: #EEF3FF;
  border-color: rgb(221, 227, 238);
  outline: 0;
  text-decoration: none;
}

.mega-menu .lang-option.is-selected {
  outline: 2px solid transparent;
  outline-offset: 2px;
  background: #EEF3FF;
  border-color: rgb(103, 143, 255);
  border-width: 1px;
  border-style: solid;
  border-radius: .5rem;
  box-shadow: 0 0 0 1px rgb(103, 143, 255);
  font-weight: 600;
}

.mega-menu .lang-option__check {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-block;
}


/* Locale selector */
.mega-menu .main-nav .main-nav-actions .main-nav__locale>a,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border: 0;
  background: transparent;
  border-radius: .5rem;
  font-family: "Apercu Pro";
  font-size: 1rem;
  line-height: 140%;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease;
}

.mega-menu .main-nav .main-nav-actions .main-nav__locale span {
  display: inline-flex;
  justify-content: center;
  align-items: center;

}

.mega-menu .main-nav .main-nav-actions .main-nav__locale .locale-btn__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #000;
  text-overflow: ellipsis;
  font-family: "Apercu Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
}

.mega-menu .main-nav .main-nav-actions .main-nav__locale .locale-btn__icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mega-menu .main-nav .main-nav-actions .main-nav__locale>a:hover,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>button:hover,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>a:focus-visible,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>button:focus-visible {
  background: #F0F0F0;
  text-decoration: none;
  outline: 0;
}

.mega-menu .main-nav .main-nav-actions .main-nav__locale svg,
.mega-menu .main-nav .main-nav-actions .main-nav__locale img {
  width: 1.25rem;
  height: 1.25rem;


}



/* Optional active/pressed state */
.mega-menu .main-nav .main-nav-actions .main-nav__locale>a:active,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>button:active {
  background: #E0E0E0;
}

/* High contrast focus ring fallback */
.mega-menu .main-nav .main-nav-actions .main-nav__locale>a:focus-visible,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>button:focus-visible {
  box-shadow: 0 0 0 2px #3B5BBE inset;
}

/* Locale selector single-line tweak */
.mega-menu .main-nav .main-nav-actions .main-nav__locale {
  white-space: nowrap;
}

.mega-menu .main-nav .main-nav-actions .main-nav__locale>a,
.mega-menu .main-nav .main-nav-actions .main-nav__locale>button {
  white-space: nowrap;
}

.mega-menu .main-nav .main-nav-actions .main-nav__locale>a * {
  display: inline;
  white-space: nowrap;
}


/* ===== Skeleton loader ===== */
.mega-grid[data-loading="true"] {
  min-height: 260px;
}

.mega-skel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.mega-skel__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skel-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f2f2f2 0%, #e6e6e6 45%, #f2f2f2 90%);
  background-size: 220% 100%;
  animation: skel 1.2s linear infinite;
}

.skel-line--lg {
  height: 40px;
  margin-bottom: 4px;
}

@keyframes skel {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -220% 0;
  }
}

/* ===== Status messages ===== */
.mega-empty,
.mega-error {
  grid-column: 1/-1;
  padding: 40px;
  border-radius: 8px;
  font: 500 15px/1.45 system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.mega-error {
  border: 1px solid #e03636;
  background: #fff5f5;
  color: #6d0505;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Mobile nav (≤1195px) ===== */
@media (max-width:1195px) {
  .mega-menu .main-nav {
    height: 4rem;
    min-width: 4rem;
    width: 100%;
    padding: 0.5rem 1rem;
    gap: .75rem;
  }

  .mega-menu .main-nav .brand {
    order: 0;
    margin-left: 0;
  }

  .mega-menu .main-nav .brand img {
    margin-left: 0;
    margin-right: .5rem;
    width: 6.25rem;
    height: 1.25rem;
  }

  /* Hide desktop nav list & gallery/overlay usage on mobile */
  .mega-menu .main-nav .main-nav-list,
  .mega-menu .main-nav .main-nav-actions .main-nav__locale .locale-btn__label {
    display: none;
  }

  /* Hide login button on mobile */
  .mega-menu .main-nav .main-nav-actions .main-nav__login {
    display: none !important;
  }


  /* Hamburger button */
  .mega-menu .main-nav__burger button#mainNavBurger {
    background: none;
    border: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

  }

  .mega-menu .main-nav__burger button#mainNavBurger .main-nav-burger__icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
  }

  .mega-menu .main-nav__burger button#mainNavBurger:hover,
  .mega-menu .main-nav__burger button#mainNavBurger:focus-visible {
    background: #F0F0F0;
    outline: 0;
  }

  /* Keep only locale + join + burger visible */
  .mega-menu .main-nav .main-nav__actions {
    padding-right: 0;
    gap: .5rem;
    order: 1;
  }

  .mega-menu .main-nav .main-nav__actions li:not(.main-nav__locale):not(.main-nav__join):not(.main-nav__burger) {
    display: none;
  }

  /* Mobile panel */
  .mega-menu .mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 20rem;
    height: 100dvh;
    min-height: 100vh;
    background: #FFF;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.48);
    z-index: 1000;
    overflow-y: auto;
    flex-direction: column;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .mega-menu .mobile-nav-panel.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .mega-menu .mobile-nav-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    padding: 1.5rem 1.125rem 0 1.5rem;
    background: #FFF;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1 1 auto;
  }

  .mega-menu .mobile-nav-panel__list .main-nav-item>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    border-radius: .5rem;
    color: #000;
    font-family: "WeWork Serif";
    font-size: 1.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    text-decoration: none;
  }

  /*   .mega-menu .mobile-nav-panel__list .main-nav-item>a:hover,
  .mega-menu .mobile-nav-panel__list .main-nav-item>a:focus-visible {
    background: #E1E9FF;
    outline: 0;
  } */

  .mega-menu .mobile-nav-panel__chevron {
    width: 0.46881rem;
    height: 0.85944rem;
    color: #000;
  }

  .mega-menu .mobile-nav-panel__footer {
    width: 100%;
    padding: 0 1.25rem;
    border-top: 1px solid #F0F0F0;
    background: #FFF;
    box-shadow: 0 0 20px 0 rgba(183, 183, 183, 0.16);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    /* NEW: stick to bottom of flex container */
  }

  .mega-menu .mobile-nav-panel__actions {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
  }

  .mega-menu .mobile-nav-panel__actions .mobile-nav-panel__action {
    flex: 1 1 0;
    display: flex;
    /* ensures child btn can stretch */
  }

  .mega-menu .mobile-nav-panel__actions .mobile-nav-panel__action .btn {
    width: 100%;
    justify-content: center;
  }

  .mega-menu .mobile-nav-panel__header {
    display: flex;
    height: 3.5rem;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0.5rem;
    border-bottom: 1px solid #F0F0F0;
    background: #FFF;
    box-shadow: 0 0 20px 0 rgba(183, 183, 183, 0.16);
  }

  .mega-menu .mobile-nav-panel__header .mobile-nav-panel__close {
    background: #FFF;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    padding: .5rem .75rem;
    font: 400 .95rem/1.3 "Apercu Pro";
    cursor: pointer;
    border-radius: .5rem;
  }

  .mega-menu .mobile-nav-panel__header .mobile-nav-panel__close svg {
    width: 1.25rem;
    height: 1.25rem;
    justify-content: center;
    align-items: center;
    display: block;
  }

  /* When mobile panel open prevent body scroll (optional hook) */
  body.has-mobile-nav {
    overflow: hidden;
    touch-action: none;
    /* Prevent layout shift by preserving scrollbar width */
    padding-right: var(--scrollbar-width, 0);
  }

  /* Hide desktop mega overlay entirely on mobile */
  .mega-menu .mega-overlay {
    display: none !important;
  }

  .mega-menu .main-nav__burger {
    display: list-item !important;
    /* ensure visible on mobile */
  }


  /* Subpanel slide animation */
  .mega-menu .mobile-nav-subpanel {
    position: fixed;
    top: 0;
    right: 0;
    width: 20rem;
    height: 100dvh;
    min-height: 100vh;
    background: #FFF;
    z-index: 1001;
    overflow-y: auto;
    flex-direction: column;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .mega-menu .mobile-nav-subpanel.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .mega-menu .mobile-nav-subpanel.mobile-nav-subpanel--details {
    z-index: 1002;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
    padding: 0 0.5rem;
    border-bottom: 1px solid var(--Greys-Background, #F0F0F0);
    background: var(--Primary-White, #FFF);
    box-shadow: 0 0 20px 0 rgba(183, 183, 183, 0.16);
    width: 100%;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__back {
    margin-right: auto;
    justify-content: center;
    border-radius: 0.5rem;
    background: #FFF;
    padding: 0.5rem 0.75rem;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__back svg {
    display: block;
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__back span {
    overflow: hidden;
    color: #000;
    text-overflow: ellipsis;
    font-family: "Apercu Pro";
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__close {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    align-items: center;
    background: #FFF;
    border: 0;
    border-radius: .5rem;
    padding: .5rem;
    cursor: pointer;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__close:focus-visible,
  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__close:hover {
    background: #F0F0F0;
    outline: 0;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__header .mobile-subpanel__close-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__extra {
    padding: 1.5rem 1.125rem 1.5rem 1.5rem;

  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__extra .mobile-subpanel__title {
    color: #000;
    font-family: "WeWork Serif";
    font-size: 1.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    margin-bottom: 0 !important;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1.125rem 2rem 1.5rem;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__cats li a {
    gap: 0.75rem;
    padding: 0.625rem 0 0.75rem 0;
    color: #000;
    font-family: "Apercu Pro";
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    text-decoration: none;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__cats li a span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0 0.75rem 0;
    text-decoration: none;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__cats li a p {
    color: var(--Greys-Dark, #444);
    /* Body/Regular/B4 */
    font-family: "Apercu Pro";
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    /* 1.225rem */
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__cats li a .mobile-subpanel__chevron {
    flex: 0 0 auto;
    width: 0.46881rem;
    height: 0.85944rem;
    display: block;
  }


  .mega-menu .mobile-nav-subpanel.mobile-nav-subpanel--details .mobile-subpanel__cats li a .mobile-subpanel__chevron {
    display: none;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__primary-cta {
    padding: 0 1.125rem 2rem 1.5rem;
  }

  .mega-menu .mobile-nav-subpanel .mobile-nav-panel__footer {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFF;
    z-index: 1;
  }

  body.has-mobile-subnav {
    overflow: hidden;
    /* Prevent layout shift by preserving scrollbar width */
    padding-right: var(--scrollbar-width, 0);
  }

  /* level 2 details panel */

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__view-all {
    padding: 0 1.125rem 2rem 1.5rem;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__view-all a {
    color: #000;
    font-family: "Apercu Pro";
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery {
    padding: 0 1.125rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__card {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    text-decoration: none;
    background: #A9C4FF;
    border-radius: 0.5rem;
    padding: 1rem;
    align-items: stretch;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    flex: 1 1 auto;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__title {
    margin: 0;
    color: #000;
    font-family: "Apercu Pro";
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 130%;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__desc {
    margin: 0;
    color: #000;
    font-family: "Apercu Pro";
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__card--chip-4 {
    background: #000 !important;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__card--chip-4 .mobile-promo__title {
    color: #FFF;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__card--chip-4 .mobile-promo__desc {
    color: #FFF;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__icon {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    width: 100%;
    margin-left: auto;
    text-align: right;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mega-menu .mobile-nav-subpanel .mobile-subpanel__gallery .mobile-promo__arrow-svg {
    width: 14px;
    height: 14px;
    display: block;
  }
}

/* Desktop only: hide mobile-specific elements */
@media (min-width:1195px) {
  .mega-menu .mobile-nav-panel {
    display: none;
  }

  .mega-menu .mobile-nav-subpanel {
    display: none;
  }

  .mega-menu .main-nav__burger {
    display: none;
  }
}

/* Desktop default: hide mobile nav panel & burger */
/* .mega-menu .mobile-nav-panel {
  display: none;
}

.mega-menu .mobile-nav-subpanel {
  display: none;
} */

.mega-menu .main-nav__burger {
  display: none;
}

/* BACKDROP (mobile) */
@media (max-width:1195px) {
  .mega-menu .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .30s ease;
    z-index: 998;
    /* below panels (1000 / 1001) */
  }

  .mega-menu .mobile-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Optional desktop hide */
@media (min-width:1195px) {
  .mega-menu .mobile-nav-backdrop {
    display: none;
  }
}


/* BACKDROP DESKTOP (on ray-page-container) */
@media (min-width:1196px) {

  .mega-desktop-backdrop {
    position: fixed;
    top: 10rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    z-index: 98;
    /* sub overlay (99), peste pagină */
    transition: opacity .25s;
  }

  .mega-desktop-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Asigură layering corect */
  .mega-menu .main-nav {
    position: relative;
    z-index: 100;
    /* peste backdrop */
  }

  .mega-menu .mega-overlay {
    z-index: 99;
    /* între nav și backdrop */
  }
}