/* =============================================================
   Essence Arab — Header
   ============================================================= */

/* ——— Announcement Bar ——— */
.ea-topbar {
  background: var(--ea-topbar-bg, var(--color-gold));
  color: var(--ea-topbar-color, #0b0b0b);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.5rem 1rem;
}
.ea-topbar__inner {
  display: block;
  color: inherit;
}
.ea-topbar__text { margin: 0; }

.ea-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 11, 11, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background 0.3s ease, border-color 0.3s ease;
}


.ea-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

/* ——— Logo ——— */
.ea-header__logo {
  flex-shrink: 0;
}
.ea-header .ea-header__logo-img {
  height: var(--ea-logo-h, 36px) !important;
  width: auto !important;
  max-width: none !important;
  display: block !important;
}
.ea-header__logo-text {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--color-gold);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ——— Nav ——— */
.ea-header__nav {
  display: flex;
  justify-content: center;
}
.ea-nav__list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.ea-nav__list li a {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s ease;
  position: relative;
}
.ea-nav__list li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.25s ease;
}
.ea-nav__list li a:hover,
.ea-nav__list li.current-menu-item a {
  color: var(--color-gold);
}
.ea-nav__list li a:hover::after,
.ea-nav__list li.current-menu-item a::after {
  width: 100%;
}

/* ——— Actions ——— */
.ea-header__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.ea-header__action {
  color: var(--color-muted);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  position: relative;
}
.ea-header__action:hover {
  color: var(--color-gold);
}
.ea-cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-gold);
  color: var(--color-bg);
  font-size: 0.5625rem;
  font-weight: 500;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ea-cart-count:empty,
.ea-cart-count[data-count="0"] {
  display: none;
}

/* ——— Search Bar ——— */
.ea-search-bar {
  background: var(--color-bg-card);
  border-bottom: 1px solid transparent;
  padding-block: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-block 0.3s ease, border-color 0.3s ease;
}
.ea-search-bar.is-open {
  max-height: 80px;
  padding-block: 1rem;
  border-bottom-color: var(--color-border);
}
.ea-search-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}
.ea-search-form__input {
  flex: 1;
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-white);
  background: transparent;
}
.ea-search-form__input::placeholder {
  color: var(--color-muted);
}
.ea-search-form__submit {
  color: var(--color-gold);
  transition: opacity 0.2s;
}
.ea-search-form__submit:hover { opacity: 0.7; }

/* ——— Hamburger ——— */
.ea-header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.ea-header__hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-muted);
  transition: var(--transition);
}
.ea-header__hamburger.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background: var(--color-gold);
}
.ea-header__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.ea-header__hamburger.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  background: var(--color-gold);
}

/* ——— Mobile Drawer ——— */
.ea-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--color-bg-card);
  border-left: 1px solid var(--color-border);
  z-index: 100100;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.ea-mobile-drawer.is-open {
  transform: translateX(0);
}
.ea-mobile-drawer__inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}
.ea-mobile-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
.ea-mobile-drawer__logo {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  letter-spacing: 0.3em;
  color: var(--color-gold);
  text-transform: uppercase;
}
.ea-mobile-drawer .ea-mobile-drawer__logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.ea-mobile-drawer__close {
  color: var(--color-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
  padding: 4px;
}
.ea-mobile-drawer__close:hover { color: var(--color-gold); }
.ea-mobile-nav__list li {
  border-bottom: 1px solid var(--color-border-subtle);
}
.ea-mobile-nav__list li a {
  display: block;
  padding-block: 1rem;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color 0.2s, padding-left 0.2s;
}
.ea-mobile-nav__list li a:hover {
  color: var(--color-gold);
  padding-left: 0.5rem;
}

/* ——— Overlay ——— */
.ea-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.ea-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .ea-header__nav { display: none; }
  .ea-header__inner { grid-template-columns: auto 1fr; }
  .ea-header__actions { justify-self: end; }
  .ea-header__hamburger { display: flex; }
}
@media (max-width: 640px) {
  .ea-topbar { font-size: 0.6875rem; padding: 0.35rem 0.75rem; }
  .ea-header__inner { height: 60px; gap: 1rem; }
  .ea-header__actions { gap: 0.875rem; }
  .ea-mobile-drawer { width: min(280px, 88vw); }
}
