/**
 * Presto Configurador - Estilos
 * Versi贸n: 1.0.0
 * Uso: Solo para la p谩gina del configurador de precios
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.presto-configurador-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 40px 20px;
    background: transparent;
}

.presto-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   MAIN LAYOUT - 2 COLUMNAS
============================================ */
.presto-main-content {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.presto-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.presto-card h2 {
    color: #222222;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 700;
}

/* ============================================
   M脫DULOS - PANEL IZQUIERDO
============================================ */
.presto-modules-section {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 10px;
}

.presto-modules-section::-webkit-scrollbar {
    width: 6px;
}

.presto-modules-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.presto-modules-section::-webkit-scrollbar-thumb {
    background: #D7643F;
    border-radius: 10px;
}

.presto-module-item {
    margin-bottom: 10px;
}

.presto-module-checkbox {
    display: none;
}

.presto-module-label {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.presto-module-label:hover:not(.locked) {
    border-color: #D7643F;
    background: #fff5f2;
}

.presto-module-checkbox:checked + .presto-module-label {
    background: linear-gradient(135deg, #fff5f2, #ffe8e0);
    border-color: #D7643F;
}

.presto-module-label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s;
    margin-top: 2px;
}

.presto-module-checkbox:checked + .presto-module-label::before {
    background: #D7643F;
    border-color: #D7643F;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.presto-module-info {
    flex: 1;
}

.presto-module-name {
    font-weight: 600;
    color: #222222;
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
}

.presto-module-note {
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}

/* Dependencias bloqueadas */
.presto-module-label.locked {
    background: linear-gradient(135deg, #fff3cd, #ffe5a0);
    border-color: #ffc107;
    cursor: not-allowed;
}

.presto-module-label.locked::before {
    background: #ffc107;
    border-color: #ffc107;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.presto-dependency-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    color: #856404;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 12px;
    margin-top: 8px;
    display: none;
}

.presto-dependency-message.show {
    display: block;
}

/* ============================================
   COMPARADOR DE PRECIOS - PANEL DERECHO
============================================ */
.presto-price-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.presto-price-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.presto-price-card:hover {
    border-color: #D7643F;
    box-shadow: 0 8px 24px rgba(215, 100, 63, 0.15);
    transform: translateY(-4px);
}

.presto-price-card.featured {
    border-color: #D7643F;
    background: linear-gradient(135deg, #fff5f2, #ffffff);
}

.presto-price-badge {
    display: inline-block;
    background: #D7643F;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.presto-price-title {
    font-size: 22px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 8px;
}

.presto-price-subtitle {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 20px;
}

/* Selector de meses */
.presto-months-selector {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.presto-months-selector-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    display: block;
    margin-bottom: 8px;
}

.presto-months-selector-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.presto-months-btn {
    background: white;
    border: 2px solid #D7643F;
    color: #D7643F;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.presto-months-btn:hover:not(:disabled) {
    background: #D7643F;
    color: white;
}

.presto-months-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.presto-months-display {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #222222;
}

.presto-price-amount {
    font-size: 48px;
    font-weight: 700;
    color: #D7643F;
    margin-bottom: 8px;
    line-height: 1;
}

.presto-price-period {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
    min-height: 40px;
}

.presto-price-details {
    flex: 1;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-bottom: 20px;
}

.presto-price-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #f8f9fa;
}

.presto-price-detail-item:last-child {
    border-bottom: none;
}

.presto-price-detail-label {
    color: #6c757d;
}

.presto-price-detail-value {
    font-weight: 600;
    color: #222222;
}

.presto-modules-selected-count {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #495057;
    margin-bottom: 15px;
}

.presto-modules-selected-count strong {
    color: #D7643F;
    font-size: 18px;
    display: block;
    margin-bottom: 4px;
}

.presto-btn-contratar {
    background: #222222;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.presto-btn-contratar:hover {
    background: #D7643F;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(215, 100, 63, 0.3);
}

.presto-btn-contratar:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   NOTIFICACI脫N
============================================ */
.presto-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #D7643F;
    color: white;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(215, 100, 63, 0.4);
    z-index: 1000;
    animation: prestoSlideIn 0.3s ease-out;
    font-weight: 600;
}

@keyframes prestoSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   INFO BOX
============================================ */
.presto-info-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-left: 5px solid #1976d2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.presto-info-box-title {
    font-weight: 700;
    color: #0d47a1;
    margin-bottom: 8px;
    font-size: 14px;
}

.presto-info-box-text {
    color: #1565c0;
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================
   RESPONSIVE - VERSIÓN CON MÁXIMA PRIORIDAD
============================================ */

/* Por defecto: Grid base */
.presto-configurador-wrapper .presto-main-content {
    display: grid !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.presto-configurador-wrapper .presto-price-comparison {
    display: grid !important;
    gap: 20px !important;
}

/* ANCHO > 1200px: Dos cajas lado a lado, 3 cards horizontales */
@media (min-width: 1201px) {
    .presto-configurador-wrapper .presto-main-content {
        grid-template-columns: 450px 1fr !important;
    }
    .presto-configurador-wrapper .presto-price-comparison {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ANCHO 720px - 1200px: Cajas verticales, 3 cards horizontales */
@media (max-width: 1200px) and (min-width: 721px) {
    .presto-configurador-wrapper .presto-main-content {
        grid-template-columns: 1fr !important;
    }
    .presto-configurador-wrapper .presto-price-comparison {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ANCHO < 720px: Todo vertical */
@media (max-width: 720px) {
    .presto-configurador-wrapper .presto-main-content {
        grid-template-columns: 1fr !important;
    }
    .presto-configurador-wrapper .presto-price-comparison {
        grid-template-columns: 1fr !important;
    }
    
    .presto-configurador-wrapper {
        padding: 20px 15px !important;
    }
    
    .presto-card {
        padding: 20px !important;
    }
    
    .presto-price-amount {
        font-size: 36px !important;
    }
    
    .presto-price-title {
        font-size: 18px !important;
    }
    
    .presto-modules-section {
        max-height: 500px !important;
    }
}

/* ============================================
   MEJORAS MÓVIL - UX OPTIMIZADA
============================================ */

/* Contador sticky dentro de la caja de módulos */
.presto-mobile-counter {
    background: linear-gradient(135deg, #D7643F, #ff8a65);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(215, 100, 63, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.presto-mobile-counter strong {
    font-size: 24px;
    display: inline-block;
    margin-right: 4px;
}

/* Botón flotante "Ver Precios" - MEJORADO PARA MÓVIL */
.presto-mobile-sticky-cta {
    position: fixed;
    bottom: 90px; /* ⬆️ Subido para evitar WhatsApp */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    animation: prestoFadeInUp 0.4s ease-out;
}

.presto-mobile-sticky-cta button {
    background: linear-gradient(135deg, #222222, #444444);
    color: white;
    border: none;
    padding: 12px 24px; /* 📏 Reducido en móvil */
    border-radius: 50px;
    font-size: 14px; /* 📝 Texto más pequeño */
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px; /* Menos espacio entre emoji y texto */
    white-space: nowrap; /* Evitar que se parta en dos líneas */
}

.presto-mobile-sticky-cta button:hover {
    background: linear-gradient(135deg, #D7643F, #ff8a65);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(215, 100, 63, 0.5);
}

/* ESPECÍFICO PARA MÓVILES MUY PEQUEÑOS */
@media (max-width: 400px) {
    .presto-mobile-sticky-cta {
        bottom: 85px; /* Aún más arriba en pantallas pequeñas */
    }
    
    .presto-mobile-sticky-cta button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

.presto-mobile-sticky-cta button:hover {
    background: linear-gradient(135deg, #D7643F, #ff8a65);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(215, 100, 63, 0.5);
}

@keyframes prestoFadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Ajustes específicos para móvil */
@media (max-width: 720px) {
    /* Caja de módulos más compacta */
    .presto-modules-section {
        max-height: 300px !important;
    }
    
    .presto-module-label {
        padding: 12px 14px !important;
    }
    
    .presto-module-name {
        font-size: 14px !important;
    }
    
    .presto-module-note {
        font-size: 10px !important;
    }
    
    /* Info box más compacto */
    .presto-info-box {
        padding: 12px !important;
        margin-bottom: 16px !important;
    }
    
    .presto-info-box-title {
        font-size: 13px !important;
    }
    
    .presto-info-box-text {
        font-size: 12px !important;
    }
}

/* Ocultar botón flotante en desktop */
@media (min-width: 721px) {
    .presto-mobile-sticky-cta {
        display: none !important;
    }
}