/* Estilos específicos del Configurador */

/* Estilos adicionales para validación */
.form-input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
}

.success-message.show {
    display: block;
}

.loading-form {
    opacity: 0.7;
    pointer-events: none;
}

/* --- LAYOUT CONFIGURADOR --- */
.configurator-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 80px;
    /* Espacio para botones flotantes móvil */
}

/* Área de Visualización (Imagen) */
.visualization-area {
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    padding: 1rem;
}

.image-display {
    position: relative;
    width: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.dental-unit-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.price-display {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(27, 58, 107, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.model-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #1B3A6B;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Panel de Controles */
.controls-panel {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.2rem;
    color: #1B3A6B;
    margin-bottom: 1rem;
    font-weight: 700;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

/* MENÚ DE COLORES FLOTANTE SOBRE LA IMAGEN */
.colors-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
}

.colors-toggle {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.colors-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.colors-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.colors-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.colors-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.close-colors {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}

.colors-grid-overlay {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.color-item-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.color-item-overlay:hover {
    background: #f8f9fa;
}

.color-circle-overlay {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin-bottom: 6px;
}

.color-name-overlay {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
}

/* DEFINICIÓN DE COLORES */
.color-azul-zafiro {
    background: linear-gradient(135deg, #4169E1 0%, #1e40af 50%, #0a2a5e 100%);
}

.color-verde-esmeralda {
    background: linear-gradient(135deg, #50C878 0%, #10b981 50%, #0d5c47 100%);
}

.color-gris-antracita {
    background: linear-gradient(135deg, #708090 0%, #4b5563 50%, #3c3d3e 100%);
}

.color-rojo-rubi {
    background: linear-gradient(135deg, #E0115F 0%, #dc2626 50%, #9c0b30 100%);
}

.color-blanco-puro {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #f5f5f5 100%);
    border: 2px solid #e5e7eb !important;
}

.color-negro-onice {
    background: linear-gradient(135deg, #333333 0%, #1f2937 50%, #1a1a1a 100%);
}

.color-azul-marino-claro {
    background: linear-gradient(135deg, #6495ED 0%, #3b82f6 50%, #1e3a8a 100%);
}

.color-melocoton-claro {
    background: linear-gradient(135deg, #FFDBAC 0%, #fbbf24 50%, #d2691e 100%);
}

.color-azul-cielo {
    background: linear-gradient(135deg, #87CEEB 0%, #0ea5e9 50%, #0369a1 100%);
}

/* BOTONES FLOTANTES MINIMALISTAS */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: transform 0.2s;
}

.renovador-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.cotizar-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.floating-btn:active {
    transform: scale(0.95);
}

/* MODELOS */
.models-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
}

.model-thumb {
    min-width: 120px;
    height: 100px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: all 0.2s;
    position: relative;
}

.model-thumb.selected {
    border-color: #1B3A6B;
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.2);
}

.model-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 4px;
    text-align: center;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    animation: slideIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-textarea {
    height: 100px;
    resize: vertical;
}

.btn-submit,
.btn-cancel {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-submit {
    background: #1B3A6B;
    color: white;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
    margin-top: 0.5rem;
}

/* Desktop Grid Layout */
@media (min-width: 769px) {
    .main-container {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
        height: calc(100vh - 80px);
        /* Ajuste altura menos navbar */
        overflow: hidden;
        padding-bottom: 0;
    }

    .visualization-area {
        height: 100%;
    }

    .image-display {
        height: 100%;
        background: radial-gradient(circle at center, #f8f9fa 0%, #e9ecef 100%);
    }

    .dental-unit-image {
        max-height: 80%;
        max-width: 90%;
    }

    .controls-panel {
        overflow-y: auto;
    }

    .quote-button {
        display: none !important;
        /* Usar el botón del panel en desktop si existe o modal */
    }

    /* Mostrar botón cotizar en desktop si se desea */
    #requestQuote {
        display: block;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        padding: 1rem 3rem;
        border-radius: 50px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        z-index: 99;
    }
}

@media (max-width: 768px) {
    .quote-button {
        display: none;
        /* Usar botón flotante en móvil */
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}