:root {
    --background-light: #f9fafb;
    --border-light: #e5e7eb;
    --foreground-light: #111827;
    --background-dark: #0F121B;
    --border-dark: #1a1e2a;
    --foreground-dark: #ffffff;
    --accent: #6366f1;
    --accent-alt: #c4ad70;
    --accent-alt2: #2d0022;
    --accent-foreground: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-dark);
    color: var(--foreground-dark);
}

body.mobile-nav-open {
    overflow: hidden;
}

.header *,
.navbar *,
.nav *,
.topbar * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

.header a,
.header button,
.navbar a,
.navbar button,
.nav a,
.nav button {
    cursor: pointer !important;
}

.header {
    width: 100%;
    background: var(--background-dark);
    border-bottom: 1px solid var(--border-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
}

.logo-text {
    font-weight: bold;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
}

.logo-accent {
    font-weight: bold;
    font-size: 1.75rem;
    color: var(--accent-alt);
}

.logo-main {
    color: var(--foreground-dark);
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--foreground-dark);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

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

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--background-dark);
    border-left: 1px solid var(--border-dark);
    padding: 1rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 1.5rem;
}

.close-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    position: relative;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.close-line {
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: var(--foreground-dark);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.close-line:nth-child(1) {
    transform: rotate(45deg);
}

.close-line:nth-child(2) {
    transform: rotate(-45deg);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mobile-nav a {
    color: var(--foreground-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-dark);
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--accent-alt);
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-auth-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.nav {
    display: none;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
        gap: 2rem;
    }
    
    .nav a {
        color: var(--foreground-dark);
        text-decoration: none;
        transition: color 0.3s ease;
        font-size: 1.1rem;
    }
    
    .nav a:hover {
        color: var(--accent-alt);
    }
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn.ghost {
    background: transparent;
    color: var(--foreground-dark);
}

.btn.ghost:hover {
    color: var(--accent-alt);
    background: rgba(255, 255, 255, 0.05);
}

.btn.outline {
    border: 1px solid var(--accent-alt);
    color: var(--accent-alt);
    background: transparent;
}

.btn.outline:hover {
    background: var(--accent-alt);
    color: var(--accent-foreground);
}

.topbar {
    background-color: var(--background-dark);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-dark);
    font-size: 14px;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.topbar-left {
    flex: 1;
    justify-content: flex-start;
    padding-left: 21.5rem;
}

.topbar-right {
    flex: 1;
    justify-content: flex-end;
    padding-right: 21rem;
    gap: 2rem;
}

.email-link,
.icon-link,
.notification-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground-dark);
    text-decoration: none;
    height: 32px;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 0 8px;
}

.email-link {
    gap: 8px;
    min-width: auto;
    white-space: nowrap;
}

.email-link:hover,
.icon-link:hover {
    color: var(--accent-alt);
    background-color: rgba(255, 255, 255, 0.05);
}

.email-link span {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.icon-link {
    min-width: 32px;
    width: 32px;
    transition: all 0.2s ease;
}

.icon-link:hover {
    transform: scale(1.05);
}

.icon-link:hover .icon {
    filter: invert(0.7) sepia(1) saturate(5) hue-rotate(180deg);
}

.icon {
    width: 18px;
    height: 18px;
    filter: invert(1);
    transition: filter 0.2s ease;
    display: block;
    flex-shrink: 0;
}

.icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.cart-link {
    margin-right: 0;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--accent-alt);
    color: #ffffff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-badge.loading {
    background-color: #666;
    animation: pulse 1.5s ease-in-out infinite;
}

.notifications-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 32px;
}

.notification-btn {
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    height: 32px;
    min-width: 48px;
    font-size: 14px;
    color: var(--foreground-dark);
}

.notification-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--foreground-dark);
    line-height: 1;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.notification-btn:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.email-link:focus,
.icon-link:focus,
.notification-btn:focus {
    outline: 2px solid var(--accent-alt);
    outline-offset: 2px;
    border-radius: 4px;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@media (max-width: 1400px) {
    .topbar-left {
        padding-left: 15rem;
    }
    .topbar-right {
        padding-right: 15rem;
    }
}

@media (max-width: 1200px) {
    .topbar-left {
        padding-left: 10rem;
    }
    .topbar-right {
        padding-right: 10rem;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .topbar-left {
        padding-left: 5rem;
    }
    .topbar-right {
        padding-right: 5rem;
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    
    .mobile-nav-overlay {
        display: block;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .topbar {
        padding: 0 1rem;
        font-size: 13px;
        height: 44px;
    }
    
    .topbar-left {
        padding-left: 0;
    }
    
    .topbar-right {
        padding-right: 0;
        gap: 1rem;
    }
    
    .email-link span {
        display: none;
    }
    
    .icon {
        width: 16px;
        height: 16px;
    }
    
    .icon-link,
    .icon-wrapper {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
    
    .notification-btn {
        height: 28px;
        min-width: 40px;
        padding: 4px 8px;
    }
    
    .logo-text,
    .logo-accent {
        font-size: 1.5rem;
    }
    
    .nav a {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 0 0.75rem;
        height: 40px;
    }
    
    .topbar-right {
        gap: 0.75rem;
    }
    
    .notification-btn {
        padding: 2px 6px;
        min-width: 36px;
    }
    
    .icon {
        width: 14px;
        height: 14px;
    }
    
    .icon-link,
    .icon-wrapper {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }
    
    .logo-text,
    .logo-accent {
        font-size: 1.3rem;
    }
    
    .nav a {
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.35rem 0.7rem;
    }
}
