:root {
  --color-bg: #121211;
  --color-gold: #f0d29f;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.5);
  --font-english: "Konnect", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", sans-serif;
  --font-konnect: var(--font-english);
  --font-outfit: "Outfit", sans-serif;
  --header-height: 76px;
  --header-height-mobile: 68px;
  --header-padding-x: var(--silver-inset-x, 4.1%);
  --header-padding-x-mobile: var(--silver-inset-x, 3.7%);
  --header-menu-bar: 2px;
}

/* Arabic / RTL — IBM Plex Sans Arabic (existing --font-konnect usages pick this up) */
html[lang^="ar"],
html[dir="rtl"],
body.rtl {
  --font-konnect: var(--font-arabic);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: white;
  font-family: var(--font-konnect);
}

body.is-header-menu-open {
  overflow: hidden;
}

.header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: var(--color-bg);
}

.header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--header-padding-x);
}

.header__logo {
  position: relative;
  z-index: 2;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
}

.header__logo img {
  display: block;
  width: 94px;
  height: auto;
}

.header__nav--desktop {
  position: absolute;
  top: 0;
  right: var(--header-padding-x);
  bottom: 0;
  left: var(--header-padding-x);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.header__nav--desktop .header__nav-list {
  pointer-events: auto;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 83px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__nav--desktop .header__nav-list {
  height: 100%;
}

.header__nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.header__nav--desktop .header__nav-item {
  height: 100%;
}

.header__nav-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-konnect);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header__nav-item--active .header__nav-link {
  font-weight: 700;
  color: var(--color-text);
}

.header__nav--desktop .header__nav-item--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 85px;
  height: 2px;
  background: var(--color-text);
}

.header__nav-link--products {
  display: inline-block;
  position: relative;
  font-family: var(--font-outfit);
  color: var(--color-text-muted);
}

.header__nav-link--products .header__nav-label {
  position: relative;
  display: inline-block;
}

.header__nav-link--products .header__badge {
  position: absolute;
  top: -10px;
  left: 100%;
  margin-left: 3px;
}

.header__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 17px;
  padding: 0 7px;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-konnect);
  font-size: 10px;
  font-weight: 400;
  line-height: 13px;
}

.header__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 101px;
  min-height: 34px;
  padding: 8px 16px;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-outfit);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.header__actions {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 28px;
}

.header__search-toggle,
.header__lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.header__search-toggle {
  width: 24px;
  height: 24px;
  opacity: 0.85;
}

.header__search-toggle:hover,
.header__lang-toggle:hover {
  opacity: 1;
}

.header__search-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.header__lang {
  position: relative;
}

.header__lang-toggle,
.header__lang-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.header__lang-code {
  font-family: var(--font-konnect);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.header__lang-chevron {
  display: block;
  width: 12px;
  height: 8px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.header__lang.is-open .header__lang-chevron {
  transform: rotate(180deg);
}

.header__lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 5;
  min-width: 72px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #1d1d1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.header__lang-menu[hidden] {
  display: none;
}

.header__lang-item {
  margin: 0;
}

.header__lang-option {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-konnect);
  font-size: 14px;
  line-height: 18px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.header__lang-option:hover,
.header__lang-item.is-active .header__lang-option {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.header__search-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 4;
  padding: 16px var(--header-padding-x) 20px;
  background: var(--color-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

.header__search-panel[hidden] {
  display: block;
}

.header.is-search-open .header__search-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.header__search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font-family: var(--font-konnect);
  font-size: 14px;
  line-height: 18px;
}

.header__search-input::placeholder {
  color: var(--color-text-muted);
}

.header__search-input:focus {
  outline: none;
  border-color: rgba(240, 210, 159, 0.55);
}

.header__search-submit {
  flex-shrink: 0;
  min-width: 96px;
  height: 44px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-outfit);
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.header__search-submit:hover {
  opacity: 0.9;
}

.header__cta:hover {
  opacity: 0.9;
}

.header__nav-link:hover {
  color: var(--color-text);
}

.header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.header__menu-icon {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.header__menu-bar {
  display: block;
  width: 20px;
  height: var(--header-menu-bar);
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
}

.header__menu-bar:nth-child(2) {
  width: 16px;
}

.header.is-menu-open .header__menu-bar:nth-child(1) {
  width: 20px;
  transform: translateY(7px) rotate(45deg);
}

.header.is-menu-open .header__menu-bar:nth-child(2) {
  opacity: 0;
}

.header.is-menu-open .header__menu-bar:nth-child(3) {
  width: 20px;
  transform: translateY(-7px) rotate(-45deg);
}

.header__mobile-panel {
  display: none;
}

.header__actions--mobile {
  display: none;
}

@media (max-width: 1200px) {
  .header__nav-list {
    gap: 32px;
  }
}

@media (max-width: 992px) {
  .header__bar {
    height: var(--header-height-mobile);
    padding: 0 var(--header-padding-x-mobile);
  }

  .header__logo img {
    width: 77px;
  }

  .header__nav--desktop,
  .header__actions--desktop {
    display: none;
  }

  .header__menu-toggle {
    display: inline-flex;
  }

  .header__actions--mobile {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header__search-panel {
    padding: 16px var(--header-padding-x-mobile) 20px;
  }

  .header__mobile-panel {
    position: fixed;
    top: var(--header-height-mobile);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 28px var(--header-padding-x-mobile) 32px;
    overflow-y: auto;
    background: var(--color-bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      opacity 0.25s ease,
      visibility 0.25s ease,
      transform 0.25s ease;
  }

  .header__mobile-panel[hidden] {
    display: none;
  }

  .header.is-menu-open .header__mobile-panel {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .header__nav--mobile .header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .header__nav--mobile .header__nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header__nav--mobile .header__nav-link {
    width: 100%;
    padding: 18px 0;
    font-size: 16px;
    line-height: 22px;
    white-space: normal;
  }

  .header__nav--mobile .header__nav-item--active .header__nav-link {
    color: var(--color-text);
  }

  .header__nav--mobile .header__nav-item--active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 2px;
    background: var(--color-gold);
  }

  .header__nav--mobile .header__nav-link--products {
    padding-right: 48px;
  }

  .header__nav--mobile .header__nav-link--products .header__badge {
    top: 50%;
    margin-top: -8px;
    display: none;
  }

  .header__cta--mobile {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin-top: auto;
    font-size: 16px;
  }
}

