/* ========================================================================= */
/*               MAJOIS E-COMMERCE - ESTILOS DE CARRITO Y MODAL CHECKOUT      */
/* ========================================================================= */

/* Backdrop de la Modal */
.modal-checkout-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 25, 45, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    padding: 15px;
}

.modal-checkout-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Caja de la Modal */
.modal-checkout-card {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 50, 90, 0.22);
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    padding: 35px 30px;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 91, 142, 0.08);
}

.modal-checkout-backdrop.active .modal-checkout-card {
    transform: translateY(0) scale(1);
}

/* Botón de Cierre */
.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: var(--color-primary);
    transform: rotate(90deg);
}

/* Cabecera de la Modal */
.modal-header-section {
    text-align: center;
    margin-bottom: 25px;
}

.modal-pill-tag {
    display: inline-block;
    background: rgba(0, 91, 142, 0.08);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.modal-title {
    color: var(--color-primary);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.25;
}

.modal-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 420px;
}

/* Tarjetas de Selección (Paso 1) */
.checkout-choices-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.choice-option-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.choice-option-card:hover {
    border-color: var(--color-primary);
    background: #f8fbfe;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 91, 142, 0.08);
}

.choice-icon-wrap {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    background: rgba(0, 91, 142, 0.07);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.25s ease;
}

.choice-option-card:hover .choice-icon-wrap {
    background: var(--color-primary);
    color: #ffffff;
    transform: scale(1.05);
}

.choice-content-wrap {
    flex: 1;
}

.choice-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.choice-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
}

.choice-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
}

.choice-tag.tag-green {
    background: #e8f8f0;
    color: #1e7e34;
}

.choice-tag.tag-blue {
    background: #e8f1f8;
    color: var(--color-primary);
}

.choice-description {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
}

.choice-arrow-indicator {
    color: #94a3b8;
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform 0.2s ease, color 0.2s ease;
}

.choice-option-card:hover .choice-arrow-indicator {
    color: var(--color-primary);
    transform: translateX(4px);
}

/* Vistas de Pasos (Step 1 y Step 2) */
.checkout-step-pane {
    display: none;
    animation: fadeInStep 0.25s ease forwards;
}

.checkout-step-pane.active-step {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Barra superior de pasos con botón Volver */
.modal-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

.btn-modal-back {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.btn-modal-back:hover {
    background: rgba(0, 91, 142, 0.08);
}

.step-indicator-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
}

/* Cajas de Información o Aviso */
.modal-info-box {
    background: #f0f7fb;
    border-left: 4px solid var(--color-primary);
    padding: 12px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: #1e3a8a;
    line-height: 1.4;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modal-info-box svg {
    min-width: 18px;
    margin-top: 2px;
    fill: var(--color-primary);
}

/* Formularios dentro de la Modal */
.modal-form-group {
    margin-bottom: 16px;
    text-align: left;
}

.modal-form-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.modal-form-group label span.required {
    color: #e12028;
    margin-left: 2px;
}

.modal-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 91, 142, 0.12);
}

.modal-input-hint {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

/* Resumen rápido de compra */
.modal-order-summary-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.summary-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Botones de acción principales */
.btn-modal-action {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 91, 142, 0.25);
    transition: all 0.25s ease;
}

.btn-modal-action:hover {
    background: #00456b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 91, 142, 0.35);
}

.btn-modal-action:active {
    transform: translateY(0);
}

.btn-modal-action:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Enlaces secundarios */
.modal-footer-help {
    text-align: center;
    margin-top: 18px;
    font-size: 0.82rem;
    color: #64748b;
}

.modal-footer-help a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer-help a:hover {
    text-decoration: underline;
}

/* Campo Honeypot Oculto */
.hp-field-wrap {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Responsive */
@media (max-width: 600px) {
    .modal-checkout-card {
        padding: 25px 18px;
        border-radius: 12px;
    }
    
    .choice-option-card {
        padding: 16px 14px;
        gap: 12px;
    }
    
    .choice-icon-wrap {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.25rem;
    }
    
    .choice-heading {
        font-size: 0.98rem;
    }
    
    .choice-description {
        font-size: 0.8rem;
    }
}

/* ========================================================================= */
/*               ALTERNADOR DE VISIBILIDAD DE CONTRASEÑA (OJITO)             */
/* ========================================================================= */

.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrap .modal-input {
    padding-right: 48px;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-toggle-password:hover {
    color: var(--color-primary);
    background-color: rgba(0, 91, 142, 0.08);
}

.btn-toggle-password:focus {
    outline: none;
    color: var(--color-primary);
}

/* ========================================================================= */
/*              PANTALLA DE ÉXITO Y CONFIRMACIÓN OFICIAL EN MODAL            */
/* ========================================================================= */

.success-screen-header {
    text-align: center;
    margin-bottom: 20px;
}

.success-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
}

.success-icon-badge svg {
    width: 32px;
    height: 32px;
}

.success-cpte-badge {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.5px;
}

.modal-official-msg-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
    text-align: center;
}

.official-greeting {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.official-schedule-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0 14px 0;
    text-align: left;
}

.schedule-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-icon svg {
    width: 20px;
    height: 20px;
}

.schedule-text {
    font-size: 0.86rem;
    line-height: 1.45;
    color: #1e3a8a;
}

.schedule-text strong {
    color: #1e40af;
    font-size: 0.88rem;
}

.official-body-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #334155;
    margin: 0 0 10px 0;
}

.official-thanks {
    font-size: 0.95rem;
    font-weight: 800;
    color: #00456b;
    margin: 10px 0 0 0;
    letter-spacing: 0.5px;
}

.success-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-wa-success {
    background: #25d366 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
}

.btn-wa-success:hover {
    background: #1eb857 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

.btn-modal-secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.btn-modal-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* ========================================================================= */
/*              BOTÓN VACIAR CARRITO Y PRODUCTO EN CARRITO                   */
/* ========================================================================= */

.btn-clear-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #f87171;
    color: #dc2626;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.08);
}

.btn-clear-cart svg {
    width: 17px;
    height: 17px;
    color: #dc2626;
}

.btn-clear-cart:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.16);
}

.btn-add-cart.in-cart {
    background-color: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-add-cart.in-cart:hover {
    background-color: #15803d !important;
}

.modal-fast-track-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 12px;
}

.modal-fast-track-note strong {
    color: #9a3412;
}

.link-reopen-wa {
    display: inline-block;
    color: #059669;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    text-align: center;
    transition: color 0.2s ease;
}

.link-reopen-wa:hover {
    color: #047857;
}

.btn-return-catalog {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 91, 142, 0.25);
}

.btn-return-catalog:hover {
    background-color: #00456b !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 91, 142, 0.35);
}



