/* Auth Modal Styles */
.auth-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.auth-overlay.active {
    display: flex;
}

.auth-modal {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.auth-modal__close:hover {
    color: #333;
}

.auth-modal__title {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.auth-modal__subtitle {
    color: #666;
    margin-bottom: 30px;
}

.auth-form__group {
    margin-bottom: 20px;
}

.auth-form__label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.auth-form__input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.auth-form__input:focus {
    outline: none;
    border-color: #6B8E23;
}

.auth-form__error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.auth-form__error.active {
    display: block;
}

.auth-form__button {
    width: 100%;
    padding: 14px;
    background: #6B8E23;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-form__button:hover {
    background: #5a7a1e;
}

.auth-form__button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-form__switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-form__switch a {
    color: #6B8E23;
    text-decoration: none;
    font-weight: 600;
}

.auth-form__switch a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.auth-message.active {
    display: block;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.password-requirements {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
    user-select: none;
}

.password-toggle-icon:hover {
    color: #333;
}

.auth-form__input.with-icon {
    padding-right: 45px;
}

.nav-auth-buttons {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.btn-auth {
    padding: 8px 16px;
    border: 1px solid #6B8E23;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    font-size: 14px;
}

.btn-login {
    color: #6B8E23;
}

.btn-login:hover {
    background: #6B8E23;
    color: white;
}

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

.btn-register:hover {
    background: #5a7a1e;
}

.user-menu {
    display: none;
    position: relative;
    margin-left: 20px;
}

.user-menu.active {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Shopping Cart Button */
.cart-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6B8E23 0%, #8FBC2F 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.2);
}

.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.3);
    background: linear-gradient(135deg, #5a7a1e 0%, #7aa625 100%);
}

.cart-button:active {
    transform: translateY(0);
}

.cart-button i {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 10px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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

.user-menu__button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #6B8E23;
    border-radius: 4px;
    color: #6B8E23;
    cursor: pointer;
    font-size: 14px;
}

.user-menu__button:hover {
    background: #6B8E23;
    color: white;
}

.user-menu__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
}

.user-menu__dropdown.active {
    display: block;
}

.user-menu__item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    transition: all 0.3s;
}

.user-menu__item:last-child {
    border-bottom: none;
}

.user-menu__item:hover {
    background: #f5f5f5;
}

.user-menu__item i {
    width: 18px;
    color: #6B8E23;
    font-size: 16px;
}

.user-menu__item--logout {
    color: #dc3545;
}

.user-menu__item--logout:hover {
    background: #fff5f5;
}

.user-menu__item--logout i {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-auth-buttons {
        margin-left: 10px;
    }

    .btn-auth {
        padding: 6px 12px;
        font-size: 13px;
    }

    .auth-modal {
        padding: 30px 20px;
    }
}
