/* Navigation Header Styling - Consolidated from all pages */

/*
====================================
HTML TEMPLATE FOR NAVIGATION STRUCTURE
====================================

<!-- Overlay for sidebar -->
<div class="overlay"></div>

<!-- Sidebar Menu -->
<div class="sidebar_menu sidebar">
    <div class="menu-header">
        <div class="sidebar-close">
            <i class="fas fa-times"></i>
        </div>
    </div>
    <div class="menu">
        <ul>
            <li><a href="../Home.html"><i class="fas fa-home"></i> Home</a></li>
            <li><a href="products.html"><i class="fas fa-boxes"></i> Products</a></li>
            <li><a href="../Services.html"><i class="fas fa-shopping-bag"></i> Services</a></li>
            <li><a href="../Settings.html"><i class="fas fa-cog"></i> Settings</a></li>
            <li><a href="../Contact.html"><i class="fas fa-phone-volume"></i> Contact</a></li>
        </ul>
    </div>
    <div class="social_media">
        <a href="#"><i class="fab fa-facebook-f"></i></a>
        <a href="#"><i class="fab fa-twitter"></i></a>
        <a href="#"><i class="fab fa-instagram"></i></a>
    </div>
</div>

<!-- Top Navigation Bar -->
<div class="top-nav">
    <div class="menu-toggle">
        <i class="fas fa-bars"></i>
    </div>
    <!-- Left side - Terzon Logo -->
    <div class="brand">
        <a href="../Home.html">terzon</a>
    </div>
    
    <!-- Right side - Controls -->
    <div class="user-controls">
        <!-- Theme Toggle -->
        <div class="theme-toggle">
            <i class="light-icon fas fa-sun"></i>
            <i class="dark-icon fas fa-moon"></i>
        </div>
        <div class="auth-links">
            <a href="../Login.html" class="nav-signin">
                <i class="fas fa-user"></i>
                <span>Sign in</span>
            </a>
            <a href="#" class="nav-signup">
                <i class="fas fa-user-plus"></i>
                <span>Sign up</span>
            </a>
        </div>
        <a href="#" class="nav-cart snipcart-checkout">
            <i class="fas fa-shopping-cart"></i>
            <span class="cart-count snipcart-items-count">0</span>
        </a>
    </div>
</div>
*/

/* ============================================
   SMOOTH TRANSITIONS - Minimal, fast
   ============================================ */

/* Consistent Header Styling for ALL Pages */
body.has-consistent-header .top-nav {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.has-consistent-header.dark .top-nav {
    background-color: #1a1a1a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Ensuring consistent brand/logo styling */
body.has-consistent-header .top-nav .brand {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: -10px;
}

/* Clothing page default brand offset (replaces inline style) */
body.clothing-page.has-consistent-header .top-nav .brand {
    margin-left: -10px;
}

/* Manual payment: match clothing brand offset */
body.manual-payment-page.has-consistent-header .top-nav .brand {
    margin-left: -10px;
}

/* TERZON text with metallic silver wave animation - SAME FOR LIGHT & DARK MODE */
body.has-consistent-header .brand a {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    padding: 0;
    width: 140px;
    text-align: center;
    display: block;
    /* Metallic silver gradient with wave animation */
    background: linear-gradient(
        90deg,
        #e5e5e5 0%,
        #cfcfcf 15%,
        #b5b5b5 30%,
        #8d8d8d 50%,
        #b5b5b5 70%,
        #d6d6d6 85%,
        #e5e5e5 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: terzonMetallicWave 3s ease-in-out infinite;
}

/* Metallic wave animation keyframes */
@keyframes terzonMetallicWave {
    0% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Dark mode - SAME metallic silver animation */
body.has-consistent-header.dark .brand a,
body.has-consistent-header.dark-mode .brand a {
    background: linear-gradient(
        90deg,
        #e5e5e5 0%,
        #cfcfcf 15%,
        #b5b5b5 30%,
        #8d8d8d 50%,
        #b5b5b5 70%,
        #d6d6d6 85%,
        #e5e5e5 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: terzonMetallicWave 3s ease-in-out infinite;
}

/* Mobile logo images are defined in the responsive section below (480px) */

/* No floating animation - using gradient effect instead */

/* Ensure consistent menu toggle */
body.has-consistent-header .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    font-size: 20px;
    margin-right: 5px;
    margin-left: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Ensure consistent user controls */
body.has-consistent-header .user-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hide logout from navigation - only shown in Settings page */
.logout-button,
.nav-logout {
    display: none;
}

/* Show logout only on Settings page */
body.settings-page .logout-button,
body.settings-page .nav-logout {
    display: inline-flex;
    padding: 10px 20px;
}

/* Top Navigation Bar - Ensure consistent spacing */
.top-nav {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body.dark .top-nav {
    background-color: #1a1a1a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Menu Toggle Button - EXACT positioning */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    font-size: 20px;
    margin-right: 5px;
    margin-left: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Custom Hamburger Menu Icon Styles */
.hamburger {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger input {
  display: none;
}

/* Ensure any checkbox used inside the top navigation toggle is fully hidden */
.menu-toggle input[type="checkbox"],
.top-nav input[type="checkbox"] {
  display: none !important;
  appearance: none;
  -webkit-appearance: none;
  width: 0;
  height: 0;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hamburger svg {
  height: 1.8em;
  width: auto;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode styling for hamburger lines */
.line {
  fill: none;
  stroke: #8e24aa;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
              stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add gradient effect to match the logo animation */
body:not(.dark) .hamburger:hover .line {
  stroke: #3f51b5;
}

/* Apply animation to the stroke color to match logo animation */
@keyframes strokeGradientMove {
  0% { stroke: #3f51b5; }
  25% { stroke: #8e24aa; }
  50% { stroke: #5c6bc0; }
  75% { stroke: #9c27b0; }
  100% { stroke: #3f51b5; }
}

body:not(.dark) .line {
  animation: strokeGradientMove 8s ease infinite;
}

.line-top-bottom {
  stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
  transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

body.dark .menu-toggle {
    color: #f5f5f5;
}

/* Dark mode styling for hamburger lines */
body.dark .menu-toggle .line {
  stroke: #35a79c;
  transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
              stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apply dark mode cosmic animation */
@keyframes cosmicStrokeGradient {
  0% { stroke: #35a79c; }
  25% { stroke: #209cb3; }
  50% { stroke: #1e4a69; }
  75% { stroke: #35a79c; }
  100% { stroke: #209cb3; }
}

body.dark .line {
  animation: cosmicStrokeGradient 8s ease infinite;
}

/* Reset any transforms that might interfere with the animation */
body.dark .hamburger svg {
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure the animation persists even when icon changes */
body.dark .hamburger input:checked + svg {
  transform: rotate(-45deg);
}

/* Apply the cosmic gradient animation to the icons in dark mode only */
body.dark .sidebar_menu .menu ul li a i {
    margin-right: 12px;
    width: 25px;
    display: inline-block;
    text-align: center;
    background: linear-gradient(270deg, #35a79c, #209cb3, #1e4a69, #35a79c);
    background-size: 800% 800%;
    animation: cosmic-gradient 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

/* Apply the blue and purple gradient animation to the sidebar menu icons in light mode */
body:not(.dark) .sidebar_menu .menu ul li a i {
    margin-right: 12px;
    width: 25px;
    display: inline-block;
    text-align: center;
    background: linear-gradient(120deg, #3f51b5, #8e24aa, #5c6bc0, #9c27b0);
    background-size: 300% 300%;
    animation: gradientMove 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Hover effect for sidebar icons - must be restored */
.sidebar_menu .menu ul li a:hover i {
    transform: translateX(5px);
    filter: brightness(1.2);
}

.sidebar_menu .menu ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(63, 81, 181, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.sidebar_menu .menu ul li a:hover::before {
    left: 100%;
}

/* Special styling for active menu item in dark mode */
body.dark .sidebar_menu .menu ul li a.active i {
  font-weight: bold;
}

/* Terzon Logo/Brand - EXACT positioning */
.top-nav .brand {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: -7px;
}

.brand a {
    font-size: 24px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    /* Metallic silver wave animation - same for all modes */
    background: linear-gradient(
        90deg,
        #e5e5e5 0%,
        #cfcfcf 15%,
        #b5b5b5 30%,
        #8d8d8d 50%,
        #b5b5b5 70%,
        #d6d6d6 85%,
        #e5e5e5 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    padding: 0;
    animation: terzonMetallicWave 3s ease-in-out infinite;
    width: 110px;
    text-align: center;
    display: block;
}

/* Ensure metallic animation on all pages */
body.product-page .top-nav .brand a {
    animation: terzonMetallicWave 3s ease-in-out infinite !important;
}

/* Ensure consistent brand styling for all pages with high specificity */
html body .main_box .top-nav .brand a,
body.products-page .top-nav .brand a, 
body.clothing-page .top-nav .brand a, 
body.home-page .top-nav .brand a,
body.settings-page .top-nav .brand a,
body.login-page .top-nav .brand a,
body.product-page .top-nav .brand a,
body.signup-page .top-nav .brand a {
    margin: 0;
    letter-spacing: 1px;
}

/* User Controls - EXACT spacing */
.user-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
    position: relative;
    gap: 15px; /* Increased from 10px for better spacing between elements */
}

/* Theme Toggle - Override slider styles from theme-toggle.css */
.top-nav .theme-toggle,
.user-controls .theme-toggle {
    position: relative;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    overflow: hidden;
    margin-right: 5px;
    outline: none;
}

/* Hide slider elements if they exist */
.top-nav .theme-toggle .toggle-label,
.top-nav .theme-toggle .toggle-input,
.top-nav .theme-toggle .toggle-ball,
.user-controls .theme-toggle .toggle-label,
.user-controls .theme-toggle .toggle-input,
.user-controls .theme-toggle .toggle-ball {
    display: none;
}

.top-nav .theme-toggle:hover,
.user-controls .theme-toggle:hover {
    background-color: rgba(121, 40, 202, 0.1);
}

body.dark .top-nav .theme-toggle:hover,
body.dark .user-controls .theme-toggle:hover {
    background-color: rgba(53, 167, 156, 0.2);
}

/* Theme Icons Styling */
.top-nav .theme-toggle i,
.user-controls .theme-toggle i {
    position: absolute;
    font-size: 18px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Light Icon (Sun) - Hidden in light mode */
.top-nav .theme-toggle .light-icon,
.user-controls .theme-toggle .light-icon {
    opacity: 0;
    transform: translateY(20px) rotate(120deg);
    background: linear-gradient(120deg, #7928ca, #ff0080);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

/* Dark Icon (Moon) - Visible in light mode */
.top-nav .theme-toggle .dark-icon,
.user-controls .theme-toggle .dark-icon {
    opacity: 1;
    transform: translateY(0);
    background: linear-gradient(120deg, #7928ca, #ff0080);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

/* Dark mode - swap icon visibility */
body.dark .top-nav .theme-toggle .dark-icon,
body.dark .user-controls .theme-toggle .dark-icon {
    opacity: 0;
    transform: translateY(-20px) rotate(-120deg);
}

body.dark .top-nav .theme-toggle .light-icon,
body.dark .user-controls .theme-toggle .light-icon {
    opacity: 1;
    transform: translateY(0);
    background: linear-gradient(120deg, #35a79c, #209cb3, #1e4a69);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

/* Animation for gradient shift effect */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Remove old toggle styles if they exist */
.toggle-input,
.toggle-label,
.toggle-ball {
    display: none;
}

/* ============================================
   DESKTOP: Show auth buttons, hide profile
   ============================================ */
.top-nav .auth-links {
    display: flex !important;
    align-items: center;
    gap: 12px;
}

.top-nav .user-profile {
    display: none !important;
}

/* ============================================
   MOBILE: Hide auth buttons, show profile
   ============================================ */
@media (max-width: 768px) {
    .top-nav .auth-links {
        display: none !important;
    }
    
    .top-nav .user-profile {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================================================
   PROFESSIONAL AUTH BUTTONS - SINGLE SOURCE OF TRUTH
   ============================================================================ */

/* Base Button Styles */
.top-nav .auth-links a, 
.top-nav .sign-in-link,
.top-nav .sign-up-link,
.top-nav .nav-signin,
.top-nav .nav-signup,
.header-actions .sign-in-link,
.header-actions .sign-up-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Sign In Button - Ghost/Outline Style */
.top-nav .sign-in-link,
.top-nav .nav-signin,
.header-actions .sign-in-link {
    background: transparent;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

.top-nav .sign-in-link i,
.top-nav .nav-signin i,
.header-actions .sign-in-link i {
    font-size: 14px;
    color: inherit;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.top-nav .sign-in-link:hover,
.top-nav .nav-signin:hover,
.header-actions .sign-in-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-2px);
}

/* Sign Up Button - Solid Gradient Style */
.top-nav .sign-up-link,
.top-nav .nav-signup,
.header-actions .sign-up-link {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.top-nav .sign-up-link i,
.top-nav .nav-signup i,
.header-actions .sign-up-link i {
    font-size: 13px;
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.top-nav .sign-up-link:hover,
.top-nav .nav-signup:hover,
.header-actions .sign-up-link:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Dark Mode Auth Links */
body.dark .top-nav .sign-in-link,
body.dark .top-nav .nav-signin,
body.dark-mode .top-nav .sign-in-link,
body.dark-mode .top-nav .nav-signin,
body.dark .header-actions .sign-in-link,
body.dark-mode .header-actions .sign-in-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #e5e5e5;
}

body.dark .top-nav .sign-in-link i,
body.dark .top-nav .nav-signin i,
body.dark-mode .top-nav .sign-in-link i,
body.dark-mode .top-nav .nav-signin i,
body.dark .header-actions .sign-in-link i,
body.dark-mode .header-actions .sign-in-link i {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
}

body.dark .top-nav .sign-in-link:hover,
body.dark .top-nav .nav-signin:hover,
body.dark-mode .top-nav .sign-in-link:hover,
body.dark-mode .top-nav .nav-signin:hover,
body.dark .header-actions .sign-in-link:hover,
body.dark-mode .header-actions .sign-in-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

body.dark .top-nav .sign-up-link,
body.dark .top-nav .nav-signup,
body.dark-mode .top-nav .sign-up-link,
body.dark-mode .top-nav .nav-signup,
body.dark .header-actions .sign-up-link,
body.dark-mode .header-actions .sign-up-link {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
    background-size: 200% 200%;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

body.dark .top-nav .sign-up-link:hover,
body.dark .top-nav .nav-signup:hover,
body.dark-mode .top-nav .sign-up-link:hover,
body.dark-mode .top-nav .nav-signup:hover,
body.dark .header-actions .sign-up-link:hover,
body.dark-mode .header-actions .sign-up-link:hover {
    box-shadow: 0 6px 25px rgba(167, 139, 250, 0.5);
}

body.dark .top-nav .sign-up-link i,
body.dark .top-nav .nav-signup i,
body.dark-mode .top-nav .sign-up-link i,
body.dark-mode .top-nav .nav-signup i,
body.dark .header-actions .sign-up-link i,
body.dark-mode .header-actions .sign-up-link i {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
}

/* Mobile - hide button text labels and profile names */
@media (max-width: 768px) {
    .auth-links a span,
    .nav-signin span,
    .nav-signup span {
        display: none;
    }

    /* Hide inline name on mobile - will show in dropdown instead */
    .user-controls .user-profile .profile-name-inline {
        display: none !important;
    }
    
    /* Hide nav-user on mobile to avoid duplicate names */
    #nav-user {
        display: none !important;
    }
    
    /* Show profile name in dropdown on mobile */
    .user-controls .user-profile .profile-dropdown .profile-name {
        display: block;
    }
}

/* Sign-in and Sign-up Links - Professional Spacing */
.nav-signin, .nav-signup {
    margin-right: 0;
}

/* Shopping Cart Icon - EXACT size */
.nav-cart {
    color: #fff;
    text-decoration: none;
    position: relative;
    font-size: 22px; /* Increased from 17px to make shopping icon larger */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding-right: 10px;
    margin-left: 15px; /* Add space between sign-up button and cart */
}

.nav-cart:hover {
    color: #9c27b0;
}

body:not(.dark) .nav-cart {
    color: #333;
}

/* Shopping cart icon fixes consolidated from view-product.html */
.nav-cart .fas.fa-shopping-cart,
.nav-cart i.fas.fa-shopping-cart {
    font-size: 24px !important;
    display: inline-block !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1100 !important;
}

/* Inline full name next to profile icon (desktop) */
.user-controls .user-profile .profile-name-inline {
    display: inline-block;
    margin-left: 8px;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
}

/* Cart counter position */
.nav-cart .cart-count,
.snipcart-items-count {
    right: 7px !important;
    top: -8px !important;
    position: absolute !important;
    z-index: 1200 !important;
}

body:not(.dark) .nav-cart:hover {
    color: #9c27b0;
}

/* Shopping cart icon specific fix */
.nav-cart i.fas.fa-shopping-cart {
    position: relative;
    display: inline-block !important;
    font-size: 22px;
    visibility: visible !important;
    margin-right: 5px;
    z-index: 1001;
    left: 0;
}

/* Fix for spacing between auth links and cart in the header */
.user-controls .auth-links {
    margin-right: 15px;
}

/* Profile dropdown base styles */
.user-controls .user-profile {
    position: relative;
}
.user-controls .user-profile .profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    background: var(--dropdown-bg, #1f1f1f);
    color: inherit;
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 6px 0;
    z-index: 1500;
}
.user-controls .user-profile .profile-dropdown a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
}
.user-controls .user-profile .profile-dropdown a:hover {
    background: rgba(255,255,255,0.06);
}
.user-controls .user-profile .profile-dropdown.show {
    display: block;
}

/* Edit Profile button styling */
.user-controls .user-profile .profile-dropdown .edit-profile-button {
    color: #4fc3dc;
}
.user-controls .user-profile .profile-dropdown .edit-profile-button:hover {
    background: rgba(79, 195, 220, 0.1);
}

/* Profile name in dropdown */
.user-controls .user-profile .profile-dropdown .profile-name {
    padding: 10px 14px 2px;
    font-weight: 600;
    color: #4fc3dc;
}

/* Profile username in dropdown */
.user-controls .user-profile .profile-dropdown .profile-username {
    padding: 0 14px 10px;
    font-size: 12px;
    color: #888;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 5px;
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: 7px;
    background-color: #ff9800;
    color: #1a1a1a;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
}

/* Mobile Logo Images (tablets and phones) */
@media (max-width: 768px) {
    /* Position logo right next to menu */
    .top-nav .brand {
        margin-left: 8px;
        flex-shrink: 0;
    }
    
    /* Brand/Logo - use images instead of text on mobile */
    .brand a {
        font-size: 0;
        width: 95px;
        height: 38px;
        min-width: 95px;
        background-image: url('../images/Terzon-logo-lightmode.png');
        background-repeat: no-repeat;
        background-position: left center;
        background-size: contain;
        -webkit-background-clip: unset;
        background-clip: unset;
        animation: none;
    }

    /* Dark mode mobile: use dark mode logo */
    body.dark .brand a {
        background-image: url('../images/Terzon-logo-darkmode.png');
    }
    
    /* Profile icon on mobile */
    .user-profile {
        display: flex;
        position: relative;
        cursor: pointer;
        z-index: 1000;
    }
    
    .user-profile .profile-icon {
        cursor: pointer;
        pointer-events: auto;
    }
    
    /* Profile dropdown on mobile */
    .user-profile .profile-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        min-width: 200px;
        background: #1f1f1f;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        padding: 10px 0;
        z-index: 2000;
        display: none;
    }
    
    .user-profile .profile-dropdown.show {
        display: block;
    }
    
    /* Light mode dropdown */
    body:not(.dark) .user-profile .profile-dropdown {
        background: #ffffff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
    
    .user-profile .profile-dropdown a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        color: inherit;
        text-decoration: none;
        transition: background 0.2s ease;
    }
    
    .user-profile .profile-dropdown a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    body:not(.dark) .user-profile .profile-dropdown a:hover {
        background: rgba(0, 0, 0, 0.05);
    }
}

/* Responsive adjustments - smaller phones */
@media (max-width: 480px) {
    /* Top navigation */
    .top-nav {
        height: 42px;
        padding: 0 5px;
    }
    /* Clothing page only: move the bar up by 1px */
    body.clothing-page .top-nav {
        top: -1px;
    }
    /* Manual payment: move the bar up by 1px to match clothing */
    body.manual-payment-page .top-nav {
        top: -1px;
    }
    /* Manual payment: match clothing brand alignment on mobile */
    body.manual-payment-page.has-consistent-header .top-nav .brand {
        margin-left: 4px;
    }
    
    /* Menu toggle */
    .menu-toggle {
        font-size: 16px;
    }
    
    /* Logo size on very small screens */
    .brand a {
        width: 85px;
        height: 32px;
        min-width: 85px;
    }
    
    .top-nav .brand {
        margin-left: 6px;
    }

    /* Manual payment: disable click on logo */
    body.manual-payment-page .brand a {
        pointer-events: none;
        cursor: default;
    }

    /* Mobile: nudge logo slightly to the right (override default -10px) */
    body.has-consistent-header .top-nav .brand {
        margin-left: 4px;
    }
    
    /* User controls */
    .user-controls {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }
    
    /* Sign-in */
    .nav-signin {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: 2px;
        font-size: 14px;
    }
    
    .nav-signin i {
        display: inline-block; /* Show icon on mobile */
        font-size: 14px;
    }
    
    .nav-signin span {
        font-size: 13px;
        font-weight: 500;
        display: inline-block; /* Show text on mobile */
        letter-spacing: 0;
    }
    
    .user-profile .username {
        display: none;
    }
    
    /* Cart icon */
    .nav-cart {
        font-size: 18px;
        margin-left: 0;
        margin-right: 5px;
    }
    
    /* Cart counter */
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
    
    /* Sidebar menu */
    .sidebar_menu .menu ul li a {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* Sidebar Menu and Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
    transition: opacity 0.25s ease;
}

/* When hiding, fade out before display:none is removed via JS */
.overlay.fading {
    opacity: 0;
}

.sidebar_menu {
    width: 280px;
    height: 100%;
    position: fixed;
    left: -280px;
    top: 0;
    background: #fff;
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

body.dark .sidebar_menu {
    background: #1a1a1a;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar_menu.active {
    left: 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
}

body.dark .sidebar_menu.active {
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.4);
}

/* Menu header and close button styling */
.menu-header {
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    position: relative;
    margin-bottom: 10px;
}

.sidebar-close {
    font-size: 22px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

body.dark .sidebar-close {
    color: #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sidebar-close:hover {
    transform: rotate(90deg);
}

body.dark .sidebar-close:hover {
    transform: rotate(90deg);
}

.sidebar_menu .menu {
    width: 100%;
    margin-top: 0;
    padding-top: 15px;
}

.sidebar_menu .menu::before {
    content: "terzon";
    display: block;
    color: #5c6bc0;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 20px;
    letter-spacing: 1px;
}

body.dark .sidebar_menu .menu::before {
    color: #7986cb;
}

.sidebar_menu .menu ul {
    list-style-type: none;
    padding: 0;
}

.sidebar_menu .menu ul li {
    margin-bottom: 8px;
}

.sidebar_menu .menu ul li a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

body.dark .sidebar_menu .menu ul li a {
    color: #e0e0e0;
}

.sidebar_menu .menu ul li a:hover,
.sidebar_menu .menu ul li a.active {
    background-color: #f0f0f0;
    color: #3f51b5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

body.dark .sidebar_menu .menu ul li a:hover,
body.dark .sidebar_menu .menu ul li a.active {
    background-color: #252525;
    color: #7986cb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body.dark .sidebar_menu .menu ul li a.active {
    border-left: 4px solid #5c6bc0;
    font-weight: 600;
}

.sidebar_menu .menu ul li a i {
    margin-right: 12px;
    color: #3f51b5;
    width: 25px;
    display: inline-block;
    text-align: center;
}

.sidebar_menu .social_media {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.sidebar_menu .social_media a {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin: 0 5px;
    color: #5c6bc0;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sidebar_menu .social_media a:hover {
    color: #7986cb;
    background-color: #252525;
}

/* User Profile in Navigation Bar */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-right: 15px;
}

.user-profile .username {
    margin-right: 8px;
    font-weight: 500;
    color: #333;
}

body.dark .user-profile .username {
    color: #f5f5f5;
}

.user-profile .profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #333;
    font-size: 16px;
    border: 2px solid #f5f5f5;
}

body.dark .user-profile .profile-icon {
    background-color: #555;
    color: #f5f5f5;
    border-color: #333;
}

.profile-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border-radius: 10px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

body.dark .profile-dropdown {
    background-color: #333;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.profile-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

body.dark .profile-dropdown a {
    color: #f5f5f5;
}

.profile-dropdown a:hover {
    background-color: #f5f5f5;
}

body.dark .profile-dropdown a:hover {
    background-color: #444;
}

/* Animated cosmic gradient text effect for dark mode navigation */
@keyframes cosmic-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Fix close button transformation */
body.dark .menu-toggle.close i::before {
  content: "\f00d"; /* fa-times (X) icon */
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Add animated icons for navigation */
.nav-signin i, 
.nav-signup i {
    background: linear-gradient(120deg, #3f51b5, #7e57c2, #5c6bc0, #7986cb);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    /* animation moved to product-dark-colors.css */
}

body.dark .nav-signin i, 
body.dark .nav-signup i,
body.dark .nav-signin i::before,
body.dark .nav-signup i::before,
body.dark .auth-links .nav-signin i,
body.dark .auth-links .nav-signup i,
body.dark .auth-links .nav-signin i::before,
body.dark .auth-links .nav-signup i::before,
body.dark .top-nav .auth-links .nav-signin i,
body.dark .top-nav .auth-links .nav-signup i,
body.dark .top-nav .auth-links .nav-signin i::before,
body.dark .top-nav .auth-links .nav-signup i::before,
body.dark .fa-sign-in-alt,
body.dark .fa-user-plus,
body.dark .nav-signin .fa-sign-in-alt::before,
body.dark .nav-signup .fa-user-plus::before {
    /* White icons in dark mode - no gradient animation */
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    animation: none !important;
}

/* Keep text (not icons) in their original colors */
.nav-signin span, 
.nav-signup span {
    background: none;
    /* no animation needed */
}

body.dark .nav-signin span, 
body.dark .nav-signup span {
    color: #f5f5f5;
}

body:not(.dark) .nav-signin span, 
body:not(.dark) .nav-signup span {
    color: #333;
}

body:not(.dark) .nav-signup span {
    color: white;
}

/* Apply the blue and purple gradient animation to the shopping cart icon in light mode */
body:not(.dark) .nav-cart i.fas.fa-shopping-cart {
    background: linear-gradient(120deg, #3f51b5, #8e24aa, #5c6bc0, #9c27b0);
    background-size: 300% 300%;
    animation: gradientMove 8s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Make sure the cart count stays visible */
body:not(.dark) .nav-cart .cart-count {
    background-color: #ff9800;
    color: #1a1a1a;
}

/* Empty Cart Toast Message */
.empty-cart-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.empty-cart-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.empty-cart-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1a1a2e, #232342);
    color: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.empty-cart-toast .toast-content i {
    font-size: 24px;
    color: #fbbf24;
}

.empty-cart-toast .toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empty-cart-toast .toast-text strong {
    font-size: 14px;
    color: #fff;
}

.empty-cart-toast .toast-text span {
    font-size: 12px;
    color: #9ca3af;
}

/* Light mode toast */
body:not(.dark):not(.dark-mode) .empty-cart-toast .toast-content {
    background: linear-gradient(135deg, #fff, #f8fafc);
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.dark):not(.dark-mode) .empty-cart-toast .toast-text strong {
    color: #1f2937;
}

body:not(.dark):not(.dark-mode) .empty-cart-toast .toast-text span {
    color: #6b7280;
}

@media (max-width: 480px) {
    .empty-cart-toast {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }
    
    .empty-cart-toast .toast-content {
        width: 100%;
    }
}

/* Dark mode styles were removed at user request */
