/* =============================================================
   Megalaser Machine Flow – Styles v2.0
   ============================================================= */

/* --- Precio a consultar (reemplaza el precio en listados/producto) --- */
.ml-price-on-request {
    font-size: 0.95em;
    color: #777;
    font-style: italic;
}

/* --- Botón VER PRECIO --- */
.ml-ver-precio-wrap {
    margin: 16px 0;
}

.ml-ver-precio-btn.ml-ver-precio-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    width: 100% !important;
    background: linear-gradient(135deg, #09414F, #00838F) !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 0.8rem 1.5rem !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

.ml-ver-precio-btn.ml-ver-precio-btn:hover,
.ml-ver-precio-btn.ml-ver-precio-btn:focus {
    background: linear-gradient(135deg, #00838F, #09414F) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9, 65, 79, 0.25) !important;
    color: #fff !important;
    outline: none;
}

/* --- Modal overlay --- */
.ml-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Modal box --- */
.ml-modal {
    background: #f4f4f4;
    border-radius: 4px;
    padding: 36px 32px 28px;
    max-width: 500px;
    width: 95%;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

.ml-modal h3 {
    margin: 0 0 22px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #222;
    line-height: 1.3;
}

.ml-modal-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 1.9em;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0;
    transition: color 0.15s;
}

.ml-modal-close:hover {
    color: #333;
}

/* --- Campos del formulario --- */
.ml-field {
    margin-bottom: 13px;
}

.ml-field label {
    display: block;
    font-size: 0.82em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #444;
    margin-bottom: 4px;
}

.ml-field label span {
    color: #c0392b;
}

.ml-field input[type="text"],
.ml-field input[type="email"],
.ml-field input[type="tel"],
.ml-field textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.93em;
    background: #fff;
    box-sizing: border-box;
    color: #333;
    transition: border-color 0.15s;
}

.ml-field input:focus,
.ml-field textarea:focus {
    border-color: #999;
    outline: none;
}

.ml-error {
    color: #8b1a1a;
    background: #fdf0f0;
    border: 1px solid #e0b4b4;
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 0.88em;
    margin-bottom: 12px;
}

.ml-submit-btn {
    width: 100%;
    background: #c0392b !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 0 !important;
    border-radius: 3px !important;
    font-size: 0.95em !important;
    margin-top: 4px;
    border: none !important;
    cursor: pointer;
}

.ml-submit-btn:hover {
    background: #962d22 !important;
}

.ml-submit-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* --- Resultado de precio --- */
.ml-product-label {
    font-size: 0.87em;
    color: #555;
    margin: 0 0 12px;
}

.ml-product-label strong {
    color: #222;
}

.ml-price-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
}

.ml-price-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.93em;
    line-height: 1.4;
}

.ml-price-table td:first-child {
    color: #666;
    width: 55%;
}

.ml-price-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #222;
}

.ml-price-table tr.ml-row-total td {
    background: #e8e8e8;
    font-weight: 700;
    font-size: 1.02em;
    color: #111;
    border-bottom: none;
}

.ml-price-table tr.ml-row-usd td {
    color: #1a5276;
}

.ml-price-table tr.ml-row-usd td:last-child {
    color: #1a5276;
    font-size: 1em;
}

.ml-no-price-msg {
    margin: 16px 0 8px;
    padding: 12px 16px;
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    border-radius: 4px;
    color: #5d4037;
    font-size: .95em;
    line-height: 1.5;
}

.ml-financing-section {
    margin-top: 18px;
}

.ml-financing-title {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin: 0 0 8px;
}

.ml-financing-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    font-size: 0.88em;
}

.ml-financing-table thead th {
    text-align: left;
    padding: 6px 8px;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #666;
    border-bottom: 2px solid #d8d8d8;
}

.ml-financing-table tbody tr {
    border-bottom: 1px solid #ebebeb;
}

.ml-financing-table tbody tr:last-child {
    border-bottom: none;
}

.ml-financing-table tbody td {
    padding: 7px 8px;
    color: #333;
    line-height: 1.3;
}

.ml-financing-table tbody td:first-child strong {
    color: #111;
}

.ml-financing-table tbody td.ml-fi-cuota {
    font-weight: 700;
    color: #09414F;
    text-align: right;
}

.ml-financing-table thead th:last-child {
    text-align: right;
}

/* --- Botones del resultado --- */
.ml-result-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ml-send-email-btn {
    background: #1a5276 !important;
    color: #fff !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.88em !important;
    padding: 10px 18px !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer;
}

.ml-send-email-btn:hover {
    background: #154360 !important;
}

.ml-send-email-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ml-back-btn {
    font-size: 0.88em !important;
    color: #555 !important;
    background: #e0e0e0 !important;
    border: none !important;
    border-radius: 3px !important;
    padding: 10px 16px !important;
    cursor: pointer;
}

.ml-back-btn:hover {
    background: #ccc !important;
}

.ml-email-success {
    color: #1e7e34;
    background: #d4edda;
    border: 1px solid #b8dfc4;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-top: 12px;
}

.ml-email-error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f0b8be;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-top: 12px;
}

/* --- Formulario de contacto (shortcode) --- */
.ml-contact-form-wrap {
    max-width: 580px;
}

.ml-contact-titulo {
    font-size: 1.15em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #222;
    margin-bottom: 22px;
}

.ml-contact-success {
    background: #d4edda;
    color: #1e7e34;
    border: 1px solid #b8dfc4;
    padding: 14px 18px;
    border-radius: 3px;
    font-size: 0.95em;
}

.ml-contact-error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f0b8be;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-bottom: 16px;
}

.ml-contact-submit {
    background: #c0392b !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 11px 30px !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer;
}

.ml-contact-submit:hover {
    background: #962d22 !important;
}

@media (max-width: 520px) {
    .ml-modal {
        padding: 24px 16px 20px;
    }
    .ml-result-actions {
        flex-direction: column;
    }
    .ml-send-email-btn,
    .ml-back-btn {
        width: 100%;
        text-align: center;
    }
}
