/* Header Styles */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header.hidden {
    transform: translateY(-100%);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.header-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1;
}

.logo-subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    font-weight: 400;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #007AFF;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #007AFF;
    background-color: #e3f2fd;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Cart */
.cart-wrapper {
    position: relative;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: auto;
}

.cart-link:hover {
    background-color: #007AFF;
    color: white;
    border-color: #007AFF;
    transform: translateY(-1px);
}

.cart-icon {
    font-size: 16px;
}

.cart-count {
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
}

.cart-count:empty {
    display: none;
}

.cart-text {
    font-size: 13px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f8f9fa;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e9ecef;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-link {
    color: #333;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: #007AFF;
    color: white;
}

/* Mobile Cart Styles */
.mobile-cart {
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
    padding-top: 10px;
}

.cart-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.cart-mobile-link:hover {
    background-color: #007AFF;
    color: white;
    border-color: #007AFF;
}

.cart-mobile-link .cart-count {
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
}

.cart-mobile-link:hover .cart-count {
    background-color: #ffffff;
    color: #007AFF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-subtitle {
        font-size: 11px;
    }
    
    .cart-text {
        display: none;
    }
    
    .cart-link {
        padding: 4px 8px;
        gap: 4px;
    }
    
    .cart-icon {
        font-size: 14px;
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
        min-width: 16px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .cart-link {
        padding: 3px 6px;
        font-size: 12px;
        min-width: auto;
        white-space: nowrap;
        gap: 3px;
    }
    
    .cart-icon {
        font-size: 14px;
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 9px;
        min-width: 16px;
    }
    
    .cart-text {
        display: none;
    }
}

@media (max-width: 360px) {
    .header-container {
        padding: 0 8px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-subtitle {
        font-size: 10px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .cart-link {
        padding: 2px 4px;
        gap: 2px;
    }
    
    .cart-icon {
        font-size: 12px;
    }
    
    .cart-count {
        width: 14px;
        height: 14px;
        font-size: 8px;
        min-width: 14px;
    }
    
    .cart-text {
        display: none;
    }
    
    .mobile-menu-toggle {
        padding: 6px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
}

/* Animation for cart click */
.cart-link.clicked {
    transform: scale(0.95);
}

/* Body padding to account for fixed header */
body {
    padding-top: 70px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
}

/* Prevent menu open body scroll */
body.menu-open {
    overflow: hidden;
}