/* ==========================================================================
   Fortmix Floating Header
   - Início: sem fundo (transparente), integrado ao hero 100vh
   - Ao rolar: fundo translúcido (glassmorphism), borda e sombra aparecem
   - Design flutuante com cantos arredondados, não ocupa 100vw
   ========================================================================== */

.topbar {
  display: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 24px;
  background: transparent;
  border: 0;
  pointer-events: none;
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header .header-inner {
  width: 100%;
  max-width: 1360px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  pointer-events: auto;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s ease;
}

/* Estado rolado: fundo aparece com efeito vidro e sombra suave */
.header.header-scrolled {
  padding: 10px 24px;
}

.header.header-scrolled .header-inner {
  background: rgba(250, 250, 246, 0.9);
  border-color: rgba(35, 35, 27, 0.09);
  box-shadow: 0 10px 30px -5px rgba(25, 27, 26, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Marca / Logo */
.header .brand {
  width: 155px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 0;
  padding: 0;
}

.header .brand img {
  width: 155px;
  height: 44px;
  object-fit: contain;
}

/* Navegação Principal */
.header nav {
  position: static;
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  margin-right: 12px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

.header nav a {
  padding: 8px 0;
  white-space: nowrap;
  color: #55564e;
  position: relative;
  transition: color 0.2s ease;
}

.header nav a:hover {
  color: #191b1a;
}

.header nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff8617;
  border-radius: 2px;
  transition: width 0.25s ease;
}

.header nav a:hover:after {
  width: 100%;
}

.header nav a[href$='#beneficios'] {
  color: #191b1a;
  display: flex;
  align-items: center;
  gap: 7px;
}

.header nav a[href$='#beneficios']:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ed7200;
}

/* Ações do Header (Área do Cliente + Botão Onde Encontrar) */
.header .header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-left: 0;
}

.header .header-club-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  background: #191b1a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header .header-club-btn:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
  border-color: #ff8617;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 14px rgba(255, 134, 23, 0.35);
}

.header .header-club-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header .header-club-btn .header-club-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff8617;
  flex-shrink: 0;
}

.header .header-club-btn .header-club-icon .icon {
  width: 15px;
  height: 15px;
}

.header .header-club-btn .header-club-text {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
}

.header .header-club-btn .header-club-logo {
  height: 14px;
  width: auto;
  max-width: 118px;
  display: block;
  object-fit: contain;
  vertical-align: middle;
}

.header .nav-cta {
  background: #ff8617;
  color: #191b1a;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(179, 80, 0, 0.15);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.header .nav-cta:hover {
  background: #ff9c41;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(179, 80, 0, 0.22);
}

.header .nav-cta .icon {
  width: 17px;
  height: 17px;
}

.header .menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(35, 35, 27, 0.15);
  border-radius: 10px;
  background: rgba(250, 250, 246, 0.7);
  color: #191b1a;
  cursor: pointer;
}

.header a:focus-visible,
.header button:focus-visible {
  outline: 2px solid #a74900;
  outline-offset: 4px;
}

/* Header em páginas de produto */
body.product-page {
  padding-top: 96px;
}

body.product-page .header .header-inner {
  background: rgba(250, 250, 246, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(35, 35, 27, 0.08);
  box-shadow: 0 8px 25px rgba(25, 27, 26, 0.06);
}

/* Responsividade */
@media (max-width: 1200px) {
  .header .header-inner {
    gap: 20px;
    padding-inline: 20px;
  }
  .header .brand {
    width: 138px;
  }
  .header .brand img {
    width: 138px;
  }
  .header nav {
    gap: 18px;
    font-size: 13px;
  }
  .header .header-actions {
    gap: 12px;
  }
  .header .header-club-btn {
    padding: 8px 12px;
    min-height: 40px;
    gap: 6px;
  }
  .header .header-club-btn .header-club-text {
    display: none;
  }
  .header .header-club-btn .header-club-logo {
    height: 13px;
    max-width: 105px;
  }
}

@media (max-width: 1000px) {
  .header {
    padding: 10px 16px;
  }
  .header.header-scrolled {
    padding: 8px 16px;
  }
  .header .header-inner {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
    width: 100%;
  }
  .header .header-actions {
    margin-left: auto;
  }
  .header .menu-toggle {
    display: flex;
  }
  .header nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px) !important;
    left: 16px;
    right: 16px;
    margin: 0;
    padding: 14px;
    background: #fafaf6;
    border: 1px solid rgba(37, 37, 28, 0.12);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(25, 27, 26, 0.15);
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    pointer-events: auto;
  }
  .header nav.open {
    display: flex;
  }
  .header nav a {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
  }
  .header nav a:hover {
    background: #eee;
  }
  .header nav a:after {
    display: none;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 8px 12px;
  }
  .header.header-scrolled {
    padding: 6px 12px;
  }
  .header .header-inner {
    height: 58px;
    border-radius: 14px;
    padding: 0 12px;
    gap: 8px;
  }
  .header .brand,
  .header .brand img {
    width: 108px;
    height: 34px;
  }
  .header .header-actions {
    gap: 6px;
  }
  .header .header-club-btn {
    padding: 6px 10px;
    min-height: 36px;
    border-radius: 8px;
    gap: 5px;
  }
  .header .header-club-btn .header-club-text {
    display: none;
  }
  .header .header-club-btn .header-club-logo {
    height: 12px;
    max-width: 90px;
  }
  .header .header-club-btn .header-club-icon .icon {
    width: 13px;
    height: 13px;
  }
  .header .nav-cta {
    font-size: 11px;
    padding: 8px 12px;
    min-height: 36px;
    border-radius: 8px;
    gap: 4px;
  }
  .header .nav-cta .icon {
    display: none;
  }
  .header .menu-toggle {
    width: 34px;
    height: 34px;
  }
  .header nav {
    left: 12px;
    right: 12px;
  }
}

@media (max-width: 360px) {
  .header .header-inner {
    padding-inline: 8px;
    gap: 4px;
  }
  .header .brand,
  .header .brand img {
    width: 95px;
  }
  .header .nav-cta {
    font-size: 10px;
    padding: 7px 9px;
  }
}

@media (min-width: 1001px) {
  .header .menu-toggle {
    display: none;
  }
}

/* Cabeçalho das páginas internas, alinhado ao conteúdo. */
body.product-page{padding-top:0}
body.product-page .header{position:sticky;top:0;padding:0;background:#fff;border-bottom:1px solid #e5e5df;pointer-events:auto}
body.product-page .header .header-inner{width:min(var(--container),calc(100% - 100px));max-width:none;height:88px;padding:0;gap:28px;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
body.product-page .header .brand,body.product-page .header .brand img{width:170px;height:auto}
body.product-page .header nav{margin:0 auto;gap:24px}
body.product-page .header .nav-cta{border-radius:4px;box-shadow:none;min-height:44px}
body.product-page .back-link>.icon{transform:rotate(180deg)}
@media(max-width:1200px){body.product-page .header .header-inner{gap:20px}body.product-page .header nav{gap:16px}body.product-page .header .brand,body.product-page .header .brand img{width:145px}}
@media(max-width:1000px){body.product-page .header .header-inner{width:calc(100% - 64px);height:76px;gap:12px}body.product-page .header nav{margin:0;gap:2px;left:32px;right:32px}body.product-page .header .header-actions{margin-left:auto}}
@media(max-width:600px){body.product-page .header .header-inner{width:calc(100% - 40px);height:68px;gap:8px}body.product-page .header .brand,body.product-page .header .brand img{width:115px}body.product-page .header nav{left:20px;right:20px}body.product-page .header .header-club-btn{display:none}body.product-page .header .nav-cta{padding:8px 10px;min-height:38px}}
/* Keep the Club and navigation accessible on narrow screens. */
.header .header-club-btn { text-decoration: none; }
@media (max-width: 600px) {
  .header .nav-cta { display: none; }
  .header .header-actions { min-width: 0; }
  .header .menu-toggle { flex-shrink: 0; width: 44px; height: 44px; }
}
