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

/* ========== HEADER FIXO (cronômetro + header + busca) ========== */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-brand-blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 1. Barra superior de urgência */
.header-promo {
  width: 100%;
  background: #f3f4f6;
  color: #374151;
  text-align: center;
  font-size: 12.5px;
  padding: 6px 10px;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  position: relative;
}

.top-bar {
  white-space: nowrap;
  text-wrap: nowrap;
}

.free-text {
  color: #16a34a;
  font-weight: 600;
}

.full-badge {
  height: 12px;
  width: auto;
  display: inline-block;
  vertical-align: -1px;
  margin: 0 4px;
}

.urgency {
  color: #111827;
  font-weight: 600;
}

#countdown {
  font-weight: 500;
  color: #111827;
  margin-left: 4px;
}

@media (max-width: 480px) {
  .header-promo {
    font-size: 12px;
    padding: 6px 6px;
  }
}

/* 2. Header principal – 56px */
.header {
  background: var(--header-brand-blue);
  min-height: 64px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* .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: 64px;
}

.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: #fff;
  border-radius: 1px;
  box-shadow: 0 6px 0 #fff, 0 12px 0 #fff;
}

.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: #fff;
}

.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: 0;
  overflow: visible;
  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;
}

/* Faixa fina colorida logo abaixo da busca */
.header__gradient-bar {
  height: 4px;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  margin-left: 0;
  padding: 0;
  display: block;
  background: linear-gradient(
    90deg,
    #00c6ff,
    #0072ff,
    #6a00ff,
    #ff00cc,
    #ff7a00,
    #ffd500
  );
  flex-shrink: 0;
}

.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;
}
