/* =============================================
   NAVBAR
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  z-index: var(--z-navbar);
  transition: var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.navbar__logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.navbar__logo img:first-child {
  padding-right: 12px;
  border-right: 1px solid rgba(0,0,0,0.1);
}

/* Nav Links */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 35px;
}

.navbar__links > li { position: relative; }

.navbar__links a {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--gold);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
}

/* Mega Dropdown */
.navbar__dropdown { position: relative; }

.navbar__dropdown > a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.navbar__dropdown-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.3s ease;
  margin-top: 1px;
}

.navbar__dropdown.open .navbar__dropdown-arrow {
  transform: rotate(180deg);
}

.navbar__mega-menu {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--white);
  min-width: 600px;
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
  padding: 28px 32px 24px;
  pointer-events: none;
}

/* Invisible bridge - can be removed if hover is disabled, but keeping for safety if needed later */
.navbar__mega-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 10%;
  width: 80%;
  height: 8px;
}

.navbar__dropdown.open .navbar__mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0s;
  pointer-events: auto;
}

.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mega-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mega-menu__item::after { display: none !important; }

.mega-menu__item:hover {
  background: var(--cream);
}

.mega-menu__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--gold);
}

.mega-menu__icon svg {
  width: 100%;
  height: 100%;
}

.mega-menu__text h4 {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  margin-bottom: 2px;
  line-height: 1.3;
}

.mega-menu__text p {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.mega-menu__footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-light);
  text-align: center;
}

.mega-menu__footer a {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mega-menu__footer a::after { display: none !important; }

/* Nav CTA */
.navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.navbar__cta .btn {
  height: 38px;
  padding: 0 20px;
  font-size: 12px;
}

.navbar__whatsapp-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.navbar__whatsapp-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}

.navbar__whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: calc(var(--z-navbar) + 2);
  position: relative;
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition-base);
  transform-origin: center;
}

.hamburger.active .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--charcoal-dark);
  z-index: calc(var(--z-navbar) + 50); /* High above everything */
  display: flex;
  flex-direction: column;
  padding: 100px 40px 40px;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
}

.mobile-nav.open {
  right: 0;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10000;
  padding: 0;
}

.mobile-nav__close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.mobile-nav__close:hover,
.mobile-nav__close:active {
  background: var(--gold);
  color: var(--white);
  transform: scale(1.05);
}


.mobile-nav__links {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mobile-nav__links a {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.mobile-nav__links a:hover,
.mobile-nav__links a.active {
  color: var(--gold);
}

/* Mobile Products accordion */
.mobile-nav__accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
}

.mobile-nav__accordion-toggle .arrow {
  transition: transform 0.3s ease;
  color: var(--gold);
}

.mobile-nav__accordion-toggle.open .arrow {
  transform: rotate(180deg);
}

.mobile-nav__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  display: flex !important; /* force vertical stacking */
  flex-direction: column !important;
}

.mobile-nav__sub.open {
  max-height: 500px;
}

.mobile-nav__sub a {
  font-size: 16px !important;
  padding: 14px 0 14px 24px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.mobile-nav__sub a:hover {
  color: var(--gold) !important;
}

.mobile-nav__cta {
  padding-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav__cta .btn { width: 100%; }
