/* Login modal – show when guest tries cart/account/add-to-cart */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.login-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.login-modal {
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    position: relative;
}
.login-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #616161;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.login-modal-close:hover {
    background: #f5f5f5;
    color: #212121;
}
.login-modal-inner {
    padding: 24px 24px 28px;
}
.login-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212121;
    margin: 0 0 8px 0;
}
.login-modal-subtitle {
    font-size: 0.875rem;
    color: #757575;
    margin: 0 0 20px 0;
}
.login-modal .form-group {
    margin-bottom: 16px;
}
.login-modal .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #424242;
    margin-bottom: 6px;
}
.login-modal .form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
}
.login-modal .form-input:focus {
    outline: none;
    border-color: var(--primary, #7B1FA2);
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.15);
}
.login-modal .form-error {
    display: block;
    font-size: 0.8rem;
    color: #c62828;
    margin-top: 4px;
}
.login-modal-otp-step {
    display: none;
}
.login-modal-otp-step.is-visible {
    display: block;
}
.login-modal-email-step.is-hidden {
    display: none;
}
.login-modal-otp-sent {
    font-size: 0.875rem;
    color: #424242;
    margin-bottom: 16px;
}
.login-modal-otp-sent strong { color: #212121; }
.login-modal-otp-digits {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.login-modal-otp-digits input {
    width: 48px;
    height: 48px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}
.login-modal-otp-digits input:focus {
    outline: none;
    border-color: var(--primary, #7B1FA2);
}
.login-modal .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
}
.login-modal .btn-primary {
    background: var(--primary, #7B1FA2);
    color: #fff;
}
.login-modal .btn-primary:hover:not(:disabled) {
    background: var(--primary-dark, #6A1B9A);
}
.login-modal .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.login-modal .btn-secondary {
    background: #f5f5f5;
    color: #424242;
}
.login-modal .btn-secondary:hover {
    background: #eee;
}
.login-modal-change-email {
    margin-top: 12px;
}
