/* Improved Navbar Design with Better Spacing and Alignment */

/* Reset navbar styles */
.navbar {
    position: fixed;
    top: 40px; /* Account for announcement bar height */
    left: 0;
    right: 0;
    height: 70px !important;
    max-height: 70px !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
}

/* Container should fill the navbar height */
.navbar .container {
    height: 70px !important;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

/* Nav wrapper with proper spacing */
.nav-wrapper {
    width: 100%;
    height: 70px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px; /* Add proper spacing between logo, menu, and actions */
}

/* Logo styling with perfect vertical alignment */
.nav-logo {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
}

.nav-logo .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    height: 100%;
    padding: 0;
    line-height: 1;
}

.logo-icon {
    font-size: 1.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.8rem; /* Match font-size for perfect alignment */
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    height: 1.5rem; /* Match font-size for perfect alignment */
    display: flex;
    align-items: center;
}

/* Nav menu with proper centering and spacing */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem; /* Better spacing between menu items */
    height: 100%;
    flex: 1;
    justify-content: center; /* Center the menu items */
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}

.nav-link span {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #1a1a1a;
}

/* Remove underline effect - commented out
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: scaleX(1);
}
*/

/* Nav actions with proper alignment */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    flex-shrink: 0;
}

.nav-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
}

.nav-actions button:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.nav-actions button svg {
    width: 20px;
    height: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

/* Fix hero section spacing - account for announcement bar + navbar */
.hero {
    margin-top: 110px !important; /* 40px announcement + 70px navbar */
    padding-top: 0 !important;
}

/* Style announcement bar to be fixed at top */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    margin: 0;
    padding: 10px 0;
    height: 40px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%); /* Orange to red gradient matching theme */
    color: white;
}

/* When announcement bar is closed, adjust navbar and hero */
body.announcement-closed .navbar {
    top: 0 !important;
}

body.announcement-closed .hero {
    margin-top: 70px !important; /* Only navbar height */
}

/* Checkout page specific styling */
.checkout-actions {
    gap: 1.5rem;
}

.checkout-security {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 500;
}

.checkout-security svg {
    color: #10b981;
}

/* Checkout Progress Styling - Removed, now in cart.css and checkout.css for better control */

/* Cart Section Styling */
.cart-section {
    margin-top: 0.5rem; /* Add spacing after checkout progress for cart page */
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    gap: 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    text-align: center;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.3s ease;
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step.active .step-number {
    background: #f97316;
    color: white;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.step span {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.step.completed span,
.step.active span {
    color: #374151;
    font-weight: 600;
}

.step-line {
    height: 2px;
    flex: 1;
    background: #e5e7eb;
    margin: 0 0.5rem;
    border-radius: 1px;
}

.step-line.completed {
    background: #10b981;
}

/* Mobile toggle button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #666;
    transition: all 0.3s;
    display: block;
}

/* Responsive design */
@media (max-width: 1200px) {
    .nav-wrapper {
        gap: 40px;
    }
    
    .nav-menu {
        gap: 1.8rem;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        padding: 12px;
        justify-content: flex-start;
    }
    
    .nav-wrapper {
        gap: 20px;
    }
}

/* Fix alignment issues */
* {
    box-sizing: border-box;
}

/* Ensure body has proper padding for fixed navbar */
body {
    padding-top: 110px; /* 40px announcement bar + 70px navbar */
    margin-top: 0;
}

/* Special handling for pages with their own spacing calculations */
body.homepage,
body.product-detail-page,
body.checkout-page,
body.cart-page {
    padding-top: 0;
}