/* ========== ОСНОВНЫЕ СТИЛИ САЙТА ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f9f7f5;
    color: #2d2d2d;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Кнопки авторизации */
.auth-buttons {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.auth-btn {
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.login-btn {
    background: #f0f0f0;
    color: #1a2b4c;
    border: 1px solid #e0e0e0;
}

.login-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.register-btn {
    background: #ff6b82;
    color: white;
}

.register-btn:hover {
    background: #ff4d6d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 130, 0.3);
}

/* Меню пользователя */
.user-menu {
    display: flex;
    gap: 5px;
    align-items: center;
}

.user-btn {
    background: #1a2b4c;
    color: white;
    padding: 10px 20px;
}

.user-btn:hover {
    background: #2f3f60;
}

.logout-btn {
    background: #f0f0f0;
    color: #1a2b4c;
    padding: 10px 15px;
}

.logout-btn:hover {
    background: #ff6b82;
    color: white;
}

/* Корзина */
.cart {
    background: #f0f0f0;
    padding: 10px 20px;
    border-radius: 40px;
    margin-left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.cart:hover {
    background: #ffe074;
}

.cart i {
    color: #ff6b82;
    font-size: 20px;
}

.cart-count {
    background: #ff6b82;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.cart-count.pulse {
    animation: cartPulse 0.3s ease;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Мобильная навигация */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 8px 0;
    border-radius: 20px 20px 0 0;
}

.mobile-nav .container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    padding: 0 5px;
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 11px;
    padding: 5px;
    transition: 0.2s;
    position: relative;
}

.mobile-nav a.active {
    color: #ff6b82;
}

.mobile-nav a i {
    font-size: 20px;
    margin-bottom: 3px;
}

.mobile-cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff6b82;
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 9px;
    min-width: 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.mobile-cart-count.pulse {
    animation: cartPulse 0.3s ease;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    max-width: 350px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 12px 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    display: none;
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification i {
    font-size: 18px;
}

.notification.success i {
    color: #4caf50;
}

.notification.error i {
    color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптация для планшетов */
@media screen and (max-width: 1024px) {
    .auth-buttons {
        order: 4;
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 8px;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 15px 0 0;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .header,
    .nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: block;
    }
    
    main {
        margin-bottom: 70px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}