/* ============================================================
   ORABELLAS - MI CUENTA (PERFIL)
   ============================================================ */

/* ============================================================
   PROFILE PAGE CONTAINER
   ============================================================ */
.profile-page {
    width: 100%;
}

.site-content .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* ============================================================
   PROFILE HEADER
   ============================================================ */
.profile-header {
    background: var(--orabellas-bg);
    padding: 30px 0;
    color: var(--orabellas-text);
    border-radius: 0 0 var(--orabellas-radius-lg) var(--orabellas-radius-lg);
    box-shadow: 5px 5px 10px #AEAEC033;
}

.profile-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-header-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-title h1 {
    color: var(--orabellas-text);
    font-size: 30px;
    font-weight: 600;
    margin: 0;
    line-height: 1;
}

/* Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    background: rgba(245, 237, 216, 0.15);
    border-radius: var(--orabellas-radius);
    padding: 4px;
    width: fit-content;
}

.profile-tabs .tab {
    padding: 15px 30px;
    border: 1px solid;
    background: transparent;
    color: var(--orabellas-primary);
    font-size: 18px;
    font-weight: 500;
    border-radius: var(--orabellas-radius);
    cursor: pointer;
    transition: var(--orabellas-transition);
    white-space: nowrap;
}

.profile-tabs .tab:hover {
    background: rgba(245, 237, 216, 0.1);
}

.profile-tabs .tab.active {
    background: var(--orabellas-primary);
    color: var(--orabellas-cream);
    font-weight: 600;
}

/* ============================================================
   PROFILE CONTENT / GRID
   ============================================================ */
.profile-content {
    padding: 40px 0 60px;
}

.profile-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.profile-sidebar {
    background: var(--orabellas-bg);
    border-radius: var(--orabellas-radius-lg);
    border: 1px solid var(--orabellas-white);
    box-shadow: var(--orabellas-shadow-card);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Avatar */
.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    position: relative;
    width: 205px;
    height: 205px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%
}

.avatar .edit-avatar {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--orabellas-cream);
    color: var(--orabellas-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--orabellas-transition);
    padding: 0;
    box-shadow: 0 0px 2px #00000040;
}

.avatar .edit-avatar:hover {
    transform: scale(1.1);
}

.avatar .edit-avatar svg {
    width: 20px;
    height: 20px;
}

/* Logout button */
.logout-btn {
    width: 100%;
    padding: 15px 30px;
    background: var(--orabellas-cream-light);
    border: 1px solid var(--orabellas-primary);
    border-radius: var(--orabellas-radius);
    color: var(--orabellas-primary);
    font-size: 18px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    transition: var(--orabellas-transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: var(--orabellas-primary);
    color: var(--orabellas-cream);
}

/* ============================================================
   FORM CARD
   ============================================================ */
.profile-form-card {
    background: var(--orabellas-bg);
    border-radius: var(--orabellas-radius-lg);
    border: 1px solid var(--orabellas-white);
    box-shadow: var(--orabellas-shadow-card);
    padding: 40px;
}

.profile-form-card form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form rows */
.form-row {
    display: flex;
    padding: 0px !important;
    margin: 0px !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.form-row .full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.form-group label {
    font-weight: 500 !important;
    font-size: 14px !important;
    color: var(--orabellas-text);
    line-height: 1 !important;
}

.form-group input,
.form-group select {
    border: none;
    border-radius: var(--orabellas-radius) !important;
    font-weight: 400;
    font-size: 16px;
    width: 100%;
    background: var(--orabellas-white);
    transition: var(--orabellas-transition);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--orabellas-primary) !important; 
    outline: none;
    box-shadow: 0 0 0 2px rgba(155, 28, 46, 0.1);
}

.form-group input.error {
    border-color: #dc3232;
}

.form-group input.success {
    border-color: #28a745;
}

/* Phone input with intl-tel-input */
.form-group .phone-input {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.form-group .phone-input select {
    width: auto;
    min-width: 120px;
    flex-shrink: 0;
}

.form-group .phone-input input {
    flex: 1;
}

/* intl-tel-input overrides */
.iti {
    width: 100%;
}

.iti__country-list {
    z-index: 9999;
    border-radius: var(--orabellas-radius);
    border: 1px solid #ddd;
}

.iti__selected-flag {
    border-radius: var(--orabellas-radius) 0 0 var(--orabellas-radius);
    background: #f8f8f8;
}

.iti__selected-flag:hover {
    background: #f0f0f0;
}

.iti__flag-container {
    border-radius: var(--orabellas-radius) 0 0 var(--orabellas-radius);
}

.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
    background: #f0f0f0;
}

/* Verify links */
.verify-link {
    font-size: 12px;
    color: var(--orabellas-primary);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 2px;
    transition: var(--orabellas-transition);
}

.verify-link:hover {
    color: var(--orabellas-primary-hover);
}

/* Divider */
.profile-form-card hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

/* Password section */
.password-section {
    display: flex;
    justify-content: flex-start;
}

.password-section a {
    color: var(--orabellas-primary);
    font-weight: 500;
    font-size: 15px;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--orabellas-transition);
}

.password-section a:hover {
    color: var(--orabellas-primary-hover);
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.save-btn {
    padding: 15px 30px;
    background: var(--orabellas-primary);
    border: 1px solid var(--orabellas-cream);
    border-radius: var(--orabellas-radius);
    color: var(--orabellas-cream);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--orabellas-transition);
}

.save-btn:hover {
    background: var(--orabellas-cream) !important;
    color: var(--orabellas-primary) !important;
    border-color: var(--orabellas-primary) !important;
}

/* Success/Error messages */
.profile-message {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    display: none;
}

.profile-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.profile-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================================
   MODAL - CAMBIO DE CONTRASEÑA
   ============================================================ */
.password-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.password-modal-overlay.active {
    display: flex;
}

.password-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 570px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-modal h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px;
}

.password-modal p.modal-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 25px;
}

.password-modal .form-group {
    margin-bottom: 18px;
}

.password-modal .form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    display: block;
}

.password-modal .form-group input {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    font-family: "IBM Plex Serif", Sans-serif;
}

.password-modal .form-group input:focus {
    border-color: #9B1C2E;
    outline: none;
    box-shadow: 0 0 0 2px rgba(155, 28, 46, 0.1);
}

.password-modal .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.password-modal .modal-actions button {
    flex: 1;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "IBM Plex Serif", Sans-serif;
}

.password-modal .btn-cancel {
    background: #F5EDD8;
    border: 1px solid #7a1523;
    color: #7a1523;
}

.password-modal .btn-cancel:hover {
    background: #7a1523;
    border-color: #F5EDD8;
    color: #F5EDD8;
}

.password-modal .btn-save-password {
    background: #7a1523;
    border: 1px solid #F5EDD8;
    color: #F5EDD8;
}

.password-modal .btn-save-password:hover {
    background: #F5EDD8;
    border-color: #7a1523;
    color: #7a1523;
}

/* Modal message */
.password-modal .password-message {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.password-modal .password-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.password-modal .password-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================================
   TAB CONTENT
   ============================================================ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================
   PAYMENT CARD (Métodos de Pago)
   ============================================================ */
.payment-card {
    background: #f5f5f5;
    border-radius: 20px;
    border: 1px solid white;
    box-shadow: 5px 5px 10px #AEAEC033, -5px -5px 10px #FFFFFF80;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: 100%;
    justify-content: center;
}

/* Payment list */
.payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Payment method item */
.payment-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.payment-method.default-payment {
    border-color: #9B1C2E;
    background: #fef2f3;
}

/* Payment logo / brand */
.payment-logo {
    flex-shrink: 0;
}

.card-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 32px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.card-visa {
    background: linear-gradient(135deg, #1A1F71, #1A1F71);
}

.card-mastercard {
    background: linear-gradient(135deg, #EB001B, #F79E1B);
}

.card-amex {
    background: linear-gradient(135deg, #2E77BC, #2E77BC);
}

.card-discover {
    background: linear-gradient(135deg, #FF6000, #FF6000);
}

.card-generic {
    background: linear-gradient(135deg, #666, #999);
}

.card-unknown {
    background: linear-gradient(135deg, #ccc, #999);
}

/* Payment info */
.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    letter-spacing: 1px;
}

.payment-expires {
    font-size: 13px;
    color: #888;
}

.payment-default-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    background: #9B1C2E;
    color: #F5EDD8;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    width: fit-content;
}

/* Delete button */
.payment-actions-method {
    flex-shrink: 0;
}

.delete-payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #ddd;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.delete-payment-btn:hover {
    background: #fef2f3;
    border-color: #dc3232;
    color: #dc3232;
}

/* Empty state */
.payment-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px;
    text-align: center;
    gap: 10px;
}

.payment-list-empty .empty-icon {
    opacity: 0.4;
    margin-bottom: 10px;
}

.payment-list-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #555;
    margin: 0;
}

.payment-list-empty p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Add payment button */
.payment-actions {
    display: flex;
    justify-content: center;
}

.add-payment-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #FAF6F0;
    border: 2px dashed #9B1C2E;
    border-radius: 10px;
    color: #9B1C2E;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "IBM Plex Serif", Sans-serif;
    text-decoration: none;
    width: fit-content;
    justify-content: center;
    line-height: 1;
}

.add-payment-btn:hover {
    border-color: #9B1C2E;
    color: #FAF6F0;
    background: #9B1C2E;
    border-style: solid;
}

.add-payment-btn svg {
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-sidebar {
        flex-direction: row;
        padding: 20px 30px;
        justify-content: space-between;
        align-items: center;
    }

    .avatar-container {
        flex-direction: row;
        gap: 20px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .logout-btn {
        width: auto;
        padding: 10px 24px;
    }
}

@media (max-width: 768px) {
    .profile-header {
        padding: 20px 0;
    }

    .profile-title h1 {
        font-size: 22px;
    }

    .profile-tabs {
        width: 100%;
    }

    .profile-tabs .tab {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .profile-content {
        padding: 20px 0 40px;
    }

    .profile-form-card {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Sidebar responsive */
    .profile-sidebar {
        flex-direction: column;
        padding: 25px 20px;
        gap: 20px;
    }

    .avatar-container {
        flex-direction: column;
        gap: 10px;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .logout-btn {
        width: 100%;
    }

    .save-btn {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        justify-content: stretch;
    }

    /* Modal responsive */
    .password-modal {
        margin: 20px;
        padding: 30px 25px;
    }

    .password-modal .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 15px 0;
    }

    .profile-title h1 {
        font-size: 18px;
    }

    .profile-tabs .tab {
        font-size: 12px;
        padding: 8px 10px;
    }

    .profile-form-card {
        padding: 20px 15px;
    }

}

