/* ===================================
   COTIZADOR DE PALAS - ESTILOS
   =================================== */

:root {
    --primary-color: #00A651;
    --primary-dark: #008241;
    --secondary-color: #FF6B35;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
}

.cotizador-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* HEADER */
.cotizador-header {
    text-align: center;
    margin-bottom: 40px;
}

.cotizador-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.cotizador-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* CONTENIDO */
.cotizador-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

/* STEPS */
.cotizador-step {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.5rem;
    line-height: 1.3;
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.4;
}

.cotizador-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.cotizador-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.cotizador-select:hover {
    border-color: var(--primary-dark);
}

/* PALA INFO CARD */
.pala-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.pala-info-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.pala-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 3px;
}

.spec-value {
    font-weight: 700;
    font-size: 1rem;
}

/* RATING SLIDER */
.rating-slider {
    margin-bottom: 10px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #ff4757, #ffa502, #2ed573);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 3px solid var(--primary-color);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 3px solid var(--primary-color);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.slider-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.rating-emoji {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 10px;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* CHECKBOX */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}

/* BUTTONS */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-success {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 166, 81, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
    flex: 1;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-next {
    width: 100%;
}

.arrow {
    font-size: 1.2rem;
}

/* RESULTADOS */
.resultado-principal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}

.valor-estimado {
    margin-bottom: 20px;
}

.label-valor {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.precio-grande {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.1;
}

.rango-precio {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.4;
}

.estadistica-rapida {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-content {
    text-align: left;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ANÁLISIS FACTORES */
.analisis-factores {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.analisis-factores h4 {
    margin-top: 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.factores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.factor-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.factor-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.factor-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* MERCADO INFO */
.mercado-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.mercado-info h4 {
    margin-top: 0;
    color: #856404;
    line-height: 1.4;
}

.mercado-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mercado-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    gap: 10px;
}

.mercado-label {
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

.mercado-value {
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

/* RECOMENDACIONES */
.recomendaciones-box {
    background: #d1ecf1;
    border: 2px solid #bee5eb;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.recomendaciones-box h4 {
    margin-top: 0;
    color: #0c5460;
    line-height: 1.4;
}

.recomendacion-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: start;
    gap: 12px;
    border-left: 4px solid #17a2b8;
}

.recomendacion-item:last-child {
    margin-bottom: 0;
}

.rec-icono {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rec-mensaje {
    color: var(--text-dark);
    line-height: 1.5;
}

/* CTA SECTION */
.cta-section {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.cta-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* LOADING */
.cotizador-loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 6px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cotizador-loading p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ===================================
   RESPONSIVE OPTIMIZADO PARA MÓVILES
   =================================== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .cotizador-wrapper {
        padding: 15px;
        margin: 30px auto;
    }
    
    .cotizador-content {
        padding: 30px 25px;
    }
    
    .resultado-principal {
        padding: 30px 25px;
    }
}

/* Móviles - pantallas pequeñas */
@media (max-width: 768px) {
    .cotizador-wrapper {
        padding: 10px;
        margin: 20px auto;
    }
    
    /* Header */
    .cotizador-header {
        margin-bottom: 30px;
    }
    
    .cotizador-header h2 {
        font-size: 1.5rem;
    }
    
    .cotizador-subtitle {
        font-size: 1rem;
    }
    
    /* Content */
    .cotizador-content {
        padding: 25px 15px;
        border-radius: 10px;
    }
    
    /* Steps */
    .step-header {
        margin-bottom: 25px;
        padding-bottom: 12px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        margin-right: 12px;
    }
    
    .step-header h3 {
        font-size: 1.2rem;
    }
    
    /* Form */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    .cotizador-select {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    /* Pala Info Card */
    .pala-info-card {
        padding: 16px;
        border-radius: 8px;
        margin-top: 16px;
    }
    
    .pala-info-card h4 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .pala-specs {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .spec-label {
        font-size: 0.8rem;
    }
    
    .spec-value {
        font-size: 0.95rem;
    }
    
    /* Rating Slider */
    .slider {
        height: 10px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    
    .slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
    
    .slider-labels {
        font-size: 0.85rem;
        margin-top: 6px;
    }
    
    .slider-value {
        font-size: 1rem;
    }
    
    .rating-emoji {
        font-size: 2rem;
        margin-top: 8px;
    }
    
    /* Checkbox */
    .checkbox-label {
        padding: 10px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .checkbox-label span {
        font-size: 0.95rem;
    }
    
    /* Buttons */
    .button-group {
        flex-direction: column;
        gap: 10px;
        margin-top: 25px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-success {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .btn-lg {
        padding: 14px 30px;
        font-size: 1rem;
    }
    
    /* Resultados */
    .resultado-principal {
        padding: 30px 20px;
        border-radius: 10px;
        margin-bottom: 20px;
    }
    
    .valor-estimado {
        margin-bottom: 16px;
    }
    
    .label-valor {
        font-size: 0.9rem;
    }
    
    .precio-grande {
        font-size: 2.5rem;
        margin: 8px 0;
    }
    
    .rango-precio {
        font-size: 1rem;
    }
    
    .estadistica-rapida {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }
    
    .stat-item {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Análisis Factores */
    .analisis-factores {
        padding: 20px 15px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .analisis-factores h4 {
        font-size: 1.1rem;
    }
    
    .factores-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 12px;
    }
    
    .factor-item {
        padding: 12px;
    }
    
    .factor-label {
        font-size: 0.85rem;
    }
    
    .factor-value {
        font-size: 1.3rem;
    }
    
    /* Mercado Info */
    .mercado-info {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .mercado-info h4 {
        font-size: 1.1rem;
    }
    
    .mercado-stats {
        gap: 8px;
    }
    
    .mercado-stat {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .mercado-label {
        font-size: 0.9rem;
    }
    
    .mercado-value {
        font-size: 1.1rem;
    }
    
    /* Recomendaciones */
    .recomendaciones-box {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .recomendaciones-box h4 {
        font-size: 1.1rem;
    }
    
    .recomendacion-item {
        padding: 12px;
        margin-bottom: 8px;
        gap: 10px;
    }
    
    .rec-icono {
        font-size: 1.3rem;
    }
    
    .rec-mensaje {
        font-size: 0.9rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding-top: 16px;
    }
    
    .cta-text {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
    
    /* Loading */
    .cotizador-loading {
        padding: 40px 15px;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
        border-width: 5px;
        margin-bottom: 16px;
    }
    
    .cotizador-loading p {
        font-size: 1rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
    .cotizador-wrapper {
        padding: 8px;
        margin: 15px auto;
    }
    
    .cotizador-header h2 {
        font-size: 1.3rem;
    }
    
    .cotizador-subtitle {
        font-size: 0.95rem;
    }
    
    .cotizador-content {
        padding: 20px 12px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 10px;
    }
    
    .step-header h3 {
        font-size: 1.1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .pala-info-card {
        padding: 14px;
    }
    
    .pala-info-card h4 {
        font-size: 1rem;
    }
    
    .pala-specs {
        grid-template-columns: 1fr;
    }
    
    .precio-grande {
        font-size: 2rem;
    }
    
    .rango-precio {
        font-size: 0.95rem;
    }
    
    .stat-icon {
        font-size: 1.6rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .analisis-factores h4,
    .mercado-info h4,
    .recomendaciones-box h4 {
        font-size: 1rem;
    }
    
    .factor-value {
        font-size: 1.2rem;
    }
    
    .rec-mensaje {
        font-size: 0.85rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-success {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Landscape móviles */
@media (max-width: 896px) and (orientation: landscape) {
    .cotizador-wrapper {
        margin: 15px auto;
    }
    
    .cotizador-header {
        margin-bottom: 20px;
    }
    
    .cotizador-header h2 {
        font-size: 1.4rem;
    }
    
    .cotizador-content {
        padding: 20px;
    }
    
    .step-header {
        margin-bottom: 20px;
    }
    
    .resultado-principal {
        padding: 25px 20px;
    }
    
    .precio-grande {
        font-size: 2.2rem;
    }
    
    .estadistica-rapida {
        grid-template-columns: 1fr 1fr;
    }
    
    .factores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Muy ancho en móvil landscape */
@media (min-width: 568px) and (max-width: 768px) and (orientation: landscape) {
    .pala-specs {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .estadistica-rapida {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .factores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}