/* ═══════════════════════════════════════════════════
   AL EHDA — HEADER STYLES
   File: /assets/css/header.css
   ═══════════════════════════════════════════════════ */

/* ── TOP ANNOUNCEMENT BAR ──────────────────────────── */
.ae-top-bar {
  background: var(--ae-primary-dark);
  color: rgba(255,255,255,0.80);
  font-size: var(--ae-text-xs);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ae-top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  gap: var(--ae-sp-4);
  flex-wrap: wrap;
}
.ae-top-bar__message {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--ae-sp-2);
}
.ae-top-bar__message a {
  color: var(--ae-accent);
  font-weight: var(--ae-weight-semi);
  text-decoration: underline;
}
.ae-top-bar__right {
  display: flex;
  align-items: center;
  gap: var(--ae-sp-5);
}
.ae-top-bar__link {
  color: rgba(255,255,255,0.70);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--ae-fast);
}
.ae-top-bar__link:hover { color: var(--ae-accent); }

/* ── MAIN HEADER ───────────────────────────────────── */
.ae-header {
  background: var(--ae-primary);
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: var(--ae-z-sticky);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: box-shadow var(--ae-base);
}
.ae-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.ae-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ae-sp-6);
  height: var(--ae-header-h);
  transition: height var(--ae-base);
}
.ae-header.is-scrolled .ae-header__inner { height: 60px; }

/* ── LOGO ──────────────────────────────────────────── */
.ae-header__logo { flex-shrink: 0; }
.ae-header__logo img {
  height: 44px;
  width: auto;
  display: block;
  transition: height var(--ae-base);
}
.ae-header.is-scrolled .ae-header__logo img { height: 36px; }

.ae-logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  text-decoration: none;
  line-height: 1;
}
.ae-logo-text__al {
  font-family: var(--ae-font-heading);
  font-size: 1.6rem;
  font-weight: var(--ae-weight-black);
  color: var(--ae-white);
  letter-spacing: -0.03em;
}
.ae-logo-text__ehda {
  font-family: var(--ae-font-heading);
  font-size: 1.6rem;
  font-weight: var(--ae-weight-black);
  color: var(--ae-accent);
  letter-spacing: -0.03em;
}
.ae-logo-text__tagline {
  font-size: var(--ae-text-xs);
  color: rgba(255,255,255,0.45);
  font-weight: var(--ae-weight-normal);
  margin-left: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: center;
}
.ae-logo-text--mobile .ae-logo-text__tagline,
.ae-logo-text--footer .ae-logo-text__tagline { display: none; }

/* ── DESKTOP NAVIGATION ────────────────────────────── */
.ae-header__nav { flex: 1; display: flex; justify-content: center; }

.ae-nav__list {
  display: flex;
  align-items: center;
  gap: var(--ae-sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.ae-nav__list > li > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: var(--ae-text-sm);
  font-weight: var(--ae-weight-medium);
  color: rgba(255,255,255,0.85);
  border-radius: var(--ae-r-md);
  transition: all var(--ae-fast);
  white-space: nowrap;
  position: relative;
}
.ae-nav__list > li > a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 14px; right: 14px;
  height: 2px;
  background: var(--ae-accent);
  transform: scaleX(0);
  transition: transform var(--ae-base);
  border-radius: var(--ae-r-full);
}
.ae-nav__list > li > a:hover { color: var(--ae-white); }
.ae-nav__list > li > a:hover::after,
.ae-nav__list > li.current-menu-item > a::after { transform: scaleX(1); }
.ae-nav__list > li.current-menu-item > a {
  color: var(--ae-white);
  font-weight: var(--ae-weight-semi);
}

/* ── HEADER ACTIONS ────────────────────────────────── */
.ae-header__actions {
  display: flex;
  align-items: center;
  gap: var(--ae-sp-2);
  flex-shrink: 0;
}
.ae-header__icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--ae-r-md);
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all var(--ae-fast);
  padding: 0;
  text-decoration: none;
}
.ae-header__icon-btn:hover {
  background: rgba(255,255,255,0.10);
  color: var(--ae-white);
}
.ae-header__icon-btn:focus-visible {
  outline: 2px solid var(--ae-accent);
  outline-offset: 2px;
}

/* Search toggle icon swap */
.ae-search-toggle .ae-icon--close   { display: none; }
.ae-search-toggle.is-active .ae-icon--search { display: none; }
.ae-search-toggle.is-active .ae-icon--close  { display: block; }

/* Cart button & badge */
.ae-cart-btn { width: auto; padding: 0 10px; gap: 6px; }
.ae-cart-badge {
  position: absolute;
  top: 3px; right: 3px;
  min-width: 17px; height: 17px;
  background: var(--ae-accent);
  color: var(--ae-primary);
  font-size: 10px;
  font-weight: var(--ae-weight-bold);
  border-radius: var(--ae-r-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1;
  border: 2px solid var(--ae-primary);
  animation: ae-badge-pop 0.3s var(--ae-ease);
}
@keyframes ae-badge-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Account button */
.ae-account-btn {
  width: auto;
  gap: var(--ae-sp-2);
  padding: 0 12px;
  font-size: var(--ae-text-sm);
  font-weight: var(--ae-weight-medium);
}
.ae-account-label {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── HAMBURGER BUTTON ──────────────────────────────── */
.ae-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: var(--ae-r-md);
  color: white;
  align-items: center;
  justify-content: center;
  transition: background var(--ae-fast);
}
.ae-mobile-toggle:hover { background: rgba(255,255,255,0.10); }

.ae-hamburger { display: flex; flex-direction: column; gap: 5px; }
.ae-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all var(--ae-base);
  transform-origin: center;
}
.ae-mobile-toggle[aria-expanded="true"] .ae-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.ae-mobile-toggle[aria-expanded="true"] .ae-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.ae-mobile-toggle[aria-expanded="true"] .ae-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── SEARCH BAR DROPDOWN ───────────────────────────── */
.ae-search-bar {
  background: var(--ae-primary-dark);
  border-bottom: 2px solid var(--ae-accent);
  padding: var(--ae-sp-5) 0;
  animation: ae-slide-down 0.25s var(--ae-ease);
}
@keyframes ae-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ae-search-form__inner {
  display: flex;
  gap: var(--ae-sp-3);
  align-items: center;
}
.ae-search-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--ae-r-md);
  padding: 0.7rem 1rem;
  color: var(--ae-white);
  font-size: var(--ae-text-base);
  font-family: var(--ae-font-body);
  outline: none;
  transition: border-color var(--ae-fast);
}
.ae-search-input::placeholder { color: rgba(255,255,255,0.45); }
.ae-search-input:focus { border-color: var(--ae-accent); }

.ae-search-suggestions {
  display: flex;
  align-items: center;
  gap: var(--ae-sp-3);
  margin-top: var(--ae-sp-3);
  flex-wrap: wrap;
}
.ae-search-suggestions__label {
  font-size: var(--ae-text-xs);
  color: rgba(255,255,255,0.50);
}
.ae-search-suggestions a {
  font-size: var(--ae-text-xs);
  color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 3px 10px;
  border-radius: var(--ae-r-full);
  transition: all var(--ae-fast);
}
.ae-search-suggestions a:hover {
  background: var(--ae-accent);
  color: var(--ae-primary);
  border-color: var(--ae-accent);
}

/* ── MOBILE MENU SIDEBAR ───────────────────────────── */
.ae-mobile-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 85vw);
  background: var(--ae-primary);
  z-index: var(--ae-z-modal);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--ae-base);
}
.ae-mobile-menu:not([hidden]) { transform: translateX(0); }

.ae-mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ae-sp-5) var(--ae-sp-6);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  flex-shrink: 0;
}
.ae-mobile-menu__close {
  background: rgba(255,255,255,0.08);
  border: none;
  width: 36px; height: 36px;
  border-radius: var(--ae-r-md);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ae-fast);
}
.ae-mobile-menu__close:hover { background: rgba(255,255,255,0.15); }

.ae-mobile-menu__search {
  padding: var(--ae-sp-5) var(--ae-sp-6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ae-mobile-menu__search .ae-input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: white;
}
.ae-mobile-menu__search .ae-input::placeholder { color: rgba(255,255,255,0.40); }

.ae-mobile-menu__nav { flex: 1; padding: var(--ae-sp-4) 0; }
.ae-mobile-nav__list { list-style: none; padding: 0; margin: 0; }
.ae-mobile-nav__list li a {
  display: block;
  padding: var(--ae-sp-4) var(--ae-sp-6);
  color: rgba(255,255,255,0.85);
  font-size: var(--ae-text-base);
  font-weight: var(--ae-weight-medium);
  border-left: 3px solid transparent;
  transition: all var(--ae-fast);
  text-decoration: none;
}
.ae-mobile-nav__list li a:hover,
.ae-mobile-nav__list li.current-menu-item a {
  color: var(--ae-accent);
  background: rgba(201,168,76,0.08);
  border-left-color: var(--ae-accent);
}

.ae-mobile-menu__actions {
  padding: var(--ae-sp-5) var(--ae-sp-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: var(--ae-sp-3);
}
.ae-mobile-action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ae-sp-3) var(--ae-sp-4);
  background: rgba(255,255,255,0.06);
  border-radius: var(--ae-r-md);
  color: rgba(255,255,255,0.85);
  font-size: var(--ae-text-sm);
  text-decoration: none;
  transition: background var(--ae-fast);
}
.ae-mobile-action-link:hover {
  background: rgba(255,255,255,0.10);
  color: var(--ae-white);
}

.ae-mobile-menu__social {
  display: flex;
  gap: var(--ae-sp-3);
  padding: var(--ae-sp-5) var(--ae-sp-6);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── OVERLAY ───────────────────────────────────────── */
.ae-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: calc(var(--ae-z-modal) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ae-base);
  backdrop-filter: blur(2px);
}
.ae-mobile-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

/* ── SOCIAL ICONS ──────────────────────────────────── */
.ae-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--ae-r-md);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  transition: all var(--ae-base);
  border: 1px solid rgba(255,255,255,0.10);
  text-decoration: none;
}
.ae-social-icon:hover {
  background: var(--ae-accent);
  color: var(--ae-primary);
  border-color: var(--ae-accent);
  transform: translateY(-2px);
}

/* ── SKIP LINK ─────────────────────────────────────── */
.ae-skip-link:focus {
  position: fixed;
  top: var(--ae-sp-4);
  left: var(--ae-sp-4);
  z-index: var(--ae-z-toast);
  padding: var(--ae-sp-3) var(--ae-sp-5);
  background: var(--ae-accent);
  color: var(--ae-primary);
  border-radius: var(--ae-r-md);
  font-weight: var(--ae-weight-bold);
  box-shadow: var(--ae-shadow-lg);
  text-decoration: none;
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1024px) {
  .ae-header__nav    { display: none; }
  .ae-mobile-toggle  { display: flex; }
  .ae-account-label  { display: none; }
  .ae-account-btn    { width: 40px; padding: 0; justify-content: center; }
  .ae-top-bar__right { display: none; }
}
@media (max-width: 480px) {
  .ae-top-bar                { display: none; }
  .ae-logo-text__tagline     { display: none; }
}
