/* ==========================================================================
   InstaPlace — Store UI (navbar moderno das páginas de loja)
   Carregado em app/views/layouts/user.php para TODAS as páginas de loja
   (serviços, faq, contato, cliente, checkout).
   Usa a classe .ip-header (não .header) para não herdar o estilo antigo.
   Bootstrap 4 — collapse/dropdown via data-toggle/data-target.
   ========================================================================== */

:root {
  --ip-primary: #7C3AED;
  --ip-secondary: #EC4899;
  --ip-grad: linear-gradient(120deg, #7C3AED 0%, #EC4899 100%);
  --ip-ink: #161425;
  --ip-muted: #6B7280;
  --ip-header-h: 64px;
}

/* ---------- Header / barra ---------- */
.ip-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 14px rgba(22, 20, 37, 0.07);
  border-bottom: 1px solid #f0eef8;
}
.ip-header .ip-nav {
  display: flex;
  align-items: center;
  min-height: var(--ip-header-h);
}
.ip-header .navbar {
  width: 100%;
  padding: 0;
  flex-wrap: nowrap;
}
.ip-header .navbar-brand {
  padding: 0;
  margin-right: 12px;
  display: flex;
  align-items: center;
}
.ip-header .navbar-brand img.site-logo {
  height: 38px;
  width: auto;
  max-width: 160px;
}

/* ---------- Links ---------- */
.ip-header .navbar-nav { align-items: center; }
.ip-header .navbar-nav .nav-item { padding: 0; }
.ip-header .navbar-nav .nav-link {
  position: relative;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ip-ink);
  background: transparent;
  transition: color .18s ease;
  white-space: nowrap;
}
.ip-header .navbar-nav .nav-link:hover { color: var(--ip-primary); }
.ip-header .navbar-nav .nav-item.active > .nav-link { color: var(--ip-primary); }
@media (min-width: 992px) {
  .ip-header .navbar-nav .nav-item.active > .nav-link::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--ip-grad);
  }
}

/* ---------- Dropdown "Serviços" (mega) ---------- */
.ip-header .nav-item.dropdown .nav-link.dropdown-toggle { cursor: pointer; }
.ip-header .ip-mega {
  display: none;                 /* BS4 alterna .show ao clicar */
  border: none;
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
  box-shadow: 0 14px 40px rgba(22, 20, 37, 0.16);
  background: #fff;
}
.ip-header .ip-mega.show { display: block; }
@media (min-width: 992px) {
  .ip-header .ip-mega {
    min-width: 460px;
    grid-template-columns: 1fr 1fr;
    gap: 6px 18px;
  }
  .ip-header .ip-mega.show { display: grid; }
}
.ip-header .ip-mega-group { padding: 4px; }
.ip-header .ip-mega-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ip-primary);
  padding: 6px 10px 8px;
  border-bottom: 1px solid #f0eef8;
  margin-bottom: 4px;
}
.ip-header .ip-mega .dropdown-item {
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
  color: #3f3f46;
  white-space: normal;
}
.ip-header .ip-mega .dropdown-item:hover {
  background: #f7f5ff;
  color: var(--ip-primary);
}

/* ---------- CTA + selo ---------- */
.ip-header .ip-nav-actions {
  display: none;            /* visibilidade controlada por media query (nao depende de .d-lg-flex) */
  align-items: center;
  gap: 14px;
  margin-left: 18px;
}
.ip-header .ip-nav-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #16a34a;
  white-space: nowrap;
}
.ip-header .ip-nav-trust i { font-size: 14px; }
.ip-header .ip-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ip-grad);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.30);
  transition: filter .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.ip-header .ip-nav-cta:hover { filter: brightness(1.07); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.40); }
.ip-header .ip-nav-cta:active { transform: translateY(1px); }

/* CTA persistente no mobile (fora do collapse) */
.ip-header .ip-nav-cta-mobile {
  margin-left: auto;
  margin-right: 10px;
  padding: 9px 16px;
  font-size: 13px;
}

/* ---------- Hambúrguer ---------- */
.ip-header .navbar-toggler {
  order: 3;
  border: none;
  background: transparent;
  padding: 8px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ip-header .navbar-toggler:focus { outline: none; box-shadow: none; }
.ip-header .ip-burger {
  position: relative;
  display: block;
  width: 24px; height: 16px;
}
.ip-header .ip-burger span {
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--ip-ink);
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.ip-header .ip-burger span:nth-child(1) { top: 0; }
.ip-header .ip-burger span:nth-child(2) { top: 7px; }
.ip-header .ip-burger span:nth-child(3) { top: 14px; }
.ip-header .navbar-toggler[aria-expanded="true"] .ip-burger span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.ip-header .navbar-toggler[aria-expanded="true"] .ip-burger span:nth-child(2) { opacity: 0; }
.ip-header .navbar-toggler[aria-expanded="true"] .ip-burger span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* ---------- Mobile (< 992px) ---------- */
@media (max-width: 991.98px) {
  .ip-header .navbar-collapse {
    position: absolute;
    top: var(--ip-header-h);
    left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #f0eef8;
    box-shadow: 0 16px 30px rgba(22, 20, 37, 0.12);
    padding: 8px 16px 18px;
    max-height: calc(100vh - var(--ip-header-h));
    overflow-y: auto;
  }
  .ip-header .navbar-nav { align-items: stretch; }
  .ip-header .navbar-nav .nav-link {
    padding: 13px 6px;
    font-size: 16px;
    border-bottom: 1px solid #f4f2fb;
  }
  .ip-header .navbar-nav .nav-item.active > .nav-link::after { display: none; }
  .ip-header .ip-mega {
    box-shadow: none;
    padding: 4px 0 8px;
    margin-top: 0;
  }
  .ip-header .ip-mega-title { padding-left: 6px; }
  .ip-header .ip-nav-actions {
    margin: 14px 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ip-header .ip-nav-actions .ip-nav-cta { width: 100%; padding: 14px; font-size: 15px; }
  .ip-header .ip-nav-trust { justify-content: center; }
}
@media (min-width: 992px) {
  .ip-header .ip-nav-cta-mobile { display: none !important; }
  .ip-header .ip-nav-actions { display: flex; }
}

/* ---------- Override categoria Instagram (roxo -> rosa) ---------- */
body.instagram-category .ip-header .navbar-nav .nav-item.active > .nav-link { color: #b84192; }
body.instagram-category .ip-header .navbar-nav .nav-link:hover { color: #b84192; }
body.instagram-category .ip-header .navbar-nav .nav-item.active > .nav-link::after,
body.instagram-category .ip-header .ip-nav-cta {
  background: linear-gradient(120deg, #b84192 0%, #d152f1 100%);
}
body.instagram-category .ip-header .ip-nav-cta { box-shadow: 0 4px 14px rgba(184, 65, 146, 0.30); }
body.instagram-category .ip-header .ip-mega-title,
body.instagram-category .ip-header .ip-mega .dropdown-item:hover { color: #b84192; }
body.instagram-category .ip-header .ip-mega .dropdown-item:hover { background: #fdf2fa; }

/* ---------- WhatsApp flutuante (FAB) ---------- */
.ip-whatsapp-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1090;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ip-whatsapp-fab:hover,
.ip-whatsapp-fab:focus { color: #fff; transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 22px rgba(37, 211, 102, 0.55); }
@media (max-width: 767px) {
  .ip-whatsapp-fab { width: 50px; height: 50px; font-size: 26px; right: 14px; bottom: 14px; }
}

/* ---------- Breadcrumb (responsivo, usado no header_top e na pagina de pacotes) ---------- */
.ip-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--ip-muted);
  line-height: 1.4;
}
.ip-breadcrumb a {
  color: var(--ip-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color .15s ease;
}
.ip-breadcrumb a:hover { color: var(--ip-primary); }
.ip-breadcrumb .ip-bc-sep { color: #c9c4dd; }
.ip-breadcrumb .ip-bc-current { color: var(--ip-ink); font-weight: 600; }
/* Variante usada nas páginas com header fixo simples (header_top): respiro do topo */
.ip-breadcrumb-bar {
  background: #faf9ff;
  border-bottom: 1px solid #efedf8;
  padding: 10px 0;
  margin-top: 64px;
}
body.instagram-category .ip-breadcrumb a:hover { color: #b84192; }
