/**
 * Espuma Cotizador - Estilos para tienda publica
 * RespaldosChile - Usa tipografia del sitio
 */

/* ========================================
   LAYOUT GENERAL
   ======================================== */
.cotizador-espuma-section {
    background: #f7f7f7;
    padding-top: 30px;
    padding-bottom: 50px;
    min-height: auto;
}

/* ========================================
   BIENVENIDA - PASO 0
   ======================================== */
.bienvenida-container {
    max-width: 900px;
    margin: 0 auto;
}

.bienvenida-header {
    text-align: center;
    margin-bottom: 30px;
}

.bienvenida-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #bc0202 0%, #8b0000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(188, 2, 2, 0.3);
}

.bienvenida-icon i {
    font-size: 32px;
    color: white;
}

.instrucciones-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.instruccion-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.instruccion-numero {
    width: 36px;
    height: 36px;
    background: #bc0202;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Poppins-SemiBold;
    font-size: 14px;
    flex-shrink: 0;
}

.tips-adicionales {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 10px;
    border-left: 4px solid #0d6efd;
}

/* Boton comenzar - MUY VISIBLE */
.btn-comenzar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #bc0202 0%, #8b0000 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-family: Poppins-SemiBold;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(188, 2, 2, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-comenzar:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(188, 2, 2, 0.5);
    color: white;
}

.btn-comenzar i {
    font-size: 18px;
}

/* ========================================
   PASO CARD
   ======================================== */
.paso-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.paso-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.paso-badge {
    display: inline-block;
    background: #bc0202;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: Poppins-Medium;
    font-size: 11px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paso-body {
    padding: 25px;
}

/* ========================================
   DENSIDADES
   ======================================== */
#gridDensidades {
    margin: 0 -8px;
}

#gridDensidades > div {
    padding: 8px;
}

.densidad-card {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.densidad-card:hover {
    border-color: #bc0202;
    box-shadow: 0 4px 15px rgba(188, 2, 2, 0.15);
}

.densidad-card.selected {
    border-color: #bc0202;
    border-width: 3px;
    background: #fef5f5;
}

.densidad-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    background: #bc0202;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 3;
}

/* Imagen a la izquierda */
.densidad-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    flex-shrink: 0;
}

.densidad-imagen img {
    width: 70px;
    height: auto;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.densidad-card:hover .densidad-imagen img {
    transform: scale(1.1);
}

/* Info a la derecha */
.densidad-info {
    padding: 12px;
    flex: 1;
}

.densidad-info h6 {
    font-family: Poppins-SemiBold;
    font-size: 13px;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.3;
}

.densidad-info small {
    font-family: Poppins-Regular;
    color: #888;
    display: block;
    font-size: 11px;
    margin-bottom: 8px;
}

.densidad-precio {
    font-family: Poppins-SemiBold;
    color: #bc0202;
    font-size: 13px;
}

/* ========================================
   NAVEGACION
   ======================================== */
.navegacion-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    padding: 14px 30px;
    font-family: Poppins-SemiBold;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-nav-primary {
    background: linear-gradient(135deg, #bc0202 0%, #8b0000 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(188, 2, 2, 0.3);
}

.btn-nav-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(188, 2, 2, 0.4);
    color: white;
}

.btn-nav-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-nav-secondary {
    background: white;
    color: #333;
    border: 2px solid #ddd;
}

.btn-nav-secondary:hover {
    border-color: #bc0202;
    color: #bc0202;
}

/* ========================================
   CONFIGURACION (PASO 2)
   ======================================== */
.config-section {
    margin-bottom: 25px;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.config-label i {
    color: #bc0202;
}

/* Control de espesor */
.espesor-control {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8f8f8;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.espesor-control .form-range {
    flex: 1;
}

.espesor-input-group {
    display: flex;
    align-items: center;
    width: 110px;
}

.espesor-input-group .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
    font-family: Poppins-SemiBold;
    font-size: 16px;
    text-align: center;
    padding: 10px;
}

.espesor-input-group .input-group-text {
    background: #bc0202;
    color: white;
    border-radius: 0 8px 8px 0;
    border: none;
    padding: 10px 15px;
    font-family: Poppins-Medium;
}

/* Tipo cards */
.tipo-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tipo-card-new {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tipo-card-new:hover {
    border-color: #bc0202;
    background: #fef5f5;
}

.tipo-card-new.selected {
    border-color: #bc0202;
    border-width: 3px;
    background: #fef5f5;
}

.tipo-card-icon {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    flex-shrink: 0;
}

.tipo-card-new.selected .tipo-card-icon {
    background: #bc0202;
    color: white;
}

.tipo-card-content {
    flex: 1;
}

.tipo-card-check {
    width: 28px;
    height: 28px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

.tipo-card-new.selected .tipo-card-check {
    background: #bc0202;
    border-color: #bc0202;
    color: white;
}

/* ========================================
   CORTES
   ======================================== */
.corte-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid #e5e5e5;
    transition: border-color 0.2s ease;
}

.corte-item:hover {
    border-color: #ccc;
}

.corte-item .corte-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

.corte-item .badge {
    font-family: Poppins-SemiBold;
    font-size: 11px;
    padding: 5px 12px;
}

.corte-item .form-control {
    border-radius: 8px;
    font-family: Poppins-Regular;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.corte-item .form-label {
    font-family: Poppins-Medium;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.canvas-wrapper {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    min-height: 180px;
}

/* ========================================
   RESUMEN LATERAL
   ======================================== */
.resumen-card-new {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.resumen-header-new {
    background: #333;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resumen-header-new i {
    font-size: 18px;
}

.resumen-body-new {
    padding: 20px;
    min-height: 150px;
}

.resumen-placeholder {
    text-align: center;
    padding: 30px 15px;
}

.resumen-placeholder i {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

.resumen-footer-new {
    padding: 15px 20px;
    background: #f8f8f8;
    border-top: 1px solid #eee;
}

.btn-agregar-carrito {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
    padding: 15px;
    font-family: Poppins-SemiBold;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-agregar-carrito:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(40, 167, 69, 0.4);
    color: white;
}

.btn-agregar-carrito:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* Contenido resumen */
.densidad-color-small {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}

.resumen-detalle {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.resumen-total {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.resumen-total .total-label {
    font-family: Poppins-SemiBold;
    color: #1e7e34;
}

.resumen-total .total-precio {
    font-family: Poppins-Bold;
    color: #1e7e34;
    font-size: 22px;
}

.sobrante-info {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
    border-left: 3px solid #2196F3;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .cotizador-espuma-section {
        padding-bottom: 120px;
    }
}

@media (max-width: 768px) {
    .bienvenida-icon {
        width: 60px;
        height: 60px;
    }

    .bienvenida-icon i {
        font-size: 24px;
    }

    .instrucciones-card {
        padding: 20px;
    }

    .btn-comenzar {
        padding: 15px 35px;
        font-size: 14px;
    }

    .espesor-control {
        flex-direction: column;
        gap: 12px;
    }

    .espesor-input-group {
        width: 100%;
    }

    .navegacion-bottom {
        flex-direction: column;
        gap: 10px;
    }

    .btn-nav {
        width: 100%;
        justify-content: center;
    }

    .cotizador-espuma-section {
        padding-bottom: 100px;
    }
}

@media (max-width: 576px) {
    .instruccion-item {
        flex-direction: column;
        text-align: center;
    }

    .instruccion-numero {
        margin: 0 auto;
    }

    #gridDensidades .col-6 {
        width: 100%;
    }

    .densidad-info h6 {
        font-size: 14px;
    }
}

/* ========================================
   BOTON TOUR AYUDA (estilos base)
   Los estilos del popover están en la vista
   ======================================== */
.btn-tour-help.clicked {
    animation: none !important;
}

/* Tooltip para el botón de ayuda */
.btn-tour-help::before {
    content: 'Ver tutorial';
    position: absolute;
    left: 60px;
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-family: Poppins-Regular;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.btn-tour-help::after {
    content: '';
    position: absolute;
    left: 52px;
    border: 6px solid transparent;
    border-right-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.btn-tour-help:hover::before,
.btn-tour-help:hover::after {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .btn-tour-help::before,
    .btn-tour-help::after {
        display: none;
    }
}
