/* nav.css */
/* Navigation / Header CSS */

*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: 'El Messiri', sans-serif;
  background: #ffffff;
  color: #1a1a18;
  overflow-x: hidden;
}

/* ── NAV BASE STYLES ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 56px;
  background: transparent;
  backdrop-filter: none;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-logo {
  font-family: 'El Messiri', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a1a18;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon svg { 
  width: 16px; 
  height: 16px; 
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: #3d3d3a;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { 
  color: #1a1a18; 
}

.nav-links .chevron {
  font-size: 0.65rem;
  opacity: 0.5;
  margin-right: 2px;
}

.btn-purchase {
  background: #ffffff;
  font-family: 'El Messiri', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.5rem 1.3rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.2s;
}

.btn-purchase:hover { 
  opacity: 0.85; 
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3d3d3a;
  transition: background 0.2s;
}

.nav-icon-btn:hover { 
  background: rgba(0,0,0,0.06); 
}

/* ── MOBILE HAMBURGER BUTTON ── */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
  margin-right: auto; /* RTL: push to left side */
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2.5px;
  background: #1a1a18;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger → X animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0.8);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex; /* Show hamburger on mobile */
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px 24px 24px;
    gap: 0;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    margin: 0;
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .nav-links li a {
    display: block;
    padding: 16px 0;
    font-size: 1rem;
    color: #1a1a18;
  }

  .nav-links .chevron {
    margin-right: 4px;
  }

  /* Nav icons - always visible and properly styled in mobile menu */
  .nav-icons {
    display: flex !important; /* Force display */
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
  }

  .nav-icons .btn-purchase {
    width: 100%;
    justify-content: center;
  }
  
  
  /* But show them inside the mobile menu */
  .nav-links .nav-icons {
    display: flex !important;
    flex-direction: column;
  }
}

/* Desktop: Ensure nav-icons are visible */
@media (min-width: 769px) {
  .nav-icons {
    display: flex;
  }
}

/* ── MENU OVERLAY ── */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.menu-overlay.active {
  display: block;
}

/* Prevent body scroll when menu open */
body.menu-open {
  overflow: hidden;
}