/* ===================================
   ENHANCED HEADER & NAVIGATION
   =================================== */

/* FIXED HEADER Z-INDEX */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background: radial-gradient(circle at center, #530505, #5b0140eb, #000000);
  backdrop-filter: blur(8px);
  z-index: calc(var(--z-modal) - 100) !important;
  padding: var(--space-2) 0;
  padding-top: calc(var(--space-2) + var(--safe-area-inset-top));
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-direction:row;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -20px;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}
.cart-label {
    font-size: 14px;
    font-weight: 500;
    color:var(--bg-primary);
}

i.fas.fa-shopping-cart {
    color: var(--bg-primary);
    font-size: 20px;
}
.cart-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.cart-toggle:hover {
    transform: scale(1.1);
}
.cart-icon-container {
    position: relative;
    display: inline-block;
}

.mobile-nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  transform-origin: center;
}

.mobile-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav__link--highlight {
    color: var(--accent) !important;
    animation: pulse 2s ease-in-out infinite;
}

/* Grid dropdown improvements */
.nav__dropdown-menu--grid {
    min-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.25rem;
    padding: 0.75rem;
}

.nav__dropdown:hover .nav__dropdown-menu--grid {
    display: grid;
}

/* Scrollbar for grid dropdowns */
.nav__dropdown-menu--grid::-webkit-scrollbar {
    width: 6px;
}
.nav__dropdown-menu--grid::-webkit-scrollbar-track {
    background: var(--gray-lightest);
    border-radius: 3px;
}
.nav__dropdown-menu--grid::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}
.nav__dropdown-menu--grid::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* Enhanced Mobile Styles */
@media (max-width: 480px) {
.mobile-nav {
    width: 90%;
  }

.mobile-nav__link {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }

  .mobile-nav__dropdown-btn {
    padding: var(--space-3) var(--space-4);
  }

  .mobile-nav__dropdown-link {
    padding-left: calc(var(--space-4) + 28px);
  }

  /* Improved touch targets for mobile */
  .mobile-nav__link,
  .mobile-nav__dropdown-btn {
    min-height: 44px;
  }
      .contact-item {
        padding: 0.875rem 0;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.875rem;
    }
    
    .contact-icon i {
        font-size: 1rem;
    }
    .contact-heading {
        font-size: 0.85rem;
    }
    
    .contact-details {
        font-size: 0.8rem;
    }
}

/* Prevent body scroll when mobile nav is open */
body.mobile-nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Header Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__action-btn{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}
/* Mobile Navigation Toggle */
.mobile-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  transform-origin: center;
}
.mobile-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/*==home banner==*/
.home-image{
    width:100%;
}
/*==Sales section==*/
.sales-section {
    display: flex;
    margin: 0 auto;
    padding: var(--space-3);
    border-radius: 50px;
    justify-content: center;
}

img.desktop-image,.img.desktop-image{
    border-radius:10px;
}

.hero-actions__grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
}
/* Responsive Design */
@media (max-width: 768px) {
.hero-actions__grid {
   flex-direction: column;
}
}
/* USER ACCOUNT STYLES */
.auth-element.logged-in { 
    display: none;
    padding: 8px;
}
.auth-element.logged-out { display: block; }

.user-account {
  display: inline-block;
  width: auto;
  height: auto;
  position: relative;
}

.user-menu {
  position: relative;
  z-index: calc(var(--z-modal) - 50) !important;
}

.user-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
}

.user-icon:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.user-icon i {
  color: white;
  font-size: 20px;
}

/* DROPDOWN STYLES */
.dropdown-content,
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 30px;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: calc(var(--z-dropdown) + 50) !important;
}

.user-account:hover .dropdown-content,
.user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header,
.user-info {
  padding: 20px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px 12px 0 0;
}

.dropdown-header h3,
.user-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.user-email {
  font-size: 14px;
  opacity: 0.9;
}

.dropdown-body {
  padding: 20px;
}
.login-links {
    padding-top: var(--space-2);
    text-align: center;
}
.login-btn {
  display: block;
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-md);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
/*Login btn container*/
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
/*login text*/
.login-text{
    font-size: 14px;
    font-weight: 500;
    color:var(--bg-primary);
}
/*user icon*/
i.fas.fa-user{
    font-size:20px;
    color:var(--bg-primary);
}
i.fas.fa-user-circle{
    font-size:20px;
    color:var(--bg-primary);
}
i.fas.fa-search {
    color: var(--bg-primary);
    font-size: 20px;
}
.register-link {
  text-align: center;
  display: block;
  color: var(--primary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: var(--transition);
  padding: var(--space-2);
  font-weight: 600;
}

.register-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.user-menu__items {
  padding: 10px 0;
}

.user-menu__item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}
.user-menu__item i {
  margin-right: 10px;
  width: 16px;
  text-align: center;
}
.user-menu__divider {
  height: 1px;
  background: #e8e8e8;
  margin: 8px 0;
}
.user-menu__item--logout {
  color: var(--danger);
}
.user-menu__item--logout:hover {
  background: #fff5f5;
  color: var(--danger);
}
.user-dropdown.show {
  display: block;
}

.user-dropdown::before,
.dropdown-content::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-left: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
}

/* Navigation */
.nav {
  display: flex;
  gap: var(--space-8);
}

.nav__dropdown {
    position: relative;
}
.nav__dropdown-arrow {
    margin-left: 0.25em;
    opacity: 0.7;
}

/* "View All" link inside dropdowns */
.nav__dropdown-item--view-all {
    font-weight: 700;
    color: var(--primary) !important;
    margin-top: 8px;
    border-top: 1px solid var(--gray-lighter);
    padding-top: 10px;
    display: block;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: 0 0 6px 6px;
    transition: background 0.2s;
}

.nav__dropdown-item--view-all:hover {
    background: #4f0138 !important;
    color: var(--white) !important;
}
#searchSuggestions.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: calc(var(--z-modal) - 50) !important; /* 550 */
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.nav__dropdown:hover .nav__dropdown-menu {
    display: block;
}

.nav__dropdown-item:hover {
    background: #4b0136;
    padding-left: 1.75rem;
    color: var(--bg-primary);
}

/* Dropdown fixes */
.nav__link--dropdown-trigger.active {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Close dropdown when clicking outside */
body.dropdown-open {
    overflow: hidden;
}

/* Ensure dropdowns close properly on mobile */
@media (max-width: 768px) {
    .nav__dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
    }
}
.nav__link {
  position: relative;
  font-weight: 600;
  color: var(--white);
  transition: var(--transition);
  padding: var(--space-3) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--text-sm);
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #ff6b35, #ff4500);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.nav__link:hover::after {
    width: 70%;
}

/* ===================================
   SEARCH STYLES
   =================================== */

/* Search Bar Styles */
/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.search-suggestions.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestions-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestions-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.clear-recent {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.clear-recent:hover {
    background: #f3f4f6;
    color: #374151;
}

.suggestions-list {
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f9fafb;
}

.suggestion-item i {
    color: #9ca3af;
    margin-right: 12px;
    font-size: 14px;
}

.suggestion-details {
    flex: 1;
}

.suggestion-title {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.suggestion-title strong {
    color: #3b82f6;
    font-weight: 600;
}

.suggestion-category {
    font-size: 12px;
    color: #6b7280;
}

.suggestions-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    margin:var(--space-1);
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.view-all:hover {
    color: #2563eb;
}

.no-recent-searches {
    padding: 32px 16px;
    text-align: center;
    color: #9ca3af;
}

.no-recent-searches i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.recent-searches-list {
    padding: 8px 0;
}

.recent-search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recent-search-item:hover {
    background-color: #f9fafb;
}

.recent-search-item i {
    color: #9ca3af;
    margin-right: 12px;
    font-size: 14px;
}

.recent-search-item span {
    flex: 1;
    color: #374151;
}

.remove-search {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-search:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: calc(var(--z-modal) - 50) !important;
    display: none;
    flex-direction: column;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-container {
    /*flex: 1;*/
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-search-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--space-8);
}

.mobile-search-header .search-form {
    flex: 1;
}

.mobile-search-close {
    background: none;
    border: none;
    color: #374151;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}

.mobile-search-close:hover {
    background: #f3f4f6;
}

.mobile-search-suggestions {
    flex: 1;
    overflow-y: auto;
    display: none;
}

.recent-searches {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.recent-searches h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.recent-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-tag:hover {
    background: #e5e7eb;
}

.remove-tag {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.remove-tag:hover {
    background: #d1d5db;
    color: #374151;
}

.no-tags {
    color: #9ca3af;
    font-size: 14px;
}

/* Mobile Search Toggle in Header */
.header__action.mobile-search-toggle {
    display: none;
}

@media (max-width: 768px) {
.header__search {
        display: none !important;
    }
.search-container {
        width: 100%;
        display: none;
    }
}

/* Search Error */
.search-error {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ef4444;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
.header__search {
    margin: 0 2rem;
    position: relative;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
}
.search-form {
    position: relative;
}
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 800px;
}
.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    background: #f8fafc;
    transition: all 0.3s ease;
}
.search-input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.search-btn {
    position: absolute;
    left: 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
.search-container {
    width: 100%;
}
}

/*user actions(login,cart)*/
.user-actions {
    display: flex;
    flex-direction: row;
}

/* ===================================
   RESPONSIVE NAV DISPLAY
   =================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav--desktop {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        justify-content: center;
    }
    .mobile-nav-toggle {
        display: none;
    }
}

@media (min-width: 1025px) {
    .nav--desktop {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        justify-content: center;
    }
    .mobile-nav-toggle {
        display: none;
    }
}

/* ===================================
   FIRE DROPDOWN MENU - ENHANCED
   =================================== */

/* NAV CONTAINER FIX - Full width with container inside */
.nav--desktop {
    position: relative;
    width: 100%;
    z-index: calc(var(--z-modal) - 50) !important;
    -webkit-backdrop-filter: blur(10px);
    display: flex !important;
    justify-content: center;
}

/* Inner container for nav items */
.nav-inner {
    max-width: 1400px;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 50px;
    position: relative;
}

/* ===================================
   NAV LINKS - Enhanced with bottom underline
   =================================== */

.nav__link {
    position: relative;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.6rem 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* FIX: Underline flips underneath the text */
.nav__link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #ff6b35, #ff4500, #ff6b35);
    background-size: 200% 100%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.nav__link:hover::after {
    width: 70%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.nav__link:hover {
    color: #ffffff;
    background: rgba(255, 107, 53, 0.08);
    transform: translateY(-1px);
}

/* Dropdown trigger with arrow */
.nav__link--dropdown-trigger {
    cursor: pointer;
}

.nav__link--dropdown-trigger .nav__arrow {
    font-size: 0.5rem;
    transition: transform 0.3s ease;
    opacity: 0.6;
    margin-left: 0.25rem;
}

.nav__dropdown:hover .nav__link--dropdown-trigger .nav__arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Highlight/Specials button */
.nav__link--highlight {
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

.nav__link--highlight:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #ff7a4a, #ff5500);
}

.nav__link--highlight::after {
    display: none;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 40px rgba(255, 107, 53, 0.7);
    }
}

/* ===================================
   DROPDOWN MENU - WITH DELAY FOR HOVER
   =================================== */

.nav__dropdown {
    position: relative;
}

/* CRITICAL FIX: Add delay so dropdown stays open while moving mouse */
.nav__dropdown-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: linear-gradient(180deg, #1a0a14 0%, #2a0f1f 50%, #1a0a14 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 107, 53, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: calc(var(--z-modal) - 40) !important;
    pointer-events: none;
    overflow:hidden;
    display: none;
}

/* Hover delay for dropdown - stays open while moving to options */
.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

/* Keep dropdown open when hovering the menu itself */
.nav__dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

/* Arrow on top of dropdown */
.nav__dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 107, 53, 0.15);
}

/* Dropdown glow effect on hover */
.nav__dropdown:hover .nav__dropdown-menu::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 69, 0, 0.05));
    filter: blur(20px);
    z-index: -1;
}

/* ===================================
   DROPDOWN ITEMS
   =================================== */

.nav__dropdown-item {
    display: block;
    padding: 0.65rem 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav__dropdown-item:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 69, 0, 0.08));
    transform: translateX(4px);
    padding-left: 1.6rem;
}

/* Left border accent on hover */
.nav__dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #ff6b35, #ff4500);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__dropdown-item:hover::before {
    height: 60%;
}

/* Divider */
.nav__divider {
    margin: 0.5rem 0.75rem;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
}

/* Highlight item (All View) */
.nav__dropdown-item--highlight {
    color: var(--white);
    font-weight: 600;
    background: rgba(255, 107, 53, 0.08);
}

.nav__dropdown-item--highlight:hover {
    background: rgba(255, 107, 53, 0.2);
    color: #ff8a5a !important;
}

/* View All link at bottom */
.nav__dropdown-item--view-all {
    color: #ff6b35 !important;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 0 0 10px 10px;
}

.nav__dropdown-item--view-all:hover {
    background: rgba(255, 107, 53, 0.15);
    color: #ff8a5a !important;
    transform: translateX(0);
    padding-left: 1.2rem;
}

.nav__dropdown-item--view-all::before {
    display: none;
}

/* ===================================
   GRID DROPDOWN (Brand Grid)
   =================================== */

.nav__dropdown-menu--grid {
    min-width: 400px;
    max-width: 500px;
    padding: 1rem;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.nav__dropdown-menu--grid .nav__dropdown-item {
    text-align: center;
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.nav__dropdown-menu--grid .nav__dropdown-item:hover {
    transform: translateY(-2px) scale(1.05);
    padding-left: 0.6rem;
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
}

.nav__dropdown-menu--grid .nav__dropdown-item::before {
    display: none;
}

.nav__dropdown-menu--grid .nav__dropdown-item--view-all {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 0.25rem;
}

/* Scrollbar for grid */
.nav__dropdown-menu--grid::-webkit-scrollbar {
    width: 4px;
}

.nav__dropdown-menu--grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.nav__dropdown-menu--grid::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.3);
    border-radius: 2px;
}

.nav__dropdown-menu--grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.5);
}

/* ===================================
   RESPONSIVE FIXES
   =================================== */

@media (max-width: 1200px) {
    .nav-inner {
        padding: 0 1rem;
        gap: 0.1rem;
    }
    
    .nav__link {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .nav__dropdown-menu--grid {
        min-width: 320px;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav--desktop {
        display: none !important;
    }
}

/* ===================================
   ACTIVE/OPEN STATE
   =================================== */

.nav__dropdown.active .nav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.nav__dropdown.active .nav__link--dropdown-trigger .nav__arrow {
    transform: rotate(180deg);
}

/* Active nav link indicator */
.nav__link.active {
    color: #ff6b35;
}

.nav__link.active::after {
    width: 70%;
    background: linear-gradient(90deg, #ff6b35, #ff4500);
}

/* ===================================
   DROPDOWN ANIMATION KEYFRAMES
   =================================== */

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.nav__dropdown:hover .nav__dropdown-menu {
    animation: dropdownSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ===================================
   TOUCH DEVICE SUPPORT
   =================================== */

@media (hover: none) {
    .nav__dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    .nav__dropdown.active .nav__dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}