/* =============================================
   FDI HEADER — custom-header.css
   ============================================= */

.fdi-header *,
.fdi-header *::before,
.fdi-header *::after {
  box-sizing: border-box;
}

:root {
  --fdi-purple:      #7b2fbe;
  --fdi-purple-dark: #5c1fa0;
  --fdi-purple-soft: #9b57d3;
  --fdi-purple-pale: #f5effc;
  --fdi-navy:        #35264a;
  --fdi-muted:       #5f5570;
  --fdi-border:      rgba(123, 47, 190, 0.12);
  --fdi-shadow:      0 8px 32px rgba(61, 26, 110, 0.08);
}

.fdi-container {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

/* ─── Header ─── */
.fdi-header {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: sticky;
  top: 0;
  z-index: 99999;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ─── Topbar ─── */
.fdi-topbar {
  background: var(--fdi-purple);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
}

.fdi-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding: 6px 0;
}

.fdi-topbar-text {
  margin: 0;
  opacity: 0.9;
}

.fdi-topbar-actions {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}

.fdi-topbar-actions a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s ease;
}

.fdi-topbar-actions a:hover { color: #fff; }

/* ─── Header main ─── */
.fdi-header-main {
  border-bottom: 1px solid var(--fdi-border);
  box-shadow: var(--fdi-shadow);
}

.fdi-header-main-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  min-height: 80px;
}

/* ─── Logo ─── */
.fdi-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.fdi-logo img {
  display: block;
  width: auto;
  max-height: 58px;
  transition: opacity 0.2s ease;
}

.fdi-logo:hover img { opacity: 0.85; }

/* ─── Nav desktop ─── */
.fdi-desktop-nav { display: flex; justify-content: center; }

.fdi-desktop-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.fdi-desktop-nav ul > li { position: relative; }

.fdi-desktop-nav ul > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--fdi-navy);
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.fdi-desktop-nav ul > li > a:hover,
.fdi-desktop-nav ul > li.fdi-has-dropdown:hover > a {
  background: var(--fdi-purple-pale);
  color: var(--fdi-purple);
}

.fdi-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.fdi-has-dropdown:hover .fdi-chevron {
  transform: rotate(180deg);
}

/* ─── Dropdown ─── */
.fdi-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: 300px;
  background: #fff;
  border: 1px solid var(--fdi-border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(61, 26, 110, 0.14);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 1000;
  display: block !important;
  flex-direction: unset !important;
  align-items: unset !important;
}

.fdi-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--fdi-border);
  border-top: 1px solid var(--fdi-border);
  rotate: 45deg;
}

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

.fdi-dropdown-inner {
  padding: 4px 4px 2px;
  display: block !important;
}

.fdi-dropdown-label {
  margin: 0 0 6px;
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fdi-muted);
}

.fdi-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.fdi-dropdown-list li {
  margin: 0;
  display: block !important;
  width: 100% !important;
}

.fdi-dropdown-list a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  text-decoration: none;
  color: var(--fdi-navy);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.fdi-dropdown-list a:hover {
  background: var(--fdi-purple-pale);
  color: var(--fdi-purple);
}

.fdi-dropdown-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

.fdi-dropdown-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 2px;
  padding: 10px;
  text-decoration: none;
  color: var(--fdi-purple);
  font-size: 13px;
  font-weight: 700;
  border-top: 1px solid var(--fdi-border);
  border-radius: 0 0 12px 12px;
  transition: background 0.2s ease;
}

.fdi-dropdown-all:hover { background: var(--fdi-purple-pale); }

/* ─── Actions ─── */
.fdi-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fdi-link-simple {
  text-decoration: none;
  color: var(--fdi-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.fdi-link-simple:hover {
  background: var(--fdi-purple-pale);
  color: var(--fdi-purple);
}

/* ─── Carrinho ─── */
.fdi-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--fdi-navy);
  border: 1px solid var(--fdi-border);
  background: #fff;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fdi-cart:hover {
  background: var(--fdi-purple-pale);
  color: var(--fdi-purple);
  border-color: rgba(123, 47, 190, 0.25);
  box-shadow: 0 4px 12px rgba(123, 47, 190, 0.1);
}

.fdi-cart-svg { display: block; flex-shrink: 0; }

.fdi-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  background: var(--fdi-purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.fdi-cart-count[data-count="0"] {
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

.fdi-cart-count.fdi-bounce {
  animation: fdiCartBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fdiCartBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ─── CTA ─── */
.fdi-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--fdi-purple) 0%, var(--fdi-purple-soft) 100%);
  box-shadow: 0 8px 20px rgba(123, 47, 190, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.fdi-button-primary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(123, 47, 190, 0.3);
}

/* ─── Mobile toggle ─── */
.fdi-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--fdi-border);
  background: #fff;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.fdi-mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fdi-navy);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.fdi-mobile-toggle.fdi-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fdi-mobile-toggle.fdi-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.fdi-mobile-toggle.fdi-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile panel ─── */
.fdi-mobile-panel {
  background: #fff;
  border-top: 1px solid var(--fdi-border);
  border-bottom: 1px solid var(--fdi-border);
  box-shadow: 0 18px 40px rgba(61, 26, 110, 0.07);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.fdi-mobile-panel.fdi-open { max-height: 700px; }

.fdi-mobile-panel-inner {
  width: calc(100% - 24px);
  margin: 0 auto;
  padding: 8px 0 20px;
}

.fdi-mobile-nav ul { list-style: none; margin: 0; padding: 0; }

.fdi-mobile-nav li { border-bottom: 1px solid rgba(123, 47, 190, 0.07); }
.fdi-mobile-nav li:last-child { border-bottom: 0; }

.fdi-mobile-nav a {
  display: block;
  padding: 13px 4px;
  text-decoration: none;
  color: var(--fdi-navy);
  font-weight: 600;
  font-size: 15px;
}

.fdi-mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fdi-navy);
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  text-align: left;
}

.fdi-mobile-sub-toggle svg { flex-shrink: 0; transition: transform 0.25s ease; }
.fdi-mobile-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.fdi-mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--fdi-purple-pale);
  border-radius: 10px;
  margin-bottom: 6px;
}

.fdi-mobile-submenu.fdi-sub-open { max-height: 600px; }

.fdi-mobile-submenu li { border-bottom: 1px solid rgba(123, 47, 190, 0.08) !important; }
.fdi-mobile-submenu li:last-child { border-bottom: 0 !important; }

.fdi-mobile-submenu a {
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--fdi-purple-dark) !important;
}

.fdi-mobile-cta { margin-top: 16px; }
.fdi-mobile-cta .fdi-button-primary { width: 100%; justify-content: center; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .fdi-desktop-nav,
  .fdi-link-simple,
  .fdi-header-actions .fdi-button-primary {
    display: none;
  }

  .fdi-mobile-toggle { display: inline-flex; }

  .fdi-header-main-inner {
    grid-template-columns: auto 1fr auto;
    min-height: 72px;
    gap: 16px;
  }

  .fdi-logo img { max-height: 50px; }
  .fdi-topbar-text { display: none; }
}

@media (max-width: 767px) {
  .fdi-container { width: calc(100% - 24px); }
  .fdi-header-main-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 68px;
    gap: 12px !important;
  }
  .fdi-logo {
    flex: 0 1 auto !important;
    min-width: 0 !important;
  }
  .fdi-logo img {
    max-height: 44px;
    max-width: 190px !important;
  }
  .fdi-header-actions {
    margin-left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
  }
  .fdi-cart,
  .fdi-mobile-toggle {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
  }
  .fdi-topbar-actions { display: none; }
  .fdi-topbar-inner { justify-content: center; }
  .fdi-topbar-text { display: block; text-align: center; font-size: 11.5px; }
}

/* ─── Correção mobile das páginas de síndromes ─── */
body.page-id-470,
body.page-id-471,
body.page-id-472,
body.page-id-473 {
  overflow-x: hidden !important;
}

body.page-id-470 .content-area,
body.page-id-470 .site-main,
body.page-id-470 .entry-content,
body.page-id-470 .content-container,
body.page-id-470 .kt-row-column-wrap,
body.page-id-471 .content-area,
body.page-id-471 .site-main,
body.page-id-471 .entry-content,
body.page-id-471 .content-container,
body.page-id-471 .kt-row-column-wrap,
body.page-id-472 .content-area,
body.page-id-472 .site-main,
body.page-id-472 .entry-content,
body.page-id-472 .content-container,
body.page-id-472 .kt-row-column-wrap,
body.page-id-473 .content-area,
body.page-id-473 .site-main,
body.page-id-473 .entry-content,
body.page-id-473 .content-container,
body.page-id-473 .kt-row-column-wrap {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow-x: hidden !important;
}

body.page-id-470 .fi-inner,
body.page-id-471 .fi-inner,
body.page-id-472 .fi-inner,
body.page-id-473 .fi-inner {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  overflow-x: hidden !important;
}

body.page-id-470 .fi-inner .hero,
body.page-id-471 .fi-inner .hero,
body.page-id-472 .fi-inner .hero,
body.page-id-473 .fi-inner .hero {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 767px) {
  body.page-id-470 .fi-inner .wrap,
  body.page-id-471 .fi-inner .wrap,
  body.page-id-472 .fi-inner .wrap,
  body.page-id-473 .fi-inner .wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  body.page-id-470 .fi-inner .hero,
  body.page-id-471 .fi-inner .hero,
  body.page-id-472 .fi-inner .hero,
  body.page-id-473 .fi-inner .hero {
    padding-top: 70px !important;
    padding-bottom: 64px !important;
    text-align: center !important;
  }

  body.page-id-470 .fi-inner h1,
  body.page-id-471 .fi-inner h1,
  body.page-id-472 .fi-inner h1,
  body.page-id-473 .fi-inner h1 {
    font-size: 38px !important;
    line-height: 1.06 !important;
  }

  body.page-id-470 .fi-inner .hero p,
  body.page-id-471 .fi-inner .hero p,
  body.page-id-472 .fi-inner .hero p,
  body.page-id-473 .fi-inner .hero p {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }

  body.page-id-470 .fi-inner .btn,
  body.page-id-471 .fi-inner .btn,
  body.page-id-472 .fi-inner .btn,
  body.page-id-473 .fi-inner .btn {
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }
}