/* --- NAVBAR --- */
.custom-navbar {
  padding: 20px 0;
  transition: all 0.4s ease;
  background: transparent;
  min-height: 98px;
}

.custom-navbar.scrolled {
  background: #200520;
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  padding: 10px 0;
}

.navbar-nav .nav-link {
  color: white !important;
  font-weight: 500;
  margin: 0 10px;
  transition: color 0.3s;
}

.custom-navbar .navbar-brand img {
  width: 150px;
  height: auto;
}

.contact-link {
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.contact-link:hover {
  color: var(--primary-gold);
}

/* --- MEGA MENU --- */
.has-megamenu:not(.products-dropdown) {
  position: static !important;
}

.megamenu {
  width: 90%;
  max-width: 1100px;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: #200520;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  margin-top: 15px;
}

.megamenu .dropdown-item {
  color: #ccc;
  padding: 8px 0;
  transition: all 0.2s;
}

.megamenu .dropdown-item:hover {
  background: transparent;
  color: var(--primary-color);
  transform: translateX(5px);
}

.products-megamenu .mega-menu-container {
  justify-content: center;
  align-items: center;
  min-height: auto !important;
  height: auto !important;
  padding: 20px 0;
}

.products-dropdown {
  position: relative !important;
}

.products-dropdown .products-megamenu {
  width: min(335px, 92vw);
  max-width: min(335px, 92vw);
  margin-top: 0 !important;
  top: 100%;
}

.products-megamenu .mega-menu-sidebar {
  width: min(335px, 100%);
  max-width: min(335px, 100%);
  border-right: none;
  background: transparent;
}

.mega-menu-container {
  display: flex;
  min-height: 450px;
}

.mega-menu-sidebar {
  width: 35%;
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item {
  position: relative;
  padding: 15px 20px;
  color: #a1a1aa;
  font-weight: 500;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  border: 1px solid transparent;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item:hover .arrow-icon,
.sidebar-item.active .arrow-icon {
  opacity: 1;
  transform: translate(0, 0);
}

.sidebar-item.active .arrow-icon {
  animation: arrowBounce 2s infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -3px); }
}

.mega-menu-content {
  width: 65%;
  padding: 40px;
}

.mega-menu-container.single-column .mega-menu-content {
  display: none;
}

.mega-menu-sidebar a.sidebar-item {
  text-decoration: none;
}

.content-pane {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.content-pane.active {
  display: block;
}

.content-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 30px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.content-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 12px;
  color: #d4d4d8;
  transition: 0.3s;
}

.content-box:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.content-box a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.content-box .arrow-icon {
  color: #f59e0b;
  opacity: 0;
  transform: translate(-5px, 5px);
  transition: all 0.3s ease;
}

.content-box:hover .arrow-icon {
  opacity: 1;
  transform: translate(0, 0);
}

.content-box:hover a {
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- FOOTER --- */
.footer {
  background-color: #200520 !important;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  color: var(--text-grey);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 300;
}

.footer-nav a:hover {
  color: white;
}

footer .navbar-brand img {
  width: 150px;
  height: auto;
}

/* --- DESKTOP MEGA MENU BEHAVIOR --- */
@media (min-width: 992px) {
  .products-dropdown {
    position: relative !important;
  }

  .products-dropdown .products-megamenu {
    left: 50% !important;
    transform: translate(-50%, 10px) !important;
    margin-top: 0 !important;
    top: 100%;
  }

  .has-megamenu:not(.products-dropdown) {
    position: static !important;
  }

  .has-megamenu::after {
    content: "";
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: 40px;
    display: none;
    z-index: 10;
  }

  .megamenu {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    margin-top: 31px;
    transition: all 0.3s ease;
    pointer-events: none;
    transform: translate(-50%, 10px) !important;
  }

  .has-megamenu:hover .megamenu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0) !important;
  }

  .products-dropdown:hover .products-megamenu {
    transform: translate(-50%, 0) !important;
  }

  .has-megamenu:hover::after {
    display: block;
  }
}

/* --- MOBILE NAV DRAWER --- */
@media (max-width: 991px) {
  .hero-section h1 {
    font-size: 3rem;
  }

  .mobile-nav-drawer,
  .mobile-nav-drawer * {
    box-sizing: border-box;
  }

  .mobile-nav-drawer {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .mobile-nav-content {
    overflow-x: hidden;
  }

  .custom-navbar.scrolled {
    padding: 15px;
  }

  .mobile-nav-toggle {
    border: 0;
    background: transparent;
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1060;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(88vw, 360px);
    height: 100vh;
    background: #200520;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1061;
    display: flex;
    flex-direction: column;
  }

  .mobile-nav-drawer.active {
    transform: translateX(0);
  }

  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-title {
    color: #fff;
    font-weight: 700;
    margin: 0;
  }

  .mobile-nav-close {
    background: transparent;
    color: #fff;
    border: 0;
    font-size: 1.25rem;
  }

  .mobile-nav-content {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
  }

  .mobile-nav-link,
  .mobile-accordion-button {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 0;
    border: 0;
    background: transparent;
    font-weight: 500;
  }

  .mobile-nav-link:hover,
  .mobile-accordion-button:hover {
    color: #f9b522;
  }

  .mobile-accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-accordion-button .chevron {
    transition: transform 0.25s ease;
  }

  .mobile-accordion-item.active > .mobile-accordion-button .chevron {
    transform: rotate(180deg);
  }

  .mobile-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 10px;
  }

  .mobile-accordion-panel a {
    display: block;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-size: 0.95rem;
  }

  .mobile-accordion-panel a.l2-link {
    font-weight: 600;
    color: #fff;
  }

  .mobile-accordion-panel a.l3-link {
    padding-left: 16px;
    font-size: 0.92rem;
  }

  .mobile-accordion-panel a.l3-link::before {
    content: "› ";
    color: rgba(249, 181, 34, 0.9);
  }

  .mobile-accordion-panel a:hover {
    color: #f9b522;
  }

  .mobile-nav-contact {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 18px 18px;
  }

  .mobile-nav-contact a {
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
  }

  .mobile-nav-contact a + a {
    margin-top: 8px;
  }

  .megamenu {
    background: #200520;
    border: none;
  }

  .mega-menu-container {
    flex-direction: column;
  }

  .mega-menu-sidebar,
  .mega-menu-content {
    width: 100%;
  }

  .megamenu {
    width: 100%;
    border-radius: 0;
  }

  .has-megamenu .dropdown-toggle::after {
    display: none !important;
  }

  .megamenu {
    display: none !important;
  }

  .nav-link.d-lg-none {
    padding: 0.5rem 1rem;
    color: #fff !important;
  }
}
