/**
 * Header global Animacase – componente único para home, produto, carrinho e checkout.
 * Referência: header da página inicial (home).
 */
:root {
  --header-brand-blue: #043684;
}

/* ========== HEADER FIXO (cronômetro + header + busca) ========== */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* 1. Barra de promoção – 3 frases em rotação */
.header-promo {
  height: 32px;
  padding: 0 12px;
  background: linear-gradient(90deg, #043684 0%, #0a4da3 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  overflow: hidden;
  position: relative;
}

.header-promo__slides {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 32px;
  overflow: hidden;
}

.header-promo__track {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease;
  will-change: transform;
}

.header-promo__slide {
  flex: 0 0 32px;
  height: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.header-promo__icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.header-promo__icon--svg svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

.header-promo__text {
  color: #fff;
}

.header-promo__timer {
  font-weight: 600;
}

/* 2. Header principal – 56px */
.header {
  background: #fff;
  min-height: 56px;
}

/* .container pode ser usado também por outras seções da página */
.header-sticky .container,
.header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.header__container {
  padding: 0 16px;
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  min-height: 56px;
}

.header__nav-left,
.header__nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header__nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.header__item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.header__item--hamburger {
  padding: 8px;
}

.header__item--logo {
  /* centralizado via .header__nav-center */
}

.header__item--icon {
  padding: 8px;
}

/* Hamburger icon (3 linhas) */
.icon-hamburger {
  width: 24px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.icon-hamburger__lines {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
  box-shadow: 0 6px 0 #1a1a1a, 0 12px 0 #1a1a1a;
}

.logo__wrapper {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo__wrapper .logo {
  width: 88px;
  height: auto;
  color: var(--header-brand-blue);
}

.logo__wrapper .logo--img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .logo__wrapper .logo--img {
    max-height: 64px;
  }
}

.logo__wrapper h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.cart-widget svg,
.user-widget__icon svg {
  width: 24px;
  height: 24px;
  color: #1a1a1a;
}

.user-widget__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

/* Ícone de login oculto temporariamente – reativar depois */
.header .user-widget__icon {
  display: none !important;
}

.desktop-only {
  display: none;
}

@media (min-width: 992px) {
  .desktop-only {
    display: flex;
  }
  .mobile-only {
    display: none !important;
  }
}

.mobile-only {
  display: flex;
}

/* 3. Barra de busca – abaixo do header; some no scroll */
.header__search {
  width: 100%;
  max-height: 80px;
  padding-bottom: 10px;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
}

.header-sticky.is-scrolled .header__search {
  max-height: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.header__search .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 24px;
  padding: 10px 16px 10px 18px;
  width: 100%;
  gap: 8px;
}

.header__search .search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: #1a1a1a;
  outline: none;
}

.header__search .search-input::placeholder {
  color: #888;
}

.header__search .search-icon {
  width: 20px;
  height: 20px;
  color: #666;
  flex-shrink: 0;
}
