/* ============================================
   NATURALIE GLASSMORPHISM HEADER v1.4.0
   ============================================ */

:root {
  --nmm-glass-primary: #468664;
  --nmm-glass-primary-light: #deece4;
  --nmm-glass-primary-dark: #357a52;
  --nmm-glass-cream: #FAF9F6;
  --nmm-glass-white: #ffffff;
  --nmm-glass-text: #1a1a1a;
  --nmm-glass-text-muted: #666666;
  --nmm-glass-border: rgba(0, 0, 0, 0.06);
  --nmm-glass-shadow: 0 12px 48px rgba(70, 134, 100, 0.12);
  --nmm-glass-radius: 20px;
  --nmm-glass-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */

.nmm-announcement-bar {
  background: linear-gradient(90deg, var(--nmm-glass-primary-dark), var(--nmm-glass-primary));
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1001;
}

.nmm-announcement-inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* ============================================
   GLASS HEADER
   ============================================ */

.nmm-glass-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nmm-glass-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nmm-glass-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nmm-glass-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: height 0.35s ease;
}

.nmm-glass-header.scrolled .nmm-glass-header-inner {
  height: 60px;
}

/* ============================================
   LOGO
   ============================================ */

.nmm-glass-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  transition: transform 0.3s ease;
}

.nmm-glass-logo:hover {
  transform: scale(1.02);
}

.nmm-glass-logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--nmm-glass-primary), var(--nmm-glass-primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  font-family: 'Playfair Display', Georgia, serif;
  flex-shrink: 0;
}

.nmm-glass-logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--nmm-glass-text);
  letter-spacing: -0.5px;
}

.nmm-glass-logo-img {
  max-height: 40px;
  width: auto;
  display: block;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nmm-glass-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nmm-glass-nav-trigger {
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nmm-glass-text);
  text-decoration: none !important;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

.nmm-glass-nav-trigger:hover {
  background: var(--nmm-glass-primary-light);
  color: var(--nmm-glass-primary-dark);
}

.nmm-glass-nav-trigger.active {
  background: var(--nmm-glass-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(70, 134, 100, 0.3);
}

/* ============================================
   ICONS
   ============================================ */

.nmm-glass-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nmm-glass-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nmm-glass-text);
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none !important;
}

.nmm-glass-icon-btn:hover {
  background: var(--nmm-glass-primary-light);
  color: var(--nmm-glass-primary);
}

.nmm-glass-icon-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nmm-glass-cart .nmm-glass-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--nmm-glass-primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: nmm-badge-in 0.3s ease;
}

@keyframes nmm-badge-in {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.nmm-mobile-trigger {
  display: none;
}

/* ============================================
   MEGAMENU OVERLAY (Desktop)
   ============================================ */

.nmm-glass-megamenu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 999;
  pointer-events: none;
}

.nmm-glass-megamenu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nmm-glass-megamenu-panel {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  max-width: 1100px;
  width: calc(100% - 64px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nmm-glass-megamenu-overlay.active .nmm-glass-megamenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Hide the mobile trigger from the original shortcode inside the panel */
.nmm-glass-megamenu-panel .nmm-mobile-trigger {
  display: none !important;
}

/* Adjust desktop panel inside glass */
.nmm-glass-megamenu-panel .nmm-desktop {
  display: block;
}

.nmm-glass-megamenu-panel .nmm-panel {
  box-shadow: var(--nmm-glass-shadow), 0 4px 16px rgba(0, 0, 0, 0.06);
  border-radius: var(--nmm-glass-radius);
  border: 1px solid var(--nmm-glass-border);
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */

.nmm-glass-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 24px 32px;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nmm-glass-search-overlay.active {
  transform: translateY(0);
}

.nmm-glass-search-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nmm-glass-search-form {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.nmm-glass-search-input {
  width: 100%;
  padding: 18px 56px 18px 24px;
  border: 2px solid var(--nmm-glass-border);
  border-radius: 16px;
  font-size: 17px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.nmm-glass-search-input:focus {
  border-color: var(--nmm-glass-primary);
  box-shadow: 0 0 0 4px rgba(70, 134, 100, 0.1);
}

.nmm-glass-search-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nmm-glass-primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease;
}

.nmm-glass-search-submit:hover {
  background: var(--nmm-glass-primary-dark);
}

.nmm-glass-search-submit svg {
  width: 20px;
  height: 20px;
}

.nmm-glass-search-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 2px solid var(--nmm-glass-border);
  cursor: pointer;
  color: var(--nmm-glass-text);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.nmm-glass-search-close:hover {
  background: var(--nmm-glass-primary-light);
  border-color: var(--nmm-glass-primary);
  color: var(--nmm-glass-primary);
  transform: rotate(90deg);
}

.nmm-glass-search-close svg {
  width: 22px;
  height: 22px;
}

/* ============================================
   MOBILE BREAKPOINT
   ============================================ */

@media (max-width: 768px) {
  .nmm-announcement-bar {
    font-size: 11px;
    padding: 8px 16px;
  }

  .nmm-glass-header-inner {
    padding: 0 20px;
    height: 60px;
  }

  .nmm-glass-nav {
    display: none;
  }

  .nmm-mobile-trigger {
    display: inline-flex;
  }

  .nmm-glass-logo-text {
    font-size: 20px;
  }

  .nmm-glass-logo-mark {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .nmm-glass-logo-img {
    max-height: 36px;
  }

  /* Megamenu panel on mobile */
  .nmm-glass-megamenu-panel {
    width: 100%;
    left: 0;
    transform: translateX(0) translateY(-12px);
    top: 60px;
    border-radius: 0 0 20px 20px;
  }

  .nmm-glass-megamenu-overlay.active .nmm-glass-megamenu-panel {
    transform: translateX(0) translateY(0);
  }

  .nmm-glass-megamenu-panel .nmm-panel {
    border-radius: 0 0 20px 20px;
    max-width: 100%;
  }

  .nmm-glass-megamenu-panel .nmm-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .nmm-glass-megamenu-panel .nmm-categories {
    width: 160px;
  }

  /* Search overlay mobile */
  .nmm-glass-search-overlay {
    padding: 16px 20px;
  }

  .nmm-glass-search-input {
    font-size: 16px;
    padding: 14px 48px 14px 16px;
  }

  .nmm-glass-search-close {
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   BRICKS COMPATIBILITY
   ============================================ */

/* Hide Bricks default header when our header is present */
.brxe-section:has(~ .nmm-glass-header-wrapper) {
  display: none !important;
}

/* Ensure our header stays on top of Bricks elements */
.nmm-glass-header-wrapper {
  position: relative;
  z-index: 9999;
}
