/* ===== NAVBAR STYLES - VIBRATECH MODERN DESIGN ===== */

:root {
  /* Couleurs */
  --primary-red: #cf2e2e;
  --primary-red-light: #ef4444;
  --primary-red-dark: #b01e1e;
  
  /* Couleurs neutres */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Ombres */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: all 0.15s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.5s ease;
}

/* ===== HEADER WRAPPER ===== */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: none;
  height: 85px;
}

.header-wrapper.scrolled {
  background: #ffffff;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: 85px;
}

.header {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 0.0625rem;
  height: 100%;
  overflow: visible;
}

/* ===== NAVIGATION WRAPPER ===== */
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
  padding: 0 1.5rem;
  max-width: 100%;
  overflow: visible;
}

/* ===== BRAND SECTION ===== */
.nav-brand {
  display: flex;
  align-items: center;
  height: 100%;
  margin-right: 2rem;
  min-width: 140px;
  flex-shrink: 0;
}

.vibratech-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  height: 100%;
  padding: 0;
  justify-content: flex-start;
}

.logo-img {
  height: 70px;
  width: auto;
  display: block;
  margin: 0;
  transition: none !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  object-fit: contain;
  max-width: 280px;
  transform: none !important;
}

.vibratech-logo:hover .logo-img { 
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transform: none !important;
  transition: none !important;
}

/* ===== MAIN NAVIGATION ===== */
.nav-menu {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0 2rem;
  flex: 1;
  justify-content: center;
  overflow: visible;
  min-width: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list {
  overflow-y: visible;
}

.nav-item {
  overflow: visible;
  position: relative;
  height: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.6rem;
  color: #434242;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: none;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(67, 66, 66, 0.08);
  color: #434242;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #434242;
}

/* ===== DROPDOWN BUTTONS ===== */
.nav-dropdown-btn {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.6rem;
  background: none;
  border: none;
  color: #434242;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: none;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav-dropdown-btn:hover {
  background: rgba(67, 66, 66, 0.08);
  color: #434242;
}

.nav-dropdown-btn i {
  font-size: 0.75rem;
  transition: none;
}

.nav-dropdown-btn i.rotated {
  transform: rotate(180deg);
}

/* ===== DROPDOWN MENUS ===== */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: none;
  z-index: 1001;
  padding: 1rem;
}

.dropdown-menu.show { 
  opacity: 1; 
  visibility: visible; 
  transform: none; 
}

/* ===== MEGA MENU (PRODUCTS) ===== */
.mega-menu {
  min-width: 880px;
  padding: 0;
  overflow: visible;
  position: fixed !important;
  top: 85px !important;
  left: 0 !important;
  right: 0 !important;
  width: clamp(720px, 60vw, 980px);
  max-width: calc(100vw - 32px);
  margin-left: 16px;
  margin-right: 16px;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.16), 0 8px 16px rgba(0,0,0,0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 180ms ease, transform 220ms ease, visibility 0ms linear 180ms;
}

.mega-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity 180ms ease, transform 220ms ease;
}

.nav-item.dropdown:hover .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.mega-menu-content {
  display: grid;
  grid-template-columns: 360px minmax(420px, 1fr);
  min-height: 420px;
  position: relative;
}

.mega-left {
  background: #ffffff;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
}

.mega-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-800);
  transition: var(--transition-normal);
  height: 52px;
  border-bottom: 1px solid #f1f5f9;
}

.mega-item:hover {
  background: var(--gray-100);
}

.mega-item.active {
  background: var(--gray-100);
  border-left: 3px solid var(--primary-red);
}

.mega-item i {
  opacity: 0;
  transform: translateX(-4px);
  transition: transform 160ms ease, opacity 160ms ease, color 160ms ease;
}

.mega-item:hover i,
.mega-item.active i {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary-red);
}

.mega-right {
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  gap: 0.5rem;
  position: relative;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 200ms ease 90ms, transform 220ms ease 90ms;
  max-height: 600px;
  overflow-y: auto;
  min-width: 250px;
}

.mega-menu.show .mega-right {
  opacity: 1;
  transform: translateX(0);
}

.mega-sublist-wrapper {
  margin-bottom: 0.5rem;
}

.mega-sublist-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  color: var(--gray-900);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: var(--transition-normal);
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
}

.mega-sublist-title-btn {
  position: relative;
}

.mega-sublist-title-btn:hover {
  background: var(--gray-50);
  color: var(--primary-red);
}

.mega-sublist-title-btn i {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: var(--transition-fast);
}

.mega-sublist-title-btn:hover i {
  color: var(--primary-red);
  transform: translateX(4px);
}

.mega-sublist-title-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mega-sublist-title-link:hover {
  background: var(--gray-50);
  color: var(--primary-red);
}

.mega-sublist-title-link i {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: var(--transition-fast);
}

.mega-sublist-title-link:hover i {
  color: var(--primary-red);
}

.mega-subitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--gray-800);
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition-normal);
  cursor: pointer;
  min-height: 44px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.mega-subitem.has-children {
  background: #fff;
  border: 1px solid transparent;
}

.mega-subitem:hover {
  background: var(--gray-100);
  color: var(--primary-red-dark);
}

.mega-menu-content {
  position: relative;
}

.mega-flyout {
  position: absolute;
  top: 0;
  left: calc(100% + 0px);
  width: 280px;
  min-height: 100%;
  background: #fff;
  border-left: 1px solid var(--gray-200);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  padding: 1rem 0.75rem;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
}

.mega-flyout.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.mega-flyout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--gray-800);
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition-normal);
  cursor: pointer;
  min-height: 44px;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}

.mega-flyout-item:hover {
  background: var(--gray-50);
  color: var(--primary-red);
}

.mega-flyout-item i {
  font-size: 0.7rem;
  color: var(--gray-400);
  transition: var(--transition-fast);
}

.mega-flyout-item:hover i {
  color: var(--primary-red);
}

.mega-flyout-title {
  margin: 0 0 .5rem 0;
  color: var(--gray-900);
  font-weight: 700;
}

.mega-flyout-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .25rem;
}

.mega-flyout-section {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.mega-flyout-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.mega-flyout-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin: 0 0 0.35rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== RIGHT SIDE TOOLS ===== */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
  margin-left: 2rem;
  min-width: 180px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ===== MODERN SEARCH TRIGGER ===== */
.modern-search-container {
  display: flex;
  align-items: center;
  height: 100%;
}

.modern-search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(67, 66, 66, 0.2);
  background: rgba(67, 66, 66, 0.05);
  color: #434242;
  border-radius: 50%;
  cursor: pointer;
  transition: none;
  font-size: 1rem;
  backdrop-filter: blur(10px);
}

.modern-search-trigger:hover {
  background: rgba(67, 66, 66, 0.1);
  border-color: rgba(67, 66, 66, 0.3);
  transform: none;
  box-shadow: none;
}

.modern-search-trigger i {
  font-size: 1rem;
}

/* ===== AUTHENTICATION BUTTONS ===== */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0;
  margin-left: 0;
  flex-shrink: 0;
}

.auth-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: none;
  text-decoration: none;
  white-space: nowrap;
}

.login-btn {
  background: transparent;
  color: #434242;
  border: 1px solid rgba(67, 66, 66, 0.3);
}

.login-btn:hover {
  background: rgba(67, 66, 66, 0.08);
  border-color: rgba(67, 66, 66, 0.5);
}

.register-btn {
  background: var(--white);
  color: var(--primary-red);
}

.register-btn:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

/* ===== USER MENU ===== */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 0;
  margin-left: 0;
  z-index: 1000;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-normal);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 100;
  position: relative;
}

.user-menu-btn span {
  color: #434242;
  font-weight: 600;
}

.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-menu-btn i {
  font-size: 1rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-200);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1001;
  margin-top: 0;
}

.user-dropdown.show { 
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
}

.user-info {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}

.user-info strong {
  display: block;
  color: var(--gray-900);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.user-role {
  display: inline-block;
  background: var(--primary-red);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.user-actions {
  padding: 0.5rem;
}

.user-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition-normal);
  border-radius: 6px;
  font-size: 0.9rem;
}

.user-action-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.user-action-btn i {
  width: 16px;
  text-align: center;
}

/* ===== MOBILE MENU BUTTON ===== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: none;
  margin-left: 0;
  background: transparent;
  border: none;
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: #434242;
  transition: none;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(120, 11, 11, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 100200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0ms linear 200ms;
}

.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease;
}

.mobile-menu-content {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #b01e1e 0%, #000000 100%);
  padding: 2.75rem 1.75rem 3.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.mobile-logo {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.35));
}

.close-mobile-menu {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.55rem;
  border-radius: 12px;
  transition: background 160ms ease, transform 160ms ease;
}

.close-mobile-menu:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.mobile-search i {
  color: rgba(248, 250, 252, 0.85);
  font-size: 1.05rem;
}

.mobile-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
}

.mobile-search input::placeholder {
  color: rgba(248, 250, 252, 0.7);
}

.mobile-search button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.mobile-search button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(2px);
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav-list li {
  margin: 0;
}

.mobile-nav-list a {
  color: #f8fafc;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 1.05rem 0;
  display: block;
  position: relative;
  transition: color 160ms ease, transform 160ms ease;
}

.mobile-nav-list a::after {
  content: '\f061';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(248, 250, 252, 0.55);
  transition: transform 160ms ease, color 160ms ease;
}

.mobile-nav-list a:hover {
  color: #ffffff;
  transform: translateX(6px);
}

.mobile-nav-list a:hover::after {
  color: #ffffff;
  transform: translate(4px, -50%);
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.25rem 0;
}

.mobile-nav-item:last-child {
  border-bottom: none;
}

.mobile-nav-item.has-children {
  padding-bottom: 0;
}

.mobile-nav-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1.05rem 0;
  cursor: pointer;
}

.mobile-nav-toggle i {
  font-size: 0.9rem;
  transition: transform 160ms ease;
}

.mobile-nav-panel {
  padding: 0 0 1.25rem 0;
}

.mobile-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mobile-accordion-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.mobile-accordion-toggle {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}

.mobile-accordion-toggle i {
  font-size: 0.85rem;
  transition: transform 160ms ease;
}

.mobile-accordion-toggle.active,
.mobile-accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.mobile-accordion-content {
  padding: 0.85rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mobile-accordion-heading {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(248, 250, 252, 0.75);
}

.mobile-accordion-subheading {
  margin: 0.4rem 0 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.85);
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.mobile-link i {
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.6);
  transition: transform 160ms ease, color 160ms ease;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.mobile-link:hover i {
  transform: translateX(4px);
  color: #ffffff;
}

/* ===== MOBILE AUTHENTICATION ===== */
.mobile-auth-section {
  margin-top: 0.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mobile-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  text-decoration: none;
}

.mobile-auth-btn.login {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.mobile-auth-btn.login:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.mobile-auth-btn.register {
  background: #ffffff;
  color: #991919;
}

.mobile-auth-btn.register:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.mobile-user-section {
  margin-top: 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.mobile-user-info i {
  font-size: 2rem;
  color: #ffffff;
}

.mobile-user-info span {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
}

.mobile-user-role {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-user-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-user-action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  font-size: 1rem;
  font-weight: 500;
}

.mobile-user-action:hover {
  transform: translateX(5px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.mobile-user-action i {
  width: 20px;
  text-align: center;
}

.mobile-extra-card {
  margin-top: auto;
  padding: 1.35rem 1.5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  color: #f8fafc;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.mobile-extra-card h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.mobile-extra-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(248, 250, 252, 0.85);
}

.mobile-extra-card a {
  align-self: flex-start;
  background: #ffffff;
  color: #991919;
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.mobile-extra-card a i {
  font-size: 0.85rem;
}

.mobile-extra-card a:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.28);
}

/* ===== MODERN SEARCH MODAL ===== */
.modern-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 2rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-search-modal.active .search-modal-content {
  transform: translateY(0) scale(1);
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.search-modal-header h3 {
  margin: 0;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 600;
}

.close-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-search:hover {
  background: #e5e7eb;
  color: #374151;
}

.search-input-section {
  padding: 1.5rem 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: #9ca3af;
  font-size: 1.1rem;
  z-index: 2;
}

.modern-search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  color: #111827;
}

.modern-search-input:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 4px rgba(207, 46, 46, 0.1);
}

.modern-search-input::placeholder {
  color: #9ca3af;
}

.clear-search {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-search:hover {
  color: #6b7280;
  background: #f3f4f6;
}

.search-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: none;
  background: var(--primary-red);
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
}

.search-submit-btn:hover:not(:disabled) {
  background: var(--primary-red-dark);
  transform: translateY(-1px);
}

.search-submit-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.search-suggestions, .search-results {
  padding: 0 2rem 1.5rem;
}

.search-suggestions h4, .search-results h4 {
  margin: 0 0 1rem 0;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
}

.suggestion-item:hover {
  background: #f3f4f6;
}

.suggestion-item i:first-child {
  color: #9ca3af;
  font-size: 0.9rem;
}

.suggestion-item span {
  flex: 1;
  color: #374151;
}

.suggestion-item i:last-child {
  color: #d1d5db;
  font-size: 0.8rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item:hover {
  border-color: var(--primary-red);
  box-shadow: 0 4px 15px rgba(207, 46, 46, 0.1);
}

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #fef2f2;
  border-radius: 12px;
  flex-shrink: 0;
}

.result-icon i {
  color: var(--primary-red);
  font-size: 1.4rem;
}

.result-content {
  flex: 1;
}

.result-content h5 {
  margin: 0 0 0.5rem 0;
  color: #111827;
  font-size: 1.1rem;
  font-weight: 600;
}

.result-content p {
  margin: 0 0 0.5rem 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.result-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.result-action:hover {
  background: var(--primary-red);
  color: #ffffff;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1280px) {
  .nav-wrapper {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .logo-img {
    height: 70px;
    max-width: 280px;
    transform: none !important;
    transition: none !important;
  }

  .nav-menu,
  .auth-buttons,
  .user-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-tools {
    min-width: auto;
    gap: 0.75rem;
  }
}

@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .header-wrapper {
    height: 60px;
  }
  .header-wrapper.scrolled {
    height: 60px;
  }
  .logo-img {
    height: 60px;
    max-width: 200px;
    transform: none !important;
    transition: none !important;
  }
  .mobile-logo {
    height: 50px;
  }
  .header {
    padding: 0 0.5rem;
  }
  
  .nav-wrapper {
    gap: 1rem;
    padding: 0 0.75rem;
  }
  
  .nav-brand {
    margin-right: 1rem;
    min-width: 120px;
  }
  
  .nav-menu {
    margin: 0 1rem;
  }
  
  .nav-tools {
    gap: 0.5rem;
    margin-left: 1rem;
    min-width: auto;
  }
  
  .search-content {
    margin: 0 1rem;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
  }
  
  .search-input-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-submit {
    width: 100%;
    min-width: auto;
  }
  
  .search-overlay {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 80px;
  }
  
  .auth-buttons,
  .user-menu {
    display: none;
  }
  
  .nav-brand {
    margin-left: 0;
    min-width: 140px;
  }
  
  .nav-menu {
    margin-left: 0;
  }
  
  .nav-wrapper {
    gap: 0.5rem;
  }
}

/* Ensure dropdowns are not clipped */
.header {
  overflow: visible;
}

.nav-wrapper {
  overflow: visible;
}

.nav-menu {
  overflow: visible;
} 

/* Make sure dropdown appears above other content */
.header-wrapper {
  z-index: 100000;
}

.dropdown-menu,
.mega-menu {
  z-index: 100001;
} 

/* Header height variable for positioning fixed menus */
.header-wrapper {
  --navbar-height: 85px;
}

.header-wrapper.scrolled {
  --navbar-height: 85px;
}

/* Pin the mega menu to the viewport under the fixed header */
.mega-menu {
  position: fixed !important;
  top: var(--navbar-height, 70px) !important;
  left: 0 !important;
  right: 0 !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
} 
