/* --------------------------------------------------- */
/* ESTILOS PARA EL SIMULADOR DE PRECIOS (ADAPTADOS)    */
/* --------------------------------------------------- */

/* --- Variables de Diseño --- */
/* Se utilizan las variables de tu 'estilos.css' para la consistencia. */
:root {
    /* Colores primarios y de acento del sitio principal */
    --primary-color: var(--accent-color, #d4af37);
    --primary-gradient: linear-gradient(135deg, var(--accent-color, #d4af37), var(--third-color, #ff8c42));
    --primary-hover-color: #c89f2d;

    /* Colores de fondo y texto */
    --background-color: var(--gray-100, #f8f9fa);
    --card-background-color: var(--white, #ffffff);
    --text-color: var(--dark-color, #343a40);
    --label-color: var(--gray-700, #495057);
    --text-on-primary: var(--white, #ffffff);

    /* Bordes y sombras */
    --border-color: var(--gray-300, #dee2e6);
    --border-focus-color: var(--primary-color);
    --card-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.2));
    --border-radius: var(--border-radius-lg, 12px);

    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Estilos Generales --- */
.simulator-section {
    font-family: var(--font-family);
    background-color: var(--background-color);
    padding: 6rem 1rem;
    color: var(--text-color);
}

.simulator-container {
    max-width: 900px;
    margin: 0 auto;
}

/* --- Estilos de la Tarjeta Principal --- */
.simulator-card {
    background-color: var(--card-background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid var(--gray-200, #e9ecef);
}

.simulator-header {
    text-align: center;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--gray-200, #e9ecef);
}

.simulator-title {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 800;
    /* Efecto de texto degradado igual a los títulos de sección */
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.simulator-subtitle {
    margin: 0;
    color: var(--text-muted, #6c757d);
    font-size: 1.1rem;
    font-weight: 300;
}

.simulator-body {
    padding: 2.5rem;
}

/* --- Estilos del Formulario --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--label-color);
    margin-bottom: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--white);
    color: var(--gray-700);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 16px 12px;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-actions {
    text-align: center;
    margin-top: 2.5rem;
}

/* --- Estilos de Botones (Adaptados de estilos.css) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn .me-2 {
    margin-right: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-on-primary);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.35);
    color: var(--text-on-primary);
    background-color: #c89f2d;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--gray-200, #e9ecef);
    border-color: var(--gray-400, #ced4da);
}

/* --- Estilos de Resultados --- */
.results-wrapper {
    animation: fadeIn 0.5s ease-out;
    border-top: 1px solid var(--gray-200, #e9ecef);
    margin-top: 2.5rem;
    padding-top: 2.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
}

.results-subtitle {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Tabla de Desglose */
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.price-table td {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-200, #e9ecef);
    color: var(--text-muted);
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--text-color);
}

/* Resumen de Precio */
.price-summary {
    background: var(--primary-gradient);
    color: var(--text-on-primary);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-title {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-total {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0.5rem 0;
    line-height: 1.1;
}

.summary-note {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
}

.summary-details {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 1.25rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.summary-details > div {
    display: flex;
    justify-content: space-between;
}

/* Botones de Acción de Resultados */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* --- Indicador de Carga --- */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200, #e9ecef);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

/* --- Animaciones --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Diseño Responsivo --- */
@media (max-width: 768px) {
    .simulator-body {
        padding: 1.5rem;
    }
    .form-grid, .results-grid {
        grid-template-columns: 1fr;
    }
    .results-grid {
        gap: 2rem;
    }
    .results-actions {
        flex-direction: column;
    }
    .price-summary {
        order: -1; /* Mueve el precio total arriba en móviles */
    }
}

