/* =========================================
   1. CONTENEDOR PRINCIPAL Y HEADER
   ================================********* */

.quoter-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 600px;
    color: #333;
    padding-top: 100px;
}

.quoter-header {
    text-align: center;
    margin-bottom: 40px;
}

.quoter-header h1 {
    color: #007bff;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 2.2rem;
}

.quoter-header p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* =========================================
   2. INTERRUPTOR (TOGGLE SWITCH) ANIMADO
   ================================********* */

.quoter-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.quoter-toggle {
    background: #f1f3f5;
    border-radius: 50px;
    /* Bordes totalmente redondeados */
    padding: 5px;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 420px;
    max-width: 100%;
    height: 50px;
    /* Altura fija para consistencia */
}

/* Ocultar los radio buttons reales */
.quoter-toggle input[type="radio"] {
    display: none;
}

/* Estilo de los botones (Labels) */
.toggle-btn {
    flex: 1;
    text-align: center;
    z-index: 2;
    /* Encima del slider */
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
    font-size: 0.95rem;
}

.toggle-btn i {
    font-size: 1.1rem;
}

/* El Slider Blanco (Fondo móvil) */
.toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    bottom: 5px;
    width: calc(50% - 5px);
    /* Mitad del ancho menos padding */
    background: #fff;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
}

/* --- LÓGICA DE ANIMACIÓN DEL TOGGLE --- */

/* Cuando 'Directo' está seleccionado */
#mode-direct:checked~.toggle-slider {
    transform: translateX(0);
}

#mode-direct:checked+label {
    color: #007bff;
    /* Texto azul */
}

/* Cuando 'Specs' está seleccionado */
#mode-specs:checked~.toggle-slider {
    transform: translateX(100%);
    /* Mover a la derecha */
}

/* Usamos selector general de hermanos para colorear el label correcto */
#mode-specs:checked~label[for="mode-specs"] {
    color: #007bff;
}


/* =========================================
   3. PANELES DE BÚSQUEDA
   ================================********* */

.panels-container {
    position: relative;
    min-height: 250px;
}

.search-panel {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    animation: slideUpFade 0.4s ease forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-content-centered {
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
}

.panel-content-full {
    width: 100%;
}

.search-panel h3 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.panel-desc {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Grid para el formulario compacto (Marca/Modelo) */
.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    text-align: left;
}

/* Grid para el formulario de Specs */
.specs-grid-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    text-align: left;
}

/* Estilos de Inputs */
.form-group {
    margin-bottom: 0;
    /* Controlado por el grid gap */
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 45px;
    /* Altura uniforme */
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Texto de Estado en Tiempo Real */
.realtime-status {
    margin-top: 20px;
    font-weight: 600;
    color: #007bff;
    text-align: right;
    min-height: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* =========================================
   4. RESULTADOS Y SWIPER
   ================================********* */

.results-slider-wrapper {
    margin-top: 40px;
    padding: 30px 20px;
    background: #f8f9fa;
    /* Fondo gris claro para resaltar tarjetas */
    border-radius: 16px;
    border: 1px solid #eee;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.results-title {
    margin-top: 0;
    color: #333;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.badge-count {
    background: #007bff;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    vertical-align: middle;
}

/* Ajustes de Swiper */
.swiper {
    width: 100%;
    padding-bottom: 45px !important;
    /* Espacio para la paginación */
    padding-left: 5px;
    padding-right: 5px;
}

.swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
}

.swiper-button-next,
.swiper-button-prev {
    color: #007bff;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-pagination-bullet-active {
    background: #007bff;
}

/* =========================================
   5. TARJETA DE PRODUCTO (Card Mini)
   ================================********* */

.card-mini {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.1);
    border-color: #b3d7ff;
}

.card-mini-img {
    height: 200px;
    width: 100%;
    object-fit: contain;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
}

.card-mini-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-mini-brand {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.card-mini-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.35;
    /* Limitar a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.card-mini-specs {
    font-size: 0.85rem;
    color: #555;
    background: #f0f8ff;
    /* Celeste muy suave */
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    /* Empuja hacia abajo si sobra espacio */
}

.card-mini-specs i {
    color: #007bff;
}

.btn-card-action {
    display: block;
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.btn-card-action:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.btn-card-action i {
    margin-left: 5px;
    transition: transform 0.2s;
}

.btn-card-action:hover i {
    transform: translateX(3px);
}

/* =========================================
   6. MENSAJE NO ENCONTRADO
   ================================********* */

.not-found-card {
    grid-column: 1 / -1;
    background: #fff8e1;
    border: 1px solid #ffe0b2;
    color: #5d4037;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.not-found-icon {
    font-size: 3rem;
    color: #ffa000;
    margin-bottom: 5px;
}

.not-found-card h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #795548;
}

.btn-contact-advisor {
    background: #25D366;
    /* WhatsApp Green */
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-contact-advisor:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    color: #fff;
    text-decoration: none;
}

/* =========================================
   7. RESPONSIVE
   ================================********* */

@media (max-width: 768px) {
    .quoter-header h1 {
        font-size: 1.8rem;
    }

    .quoter-toggle {
        width: 100%;
        font-size: 0.9rem;
    }

    .form-row-compact,
    .specs-grid-inputs {
        grid-template-columns: 1fr;
        /* Una columna en móvil */
        gap: 15px;
    }

    .search-panel {
        padding: 30px 20px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
        /* Ocultar flechas en móvil, usar swipe */
    }
}