/* ============================================================
   css/navbar.css
   Loaded in every page <head> — guarantees styles are available
   before the navbar component is injected via components.js.
   ============================================================ */

/* ── Nav pill ── */
#main-nav {
  transition: none;
}

/* ── Mega menu panels ── */
.mega-menu {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  padding: 0 1rem;
  z-index: 50;
}

.mega-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6B7280;
  border-radius: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.mega-item-btn:hover,
.mega-item-btn.is-active {
  background: #ffffff;
  color: #1A1A1A;
}

.mega-chevron {
  font-size: 1.1rem;
  line-height: 1;
  color: #9CA3AF;
  flex-shrink: 0;
}

.mega-prod-link {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: #2E59BD;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.mega-prod-link:hover {
  opacity: 0.65;
}

/* ── Section label (used in mega menu panels) ── */
.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2E59BD;
  font-weight: 500;
}

/* ── Nav logo ── */
#nav-logo {
  transition: filter 0.3s ease;
}

/* ── Mobile menu overlay ── */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #F5F5F2;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

#mobile-menu.open {
  transform: translateX(0);
}

.mob-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}

.mob-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1A1A1A;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 0;
}

.mob-row {
  border-top: 1px solid #D4D0C8;
  padding: 0 1.5rem;
}

.mob-row:last-of-type {
  border-bottom: 1px solid #D4D0C8;
}

.mob-link {
  display: flex;
  align-items: baseline;
  width: 100%;
  padding: 1rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1A1A1A;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: left;
}

.mob-count {
  font-size: 0.85rem;
  font-weight: 400;
  color: #6B7280;
  margin-left: 0.4rem;
  letter-spacing: 0;
}

.mob-toggle {
  margin-left: auto;
  font-size: 1.4rem;
  font-weight: 300;
  color: #1A1A1A;
  line-height: 1;
  flex-shrink: 0;
  padding-left: 1rem;
}

.mob-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mob-sub.open {
  max-height: 500px;
}

.mob-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
  padding: 0.25rem 0 0.75rem;
}

.mob-sub-link {
  display: block;
  padding: 0.4rem 0;
  font-size: 1rem;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mob-sub-link:hover {
  color: #1A1A1A;
}

.mob-sub-divider {
  height: 1px;
  background: #D4D0C8;
  margin: 0.5rem 0;
}

.mob-sub-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2E59BD;
  text-decoration: none;
  width: 100%;
}

.mob-footer {
  padding: 2rem 1.5rem 3rem;
  flex-shrink: 0;
  border-top: 1px solid #D4D0C8;
  margin-top: auto;
}

body.menu-open {
  overflow: hidden;
}

body.wa-chat-open {
  overflow: hidden;
}

.wa-chat-modal[hidden] {
  display: none;
}

.wa-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.wa-chat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.42);
  backdrop-filter: blur(6px);
}

.wa-chat-panel {
  position: relative;
  width: min(100%, 430px);
  background: #ffffff;
  border: 1px solid #D4D0C8;
  border-radius: 0.5rem;
  box-shadow: 0 24px 70px rgba(26, 26, 26, 0.18);
  padding: 1.5rem;
}

.wa-chat-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  background: #F5F5F2;
  border: 1px solid #E5E1D8;
  border-radius: 999px;
  cursor: pointer;
}

.wa-chat-close:hover {
  color: #1A1A1A;
  background: #ffffff;
}

.wa-chat-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #25A85A;
}

.wa-chat-panel h2 {
  margin: 0 2.5rem 1.25rem 0;
  color: #1A1A1A;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

#wa-chat-form {
  display: grid;
  gap: 0.9rem;
}

#wa-chat-form label {
  display: grid;
  gap: 0.35rem;
  color: #1A1A1A;
  font-size: 0.82rem;
  font-weight: 600;
}

#wa-chat-form input,
#wa-chat-form textarea {
  width: 100%;
  border: 1px solid #D4D0C8;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #1A1A1A;
  font: inherit;
  font-weight: 400;
  padding: 0.72rem 0.8rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wa-chat-form textarea {
  resize: vertical;
  min-height: 7rem;
}

#wa-chat-form input:focus,
#wa-chat-form textarea:focus {
  border-color: #25A85A;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.16);
}

.wa-chat-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.wa-chat-feedback {
  min-height: 1.15rem;
  margin: -0.1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #6B7280;
}

.wa-chat-feedback.is-info {
  color: #2E59BD;
}

.wa-chat-feedback.is-success {
  color: #168044;
}

.wa-chat-feedback.is-error {
  color: #B42318;
}

.wa-chat-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: #1A1A1A;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.wa-chat-submit:hover {
  background: #25A85A;
}

.wa-chat-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

@media (max-width: 640px) {
  .wa-chat-modal {
    align-items: end;
    padding: 0;
  }

  .wa-chat-panel {
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 1.25rem;
  }
}
