/* ============================================================
   TAVAZO — Header & Navigation
   Centered logo with split navigation, sticky, mobile drawer
   ============================================================ */

/* ═══════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════ */

.top-bar {
  background: var(--tavazo-teal-darker);
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  padding: 4px 0;
  letter-spacing: 0.06em;
  position: relative;
  z-index: calc(var(--z-sticky) + 1);
}

.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.top-bar__item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tavazo-cream);
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.top-bar__item:hover {
  opacity: 1;
  color: var(--tavazo-gold-light);
}

.top-bar__item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.top-bar__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.top-bar__social a {
  color: var(--tavazo-cream);
  opacity: 0.7;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.top-bar__social a:hover {
  opacity: 1;
  color: var(--tavazo-gold-light);
}

.top-bar__social svg {
  width: 14px;
  height: 14px;
}

.top-bar__divider {
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.2);
}


/* ═══════════════════════════════════════════════
   MAIN HEADER — Premium two-tier with brand identity
   ═══════════════════════════════════════════════ */

.header {
  background: linear-gradient(180deg, #0B4945 0%, #083C39 100%);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: none;
  will-change: transform;
}

/* Scrolled state — compact */
.header--scrolled {
  background: rgba(16, 117, 113, 0.97);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.header__inner {
  transition: padding 0.3s ease;
}

.header--scrolled .header__inner {
  padding-top: 6px;
  padding-bottom: 6px;
}

.header__logo img {
  transition: height 0.3s ease;
}

.header--scrolled .header__logo img {
  height: 42px;
}

.header__ornament-line {
  transition: opacity 0.3s ease;
}

.header--scrolled .header__ornament-line {
  opacity: 0;
}

.header__brand {
  transition: opacity 0.3s ease;
}

.header--scrolled .header__brand {
  opacity: 0;
  pointer-events: none;
}

/* ── Inner layout: brand | nav-left | logo | nav-right | actions ── */
.header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  position: relative;
  transition: padding 0.4s ease;
}

/* ── Brand Tagline (far left) ── */
.header__brand {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header__brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--tavazo-gold);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.header__brand-tag {
  font-size: 8px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1;
}

/* ── Split Navigation ── */
.header__nav-left,
.header__nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header__nav-left {
  justify-content: flex-end;
  padding-right: 40px;
}

.header__nav-right {
  justify-content: flex-start;
  padding-left: 40px;
}

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

/* ── Nav links ── */
.header__nav-link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  padding: 6px 2px;
  position: relative;
  transition: color 0.3s ease;
  background: none !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-block;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 2px;
  right: 2px;
  width: auto;
  height: 1px;
  background: var(--tavazo-gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.header__nav-link:hover,
.header__nav-link--active {
  color: #fff;
}

.header__nav-link--active::after,
.header__nav-link:hover::after {
  transform: scaleX(1);
}

/* ── Logo — centered, prominent ── */
.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  position: relative;
}

.header__logo img {
  height: 58px;
  width: auto;
  transition: all 0.4s ease;
  filter: none;
}

.header__logo:hover img {
  filter: drop-shadow(0 0 12px rgba(200, 164, 78, 0.35));
}

/* ── Actions (Cart, Search) — right side ── */
.header__actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.header__action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.25s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.header__action-btn:hover {
  color: var(--tavazo-gold);
}

.header__action-btn svg {
  width: 20px;
  height: 20px;
}

.header__cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--tavazo-gold);
  color: var(--tavazo-teal-darker);
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Thin gold accent line below header ── */
.header__ornament-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200, 164, 78, 0.15) 25%,
    rgba(200, 164, 78, 0.3) 50%,
    rgba(200, 164, 78, 0.15) 75%,
    transparent 100%
  );
  transition: opacity 0.4s ease;
}

.header--scrolled .header__ornament-line {
  opacity: 0;
  height: 0;
}


/* ═══════════════════════════════════════════════
   MOBILE NAVIGATION
   ═══════════════════════════════════════════════ */

.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: calc(var(--z-overlay) + 1);
}

.header__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-base);
  border-radius: 0;
}

.header__hamburger--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__hamburger--active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--tavazo-teal-darker);
  z-index: var(--z-overlay);
  transition: right var(--transition-base);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.mobile-nav--open {
  right: 0;
}

.mobile-nav__ornament {
  height: 2px;
  background: var(--tavazo-gold);
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav__logo img {
  height: 50px;
}

.mobile-nav__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.mobile-nav__close:hover {
  border-color: var(--tavazo-gold);
  color: var(--tavazo-gold);
}

.mobile-nav__list {
  padding: var(--space-lg) 0;
}

.mobile-nav__item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.mobile-nav__link svg {
  flex-shrink: 0;
  color: var(--tavazo-gold);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.mobile-nav__link:hover svg,
.mobile-nav__link--active svg {
  opacity: 1;
}

.mobile-nav__link:hover,
.mobile-nav__link--active {
  color: var(--tavazo-gold);
  background-color: rgba(255, 255, 255, 0.03);
  padding-left: var(--space-xl);
}

.mobile-nav__footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--tavazo-cream-dark);
}

.mobile-nav__footer .top-bar__social {
  justify-content: center;
  gap: var(--space-md);
}

.mobile-nav__footer .top-bar__social a {
  color: var(--tavazo-teal);
  opacity: 1;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--tavazo-cream);
}

.mobile-nav__footer .top-bar__social a:hover {
  background: var(--tavazo-teal);
  color: var(--tavazo-white);
}

/* Mobile nav overlay/backdrop */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: calc(var(--z-overlay) - 1);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-nav-overlay--visible {
  opacity: 1;
  visibility: visible;
}


/* ═══════════════════════════════════════════════
   SEARCH OVERLAY
   ═══════════════════════════════════════════════ */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.search-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.search-overlay__inner {
  width: 100%;
  max-width: 700px;
  padding: var(--space-xl);
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.search-overlay--visible .search-overlay__inner {
  transform: translateY(0);
}

.search-overlay__input-wrapper {
  position: relative;
}

.search-overlay__input {
  width: 100%;
  padding: 20px 60px 20px 24px;
  font-size: var(--fs-xl);
  font-family: var(--font-heading);
  color: var(--tavazo-white);
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 2px solid var(--tavazo-gold);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  outline: none;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.search-overlay__input:focus {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(200, 164, 78, 0.3);
}

.search-overlay__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-overlay__submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--tavazo-gold);
  cursor: pointer;
  padding: 10px;
}

.search-overlay__submit svg {
  width: 24px;
  height: 24px;
}

.search-overlay__close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tavazo-white);
  font-size: var(--fs-2xl);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.search-overlay__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--tavazo-gold);
}


/* ═══════════════════════════════════════════════
   DROPDOWN MENU (for desktop nav)
   ═══════════════════════════════════════════════ */

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 220px;
  background: var(--tavazo-teal-darker);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  border-radius: 0;
  padding: var(--space-sm) 0;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  border-top: 2px solid var(--tavazo-gold);
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown__item a {
  display: block;
  padding: 10px var(--space-lg);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.dropdown__item a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--tavazo-gold);
  padding-left: var(--space-xl);
}


/* ═══════════════════════════════════════════════
   RESPONSIVE HEADER
   ═══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .header__nav-left,
  .header__nav-right {
    display: none;
  }

  /* Brand sits next to logo on mobile */
  .header__brand {
    position: static;
    transform: none;
    flex-direction: column;
    gap: 1px;
    margin-left: 10px;
    order: 1;
  }

  .header__logo { order: 0; }
  .header__actions { order: 2; }
  .header__hamburger { order: 3; }

  .header__brand-name { font-size: 18px; }
  .header__brand-tag { font-size: 8px; letter-spacing: 0.12em; }

  .header--scrolled .header__brand {
    opacity: 1;
    pointer-events: auto;
  }

  .header--scrolled .header__brand-tag { display: none; }

  .header__hamburger {
    display: flex;
  }

  .header__inner {
    display: flex;
    justify-content: space-between;
  }

  .header__logo {
    position: static;
  }

  .header__logo img {
    height: 46px;
  }

  .header__actions {
    position: static;
    transform: none;
    margin-left: auto;
    margin-right: var(--space-sm);
  }

  .header__ornament-line {
    height: 2px;
  }
}

@media (max-width: 768px) {
  .top-bar__left {
    display: none;
  }

  .top-bar__right {
    width: 100%;
    justify-content: center;
  }

  .header__logo img {
    height: 55px;
  }

  .header--scrolled .header__logo img {
    height: 45px;
  }
}

@media (max-width: 480px) {
  .top-bar {
    display: none;
  }

  .header__action-btn {
    width: 36px;
    height: 36px;
  }

  .header__action-btn svg {
    width: 20px;
    height: 20px;
  }
}
