/* Shared Navbar  */

.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ── Container ── */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 40px;
}

/* ── Logo ── */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo .logo-text {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #171717;
}

.nav-logo .logo-text strong {
    font-weight: 700;
}

/* Hide old SVG icon if it still exists */
.logo-icon {
    display: none;
}

/* ── Nav links (center) ── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-right: auto;
}

.nav-links > a {
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    text-decoration: none;
    transition: color 0.15s ease;
    padding: 4px 0;
}

.nav-links > a:hover {
    color: #171717;
}

/* ── Right actions ── */
.nav-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#nav-guest,
#nav-auth {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sign In / Logout text link */
.nav-link-login {
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link-login:hover {
    color: #171717;
    background: #f5f5f5;
}

/* Orders button */
.nav-orders-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    color: #525252;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.nav-orders-btn:hover {
    color: #171717;
    background: #f5f5f5;
}

/* Cart button */
.nav-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #525252;
    transition: color 0.15s ease, background 0.15s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-cart-btn:hover {
    color: #171717;
    background: #f5f5f5;
}

.nav-cart-count {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #0a0a0a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* Primary CTA button */
.btn-nav {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: #0a0a0a;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.btn-nav:hover {
    background: #262626;
}

/* Profile */
.nav-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #525252;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-profile-btn:hover {
    color: #171717;
    background: #f5f5f5;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Mobile menu button ── */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.mobile-menu-btn:hover {
    background: #f5f5f5;
}

.mobile-menu-btn span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: #171717;
    transition: all 0.25s ease;
    border-radius: 1px;
}

/* ── Step indicator (create/cart pages) ── */
.nav-steps ~ .nav-links {
    display: none;
}

.nav-steps {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 3px;
}

.nav-steps .step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    color: #a3a3a3;
    transition: all 0.2s ease;
    font-size: 13px;
}

.nav-steps .step.active {
    background: #0a0a0a;
    color: #fff;
}

.nav-steps .step.active .step-number {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.nav-steps .step.completed {
    color: #171717;
}

.nav-steps .step.completed .step-number {
    color: #171717;
}

.nav-steps .step.completed .step-number svg {
    width: 14px;
    height: 14px;
}

.step-number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
}

.step-connector {
    width: 16px;
    height: 1px;
    background: #e5e5e5;
}

.step-connector.completed {
    background: #171717;
}

/* ── Mobile-only elements (hidden on desktop) ── */
.mobile-auth-links,
.mobile-cta-btn {
    display: none;
}

.mobile-user-greeting {
    display: block;
    padding: 10px 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #171717;
}

/* responsive */

@media (max-width: 900px) {
    .nav-container {
        gap: 24px;
        padding: 0 20px;
    }

    #nav-guest,
    #nav-auth {
        gap: 4px;
    }

    .nav-orders-btn {
        padding: 6px 8px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 8px 16px 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        border-top: 1px solid #e5e5e5;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > a {
        padding: 12px 0;
        font-size: 15px;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-links > a:last-of-type {
        border-bottom: none;
    }

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

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-profile-btn,
    .nav-orders-btn {
        display: none;
    }

    .mobile-auth-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid #e5e5e5;
        margin-top: 4px;
    }

    .mobile-auth-links a {
        padding: 12px 0;
        font-size: 15px;
        font-weight: 500;
        color: #525252;
        border-bottom: 1px solid #f5f5f5;
        text-decoration: none;
    }

    .mobile-auth-links a:last-child {
        border-bottom: none;
    }

    .mobile-auth-links a:hover {
        color: #171717;
    }

    .mobile-cta-btn {
        display: block;
        padding: 12px 0;
        font-size: 15px;
        font-weight: 600;
        color: #171717;
        text-decoration: none;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-steps {
        display: none;
    }

    .nav-actions {
        gap: 4px;
    }

    .btn-nav {
        display: none;
    }

    .nav-link-login {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
}
