@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}
.theme-header-1 {
  position: relative;
  margin-bottom: 0;
  z-index: 150;
}
.theme-header-1__top-navbar {
  width: 100%;
  height: 114px;
}
.theme-header-1__top-navbar-search {
  width: 100%;
  height: 48px;
}
.theme-header-1__top-navbar-search input {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--white) !important;
  opacity: 0.5;
}
.theme-header-1__top-navbar-search input::-moz-placeholder {
  color: var(--white);
  opacity: 0.7;
}
.theme-header-1__top-navbar-search input::placeholder {
  color: var(--white);
  opacity: 0.7;
}
.theme-header-1__top-navbar-search input:focus, .theme-header-1__top-navbar-search input:checked, .theme-header-1__top-navbar-search input:active {
  background-color: transparent !important;
}
.theme-header-1__top-navbar-search .search-icon {
  position: absolute;
  top: 16px;
  bottom: 16px;
  right: 16px;
}
.theme-header-1__top-navbar-cart-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--danger);
  border-radius: 50%;
  width: 16px;
  height: 16px;
}
@media (max-width: 991px) {
  .theme-header-1__top-navbar {
    height: auto;
  }
}
.theme-header-1__dropdown-user-verify-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  min-width: 14px;
  height: 14px;
}
.theme-header-1__dropdown:not(:hover) > .header-1-dropdown-menu {
  visibility: hidden;
  opacity: 0;
  transform: translateY(15px);
}
.theme-header-1__dropdown .header-1-dropdown-menu {
  position: absolute;
  top: 40px;
  left: 0;
  width: 260px;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  transition: all 0.3s ease;
  z-index: 46;
}
.rtl .theme-header-1__dropdown .header-1-dropdown-menu {
  left: auto;
  right: 0;
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu {
  width: 280px;
  top: 40px;
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item {
  transition: all 0.3s ease;
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item, .theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item a, .theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item .icons {
  color: var(--gray-500);
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item .count-badge {
  min-width: 16px;
  height: 16px;
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item:hover {
  background-color: var(--gray-100);
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item:hover > a {
  transform: translateX(8px);
}
.theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item:hover, .theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item:hover a, .theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu .header-1-dropdown-menu__item:hover .icons {
  color: var(--primary);
}
@media (max-width: 991px) {
  .theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu {
    right: 8px;
    left: auto;
  }
  .rtl .theme-header-1__dropdown .header-1-dropdown-menu.auth-user-info-dropdown-menu {
    left: 8px;
    right: auto;
  }
}
.theme-header-1__dropdown .header-1-dropdown-menu__item {
  color: var(--gray-500);
  border-left: 2px solid transparent;
}
.theme-header-1__dropdown .header-1-dropdown-menu__item > div {
  transition: all 0.3s ease;
}
.theme-header-1__dropdown .header-1-dropdown-menu__item.active {
  border-left: 2px solid var(--primary);
  font-weight: bold;
}
.rtl .theme-header-1__dropdown .header-1-dropdown-menu__item {
  border-left: none;
  border-right: 2px solid transparent;
}
.rtl .theme-header-1__dropdown .header-1-dropdown-menu__item.active {
  border-left: none;
  border-right: 2px solid var(--primary);
}
.theme-header-1__dropdown .header-1-dropdown-menu__item:hover {
  background-color: var(--gray-100);
}
.theme-header-1__dropdown .header-1-dropdown-menu__item:hover > div {
  transform: translateX(8px);
}
.theme-header-1__dropdown .header-1-dropdown-menu__item:hover .header-1-dropdown-menu__item-sign-box {
  background-color: var(--gray-200);
}
.theme-header-1__dropdown .header-1-dropdown-menu__item:hover .header-1-dropdown-menu__sub-menu {
  opacity: 1;
  visibility: visible;
  left: calc(100% + 4px);
}
.rtl .theme-header-1__dropdown .header-1-dropdown-menu__item:hover .header-1-dropdown-menu__sub-menu {
  left: auto;
  right: calc(100% + 4px);
}
.theme-header-1__dropdown .header-1-dropdown-menu__item-sign-box {
  min-width: 32px;
  height: 32px;
  background-color: var(--gray-100);
  color: var(--gray-500);
  font-weight: normal !important;
}
.theme-header-1__dropdown .header-1-dropdown-menu__sub-menu {
  position: absolute;
  top: -8px;
  left: 96%;
  width: 280px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  visibility: hidden;
  opacity: 0;
}
.rtl .theme-header-1__dropdown .header-1-dropdown-menu__sub-menu {
  left: auto;
  right: 96%;
}
.theme-header-1__dropdown .header-1-dropdown-menu__sub-menu li {
  transition: all 0.3s ease;
}
.theme-header-1__dropdown .header-1-dropdown-menu__sub-menu li, .theme-header-1__dropdown .header-1-dropdown-menu__sub-menu li * {
  color: var(--gray-500) !important;
}
.theme-header-1__dropdown .header-1-dropdown-menu__sub-menu li:hover * {
  color: var(--primary) !important;
}
.theme-header-1__dropdown .header-1-dropdown-menu__sub-menu li:hover > a {
  transform: translateX(8px) !important;
}
.theme-header-1__dropdown .header-1-dropdown-menu__flag {
  width: 32px;
  min-width: 32px;
  height: 32px;
}
.theme-header-1__dropdown .header-1-dropdown-menu__flag, .theme-header-1__dropdown .header-1-dropdown-menu__flag img {
  border-radius: 8px;
}
.theme-header-1__main {
  position: relative;
  height: 104px;
  top: -52px;
  margin-bottom: -52px;
}
.theme-header-1__main.sticky {
  position: fixed;
  top: 20px;
  width: 100%;
  animation: slideDown 0.5s ease forwards;
}
.theme-header-1__main-mask {
  position: absolute;
  top: 8px;
  left: 16px;
  right: 16px;
  bottom: -8px;
  border-radius: 24px;
  opacity: 0.5;
  background: var(--white);
  z-index: 1;
}
@media (max-width: 991px) {
  .theme-header-1__main {
    height: auto;
  }
}

/* Defensive rule: in some Chromium states (DevTools responsive mode with
   touch emulation, certain narrow viewports) the language / currency
   dropdown menu could fall into the normal flow — making the parent box
   take the menu's full height (~390px) and breaking the entire top row.
   Lock the menu down with display:none/block + position:absolute and
   force-hover to win over any UA / utility class. */
.theme-header-1__top-navbar .theme-header-1__dropdown {
    position: relative !important;
}
.theme-header-1__top-navbar .theme-header-1__dropdown > .header-1-dropdown-menu {
    position: absolute !important;
    top: 40px !important;
    z-index: 60 !important;
    display: none !important;        /* bulletproof — never contributes
                                        to the parent's layout height */
}
.theme-header-1__top-navbar .theme-header-1__dropdown:hover > .header-1-dropdown-menu {
    display: block !important;
}

/* --- Top navbar — single fluid flex row ---
   [contact]  [search expands]  [language/currency/cart]  [auth]
   The two side groups hug their content, the search in the middle takes
   whatever space is left. Drops to a second line only when truly cramped. */
.theme-header-1__top-navbar { height: auto !important; min-height: 0; }
.theme-header-1__top-row { row-gap: 12px; }

.theme-header-1__top-search {
    flex-basis: 220px;                  /* baseline so it never collapses
                                           below this on a narrow viewport */
    min-width: 200px;
    max-width: 560px;                   /* don't let it eat the whole row
                                           on huge screens */
}
.theme-header-1__top-search input { height: 40px; }
.theme-header-1__top-search .search-icon { top: 12px; bottom: 12px; }

.theme-header-1__top-contact,
.theme-header-1__top-utilities,
.theme-header-1__top-auth { min-width: 0; }

/* Tighten visual spacing on smaller desktop widths so the row survives
   without dropping to a second line until ~1100px. */
@media (max-width: 1399px) {
    .theme-header-1__top-row { column-gap: 12px !important; }
    .theme-header-1__top-contact { gap: 10px !important; }
    .theme-header-1__top-utilities { gap: 10px !important; }
}
@media (max-width: 1199px) {
    .theme-header-1__top-row { column-gap: 10px !important; }
    .theme-header-1__top-contact { gap: 8px !important; }
    .theme-header-1__top-utilities { gap: 8px !important; }
    /* hide the text label of the language / currency dropdowns; flag + arrow
       still tell the user what they're looking at and the menu still opens
       on hover. */
    .theme-header-1__top-navbar .js-lang-title { display: none !important; }
}

/* --- Single-line fluid main navbar ---
   Layout (start → end):
     [Logo] [Categories]   [Nav links spread to fill]   [CTA Button]
   Logo + Categories sit on the start side; CTA hugs the end side; the
   nav-link group flex-grows to eat the empty space between them. The
   row never wraps — everything (gaps, font, padding) scales fluidly
   via clamp() so 6+ Arabic links keep fitting on one line down to the
   smallest desktop width. */

.theme-header-1__main-row {
    min-height: 0;
    /* fluid gap between the four major slots */
    column-gap: clamp(8px, 1.4vw, 24px);
}

/* Nav-link group: stays on one line as long as it fits; wraps to a second
   line ONLY when items would otherwise overlap the CTA button. The whole
   group still vertically centers inside the row (align-items: center on
   the parent), so wrapping doesn't shove the CTA up or down. */
.theme-header-1__main-links {
    min-width: 0;
    flex-wrap: wrap;                    /* allow second line as a graceful fallback */
    column-gap: clamp(8px, 1vw, 16px);  /* visible gap between siblings on every line */
    row-gap: 6px;                       /* spacing between wrapped lines */
    align-content: center;              /* center the wrapped block vertically */
}
.theme-header-1__nav-link {
    position: relative;
    z-index: 3;
    white-space: nowrap;
    /* fluid font: 0.82rem on tight desktop → 1rem on wide screens. */
    font-size: clamp(0.82rem, 0.65rem + 0.4vw, 1rem);
    padding: 4px 2px;
}

/* The Categories button sits beside the logo. Trim its inner spacing so
   it doesn't tower over the slim nav links beside it. */
.theme-header-1__main-categories .theme-header-1__nav-item {
    padding: 8px 12px !important;
    font-size: clamp(0.82rem, 0.65rem + 0.4vw, 1rem);
}

/* CTA button shrinks alongside everything else. */
.theme-header-1__main-row .btn-lg {
    padding: clamp(6px, 0.6vw, 12px) clamp(12px, 1.4vw, 28px);
    font-size: clamp(0.82rem, 0.65rem + 0.4vw, 1rem);
}
.theme-header-1__logo {
  height: 68px !important;
  overflow: hidden;
}
.theme-header-1__logo img {
  height: 100% !important;
  width: auto !important;             /* override Bootstrap's .img-fluid which
                                          sets `width: 100%; height: auto;`
                                          and otherwise wins in some Chromium
                                          states (DevTools responsive mode). */
  max-height: 100%;
}
.theme-header-1__categories .cat-dropdown-menu-icon {
  width: 24px;
  max-width: 24px;
  min-width: 24px;
}
