/* Стили для пиктограмм входа и корзины */
.header-icons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 10px;
    gap: 15px;
    padding-left: 20px;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    padding: 3px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.1);
    width: 22px;
    height: 20px;
    position: relative;
}

.icon-btn:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #1a237e;
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.9);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Стили для маленького аватара пользователя (замена иконки входа) */
.user-avatar-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 10px;
    border: 1.5px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.icon-btn:hover .user-avatar-small {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .header-icons {
        justify-content: center;
        margin-bottom: 8px;
        padding-left: 0;
    }
    
    .icon-btn {
        width: 20px;
        height: 20px;
        padding: 5px;
    }
    
    .cart-badge {
        width: 10px;
        height: 10px;
        font-size: 6px;
        top: -3px;
        right: -3px;
    }
    
    .user-avatar-small {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
}

/* Стили для выпадающего меню пользователя */
/* Стили для выпадающего меню пользователя */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 4px 0;
    width: auto;
    min-width: 120px;
    z-index: 1000;
    animation: fadeInDown 0.2s ease-out;
    margin-top: 5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(255,255,255,1);
    color: #1a237e;
}

.dropdown-item svg {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
}

/* Анимация появления */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Контейнер для кнопки с относительным позиционированием */
.header-icons {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 10px;
    gap: 15px;
    padding-left: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .user-dropdown-menu {
        min-width: 110px;
        right: -10px;
    }
    
    .dropdown-item {
        padding: 5px 10px;
        font-size: 11px;
        gap: 6px;
    }
}

/* Стили для бейджа с буквой пользователя */
.user-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    border: 1.5px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

/* Анимация пульсации как у корзины */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Убедимся, что кнопка логина имеет relative позиционирование */
.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    padding: 3px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.1);
    width: 22px;
    height: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .user-badge {
        width: 10px;
        height: 10px;
        font-size: 7px;
        top: -3px;
        right: -3px;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #1a237e;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.forgot-password {
    color: #1a237e;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #1a237e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #303f9f;
}

.register-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.register-link a {
    color: #1a237e;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Стили для сообщений об ошибках */
.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error input {
    border-color: #d32f2f;
}