/*
 * Header and desktop mega menu (Figma "Mega menu Donna", HP desktop).
 */

.i2k-header {
  --i2k-header-h: 76px;
  position: relative;
}

/* The panel spans the whole header row: every box between the row and the
   panel must stay static, or the panel would anchor to the menu widget. */
.i2k-header > .e-con-inner,
.i2k-header .elementor-widget-shortcode:has(.i2k-mm),
.i2k-header .elementor-widget-shortcode:has(.i2k-mm) > .elementor-widget-container,
.i2k-header .elementor-shortcode:has(.i2k-mm) {
  position: static;
}

/* ---------- Bar ---------- */
.i2k-mm__bar {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.i2k-mm__item {
  position: static;
  margin: 0;
}
.i2k-mm__link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  height: var(--i2k-header-h);
  font-size: 15px;
  line-height: 1;
  color: var(--color-text-main);
  white-space: nowrap;
}
/* Reserves the bold width so opening an item does not shift the bar. */
.i2k-mm__link::after {
  content: attr(data-label);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}
.i2k-mm__link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.i2k-mm__item.is-open > .i2k-mm__link,
.i2k-mm__item.is-current > .i2k-mm__link,
.i2k-mm__link:hover {
  color: var(--color-text-main);
  font-weight: 700;
}
.i2k-mm__item.is-open > .i2k-mm__link::before,
.i2k-mm__item.is-current > .i2k-mm__link::before {
  transform: scaleX(1);
}

/* ---------- Panel ---------- */
.i2k-mm__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(260px, 372px) minmax(0, 1fr);
  padding-inline: max(0px, (100% - 1600px) / 2);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 16px 32px rgba(26, 32, 44, .12);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s ease;
}
.i2k-mm__item.is-open > .i2k-mm__panel {
  opacity: 1;
  visibility: visible;
}

.i2k-mm__side {
  grid-column: 1;
  grid-row: 1;
  padding: 28px 0 32px 24px;
  background: #F7F7F7;
}
.i2k-mm__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-right: 24px;
}
.i2k-mm__title {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--color-text-main);
}
.i2k-mm__see-all,
.i2k-mm__all {
  font-size: 13px;
  color: var(--color-primary);
  white-space: nowrap;
}
.i2k-mm__see-all:hover,
.i2k-mm__all:hover {
  color: var(--color-primary-over);
  text-decoration: underline;
}
.i2k-mm__subs {
  margin: 0;
  padding: 0;
  list-style: none;
}
.i2k-mm__subs li {
  margin: 0;
}
.i2k-mm__sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px 12px 16px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--color-text-main);
}
.i2k-mm__sub.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 700;
}
.i2k-mm__sub.is-active::after {
  content: "\2192";
  font-weight: 400;
}

/* ---------- Pane: feature + best sellers ---------- */
.i2k-mm__pane {
  grid-column: 2;
  grid-row: 1;
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  padding: 32px 24px 32px 40px;
}
.i2k-mm__pane.is-active {
  display: grid;
}

.i2k-mm__feature {
  display: flex;
  flex-direction: column;
  align-self: start;
  color: var(--color-text-main);
}
.i2k-mm__media {
  display: block;
  aspect-ratio: 548 / 372;
  overflow: hidden;
  background: #E2E5EA;
}
.i2k-mm__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.i2k-mm__feature:hover .i2k-mm__media img {
  transform: scale(1.03);
}
.i2k-mm__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #E2E8F0;
}
.i2k-mm__caption-title {
  font-size: 20px;
  line-height: 1.2;
}
.i2k-mm__btn {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-text-main);
  transition: background .2s ease, color .2s ease;
}
.i2k-mm__feature:hover .i2k-mm__btn {
  background: var(--color-text-main);
  color: var(--color-surface);
}

.i2k-mm__loved {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.i2k-mm__label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #4A5568;
}
.i2k-mm__products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.i2k-mm__products li {
  margin: 0;
}
.i2k-mm__product {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-main);
}
.i2k-mm__thumb {
  display: block;
  aspect-ratio: 162 / 196;
  margin-bottom: 8px;
  overflow: hidden;
  background: #E2E5EA;
}
.i2k-mm__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.i2k-mm__brand {
  font-weight: 700;
  text-transform: uppercase;
}
.i2k-mm__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.i2k-mm__price del {
  margin-right: 4px;
  color: var(--color-text-muted);
}
.i2k-mm__price ins {
  text-decoration: none;
}
.i2k-mm__all {
  margin-top: auto;
  font-size: 14px;
}

@media (max-width: 1279px) {
  .i2k-mm__bar {
    gap: 16px;
  }
  .i2k-mm__link {
    font-size: 14px;
  }
  .i2k-mm__pane {
    gap: 24px;
    padding-left: 28px;
  }
}

/* ---------- Row layout ---------- */
.i2k-header__nav .i2k-mm__bar {
  justify-content: center;
}

/* ---------- Icons (XStore search / account / wishlist / cart) ---------- */
.i2k-header .i2k-header__icon .elementor-button {
  min-height: 0;
  padding: 0;
  color: var(--color-text-main);
  background: none;
  border: 0;
  box-shadow: none;
}
.i2k-header .i2k-header__icon .elementor-button:hover {
  color: var(--color-primary);
  background: none;
}
.i2k-header .i2k-header__icon .button-text {
  display: none;
}
.i2k-header .i2k-header__icon .elementor-button-icon {
  position: relative;
  display: inline-flex;
  font-size: 21px;
}
.i2k-header .i2k-header__icon .elementor-button-icon-qty {
  position: absolute;
  top: -4px;
  left: calc(100% - 4px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  color: #FFFFFF;
  background: var(--color-text-main);
  border-radius: 999px;
}

@media (min-width: 1025px) {
  .i2k-header .i2k-header__search {
    position: relative;
    padding-left: 24px;
  }
  .i2k-header .i2k-header__search::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 28px;
    background: var(--color-text-main);
    transform: translateY(-50%);
  }
}

@media (max-width: 1024px) {
  .i2k-header .elementor-widget-theme-etheme_site-logo {
    flex: 1 1 auto;
    text-align: center;
  }
  .i2k-header .elementor-widget-theme-etheme_site-logo img {
    max-width: 150px;
  }
}
