/* --- COTIZADOR INTELIGENTE (ESTILOS) --- */
:root {
    --cotizador-bg: #f0f4f8;
    --cotizador-card-bg: rgba(255, 255, 255, 0.95);
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    --accent-gradient: linear-gradient(135deg, var(--accent-color) 0%, #a31a1a 100%);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.cotizador-main {
    padding: 60px 0 100px;
    background: linear-gradient(135deg, #eef2f3 0%, #cfd9df 100%);
    min-height: 80vh;
}

.cotizador-header {
    margin-bottom: 2rem;
}

.cotizador-header h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.cotizador-header p {
    color: #666;
    font-size: 1.1rem;
}

/* --- Barra de Progreso --- */
.progress-bar-container {
    width: 100%;
    max-width: 600px;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 20px auto 0;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    /* JS lo actualizarÃ¡ */
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.4s ease;
}

/* --- Contenedor Principal (Glassmorphism) --- */
.cotizador-card {
    background: var(--cotizador-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    /* Para las animaciones de pasos */
    min-height: 400px;
}

/* --- Pasos (Steps) --- */
.step {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Grilla de SelecciÃ³n --- */
.selection-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.four-columns {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.selection-card {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.selection-card.selected {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.selection-card.highlight {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid #ddecff;
}

.selection-card.highlight:hover {
    border-color: var(--primary-color);
}

.selection-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.selection-card:hover i {
    transform: scale(1.1);
}

.selection-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.selection-card p {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.4;
}

.selection-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* --- Controles de Formulario --- */
.form-group {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Selector de Cantidad */
.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    overflow: hidden;
}

.qty-selector button {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: background 0.2s;
}

.qty-selector button:hover {
    background: #f0f0f0;
}

.qty-selector input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
    outline: none;
    -moz-appearance: textfield;
}

.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Toggle Options (Radio Buttons Visuales) */
.toggle-options {
    display: inline-flex;
    background: #eef2f5;
    border-radius: 50px;
    padding: 5px;
}

.toggle-option {
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #666;
}

.toggle-option.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-group label {
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* --- Scrollable Inputs (Distancias) --- */
.scrollable-inputs {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-bottom: 20px;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.camera-distance-input {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.camera-distance-input label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.camera-distance-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* --- Range Slider --- */
.range-slider-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.range-slider-container input {
    width: 100%;
    margin-bottom: 10px;
}

.range-slider-container span {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* --- Recommendation Box --- */
.recommendation-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 10px;
    padding: 15px;
    margin: 20px auto;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.recommendation-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.recommendation-box h3 {
    margin: 0;
    font-size: 1.3rem;
}

/* --- Resumen Final --- */
.summary-container {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.summary-details {
    padding-left: 20px;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
    /* Center items vertically */
    color: #555;
    font-size: 1rem;
}

.summary-desc-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-edit-line {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s;
    background-color: rgba(10, 116, 218, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-line:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.total-price-box {
    text-align: right;
    margin-top: 20px;
}

.total-price-box h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 5px 0;
}

.total-price-box span.note {
    font-size: 0.8rem;
    color: #999;
}

/* --- Acciones --- */
.step-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Responsivo */
@media (max-width: 768px) {

    .two-columns,
    .three-columns {
        grid-template-columns: 1fr;
    }

    .cotizador-card {
        padding: 20px;
    }

    .qty-selector button {
        padding: 5px 15px;
    }
}

/* --- Bulk Controls & Live Counter --- */
.glass-panel-light {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.bulk-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-input-group label {
    margin: 0;
    font-size: 1rem;
    color: #666;
    margin-right: 5px;
}

.bulk-input-group input {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
}

.bulk-input-group span {
    color: #888;
    font-size: 0.9rem;
}

.btn-mini {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.btn-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(10, 116, 218, 0.2);
}

.live-cable-counter {
    background: #eef2f5;
    padding: 10px 20px;
    border-radius: 10px;
    text-align: right;
    border: 1px solid #dee2e6;
}

.live-cable-counter small {
    display: block;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 2px;
}

.live-cable-counter span {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark-color);
}

@media(max-width: 600px) {
    .glass-panel-light {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .bulk-input-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .live-cable-counter {
        text-align: center;
    }
}
/* --- Gallery Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.modal-content.large-modal {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    position: relative;
    background: rgba(255, 255, 255, 0.98);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-btn:hover {
    color: red;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid #ddd;
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-img-placeholder {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.gallery-info {
    padding: 15px;
}

.gallery-info h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: var(--dark-color);
}

.gallery-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #777;
}

/* --- Web Flow Cards --- */
.checkbox-card-grid {
    display: grid;
    gap: 15px;
}

.checkbox-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-card:hover {
    border-color: #d0d0d0;
}

.checkbox-card input[type='checkbox'] {
    width: 25px;
    height: 25px;
    margin-bottom: 10px;
    accent-color: var(--primary-color);
}

.checkbox-card:has(input:checked) {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.checkbox-card span {
    font-weight: 600;
    margin-bottom: 5px;
}

.checkbox-card small {
    color: var(--primary-color);
    font-weight: bold;
}

/* --- Botón Secundario Visible --- */
.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
    color: #000;
}


/* --- Disabled Button Styling --- */
button:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc !important;
    border-color: #ccc !important;
}


/* --- PC Builder Styles --- */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.config-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.config-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.config-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.config-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.config-content label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

.config-content select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 0.95rem;
    outline: none;
}

.config-content select:focus {
    border-color: var(--primary-color);
    background: white;
}

.price-tag {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.95rem;
    min-width: 80px;
    text-align: right;
}

.live-total-bar {
    background: var(--dark-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#psu-warning {
    font-size: 0.8rem;
    margin-top: 2px;
}

/* CORRECTED PC BUILDER STYLES */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.config-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    transition: transform 0.2s, box-shadow 0.2s;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #0d6efd;
}

.config-card i {
    font-size: 2rem;
    color: #0d6efd;
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.config-content {
    flex-grow: 1;
    margin-right: 15px;
    min-width: 0;
    /* Fix flex overflow */
}

.config-content label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.config-content select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
}

.config-content select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.price-tag {
    font-weight: 700;
    font-size: 1rem;
    color: #0d6efd;
    background-color: #e7f1ff;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.live-total-bar {
    background: #212529;
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align content to the right */
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.live-total-bar small {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

.live-total-bar h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

#psu-warning {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
    /* Managed by JS */
    align-items: center;
    gap: 5px;
}

.price-highlight { font-size: 1.2rem; font-weight: bold; color: #0d6efd; margin-top: 5px; }
