.producto-pagina-visual {
    scroll-padding-top: calc(var(--producto-cabecera-altura, 0px) + 1rem);
}

.producto-pagina-visual .navbar.sticky-top {
    position: static;
}

.catalogo-producto-visual > .producto-documento-lateral {
    width: 0;
    padding: 0;
}

.producto-documento-panel {
    --bs-offcanvas-width: min(30rem, 100vw);
}

.producto-documento-panel .CatalogoElementoDocumento {
    overflow-wrap: anywhere;
}

.producto-documento-panel .btn,
.producto-documento-panel .btn-close {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.producto-acciones .btn,
.producto-documento-abrir,
.producto-documento-panel .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.producto-documento-panel .producto-documento-acciones {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
}

.producto-contenido {
    min-width: 0;
}

.producto-configurador {
    --producto-imagen-proporcion: 38fr;
    --producto-datos-proporcion: 62fr;
    --producto-separacion: clamp(1.25rem, 3vw, 3rem);
    --producto-margen: clamp(1rem, 2.5vw, 2.5rem);
    background: var(--bs-body-bg, white);
}

.producto-cabecera,
.producto-detalle {
    display: grid;
    grid-template-columns: minmax(0, var(--producto-imagen-proporcion)) minmax(0, var(--producto-datos-proporcion));
    gap: var(--producto-separacion);
    padding: var(--producto-margen);
}

.producto-cabecera {
    position: sticky;
    top: 0;
    z-index: 1010;
    max-height: 65vh;
    max-height: 65dvh;
    overflow-y: auto;
    padding-block: min(1rem, var(--producto-margen));
    align-items: start;
    background: var(--bs-body-bg, white);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: inherit;
}

.producto-presentacion,
.producto-datos-principales,
.producto-configuracion {
    min-width: 0;
}

.producto-presentacion > .producto-dibujo-contenedor {
    display: block;
    width: 100%;
}

.producto-presentacion img.producto-dibujo-ampliable {
    display: block;
    width: 100%;
    height: clamp(13rem, 32vh, 26rem);
    object-fit: contain;
}

.producto-presentacion a,
.producto-nombre {
    overflow-wrap: anywhere;
}

.producto-nombre {
    font-size: clamp(1.3rem, 1.8vw, 2rem);
}

.producto-acciones {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
}

.producto-acciones > div {
    min-width: 0;
}

.producto-acciones .btn {
    min-width: 0;
    min-height: 2.75rem;
    padding: .375rem .5rem;
    font-size: .875rem;
    white-space: normal;
}

.producto-acciones-documento {
    display: flex;
    gap: .5rem;
}

.producto-acciones-eficiencia:has(.producto-eficiencia-abrir) {
    flex-wrap: wrap;
}

.producto-acciones-documento .btn > i {
    flex-shrink: 0;
}

.producto-eficiencia-abrir {
    overflow-wrap: anywhere;
}

.producto-eficiencia {
    margin-top: .5rem;
}

.producto-eficiencia-resumen {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.producto-eficiencia .producto-eficiencia-resumen img {
    width: 4.5rem;
    height: auto;
}

.producto-eficiencia .ProductoEEVclase {
    position: static;
    font-size: 1.125rem;
    line-height: 1.2;
}

.producto-configuracion {
    grid-column: 2;
}

.producto-configuracion > div:first-child > br:first-child {
    display: none;
}

.producto-configuracion .btn,
.producto-documento-abrir {
    min-height: 2.75rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.producto-configuracion .dd .ddTitle {
    min-height: 2.75rem;
}

.producto-faldilla-medida:not(:has(input)) {
    display: none;
}

@media (min-width: 768px) {
    .producto-configuracion [id$="panelCompactoCajon"] > .col-md-8 > .row > label {
        /* Mantiene 3 columnas de la fila completa dentro de un bloque de 8. */
        width: 37.5%;
    }

    .producto-faldilla-selector:has(+ .producto-faldilla-medida input) > .row > label {
        /* Con medida, la etiqueta conserva 3 de las 12 columnas de la fila. */
        width: 30%;
    }
}

.producto-opciones-tarjetas .d-flex.flex-row {
    flex-wrap: wrap;
    column-gap: .75rem;
}

.producto-opciones-tarjetas .w-25 {
    flex: 1 1 9rem;
    width: auto !important;
    max-width: 16rem;
    margin-right: 0 !important;
}

.producto-opciones-tarjetas .card-title {
    line-clamp: unset;
    overflow: visible;
    overflow-wrap: break-word;
}

.producto-opciones-tarjetas .col-md-4:has(> img:is(:not([src]), [src=""])) {
    display: none;
}

.producto-opciones-tarjetas .col-md-4:has(> img:is(:not([src]), [src=""])) + .col-md-8 {
    width: 100%;
}

.producto-resumen-movil {
    display: none;
}

@media (max-width: 991.98px) {
    .producto-configurador {
        --producto-margen: 1rem;
        --producto-separacion: 1rem;
    }

    .producto-cabecera,
    .producto-detalle {
        grid-template-columns: minmax(0, 1fr);
    }

    .producto-cabecera {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .producto-datos-principales {
        display: contents;
    }

    .producto-nombre {
        grid-row: 1;
        margin-bottom: 0 !important;
    }

    .producto-presentacion {
        grid-row: 2;
    }

    .producto-datos-principales > .row {
        grid-row: 3;
    }

    .producto-presentacion img.producto-dibujo-ampliable {
        height: clamp(12rem, 36vh, 22rem);
    }

    .producto-configuracion {
        grid-column: 1;
    }

    .producto-documento-panel {
        --bs-offcanvas-width: 100vw;
    }

    .producto-resumen-movil:not([hidden]) {
        position: fixed;
        inset: 0 0 auto;
        z-index: 1020;
        display: flex;
        align-items: center;
        gap: .75rem;
        min-height: 4.25rem;
        padding: .5rem .75rem;
        padding-top: max(.5rem, env(safe-area-inset-top));
        background: var(--bs-body-bg, white);
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
        box-shadow: 0 .2rem .75rem rgba(0, 0, 0, .08);
    }

    .producto-resumen-inicio {
        display: flex;
        flex: 1;
        align-items: center;
        gap: .75rem;
        min-width: 0;
        min-height: 2.75rem;
        padding: 0;
        color: inherit;
        text-align: left;
        background: transparent;
        border: 0;
    }

    .producto-resumen-inicio:focus-visible {
        outline: 2px solid var(--bs-primary);
        outline-offset: 3px;
    }

    .producto-resumen-miniatura {
        flex: 0 0 3rem;
        width: 3rem;
        height: 3rem;
        object-fit: contain;
    }

    .producto-resumen-nombre {
        display: -webkit-box;
        flex: 1;
        overflow: hidden;
        font-size: .9rem;
        font-weight: 600;
        overflow-wrap: anywhere;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .producto-resumen-movil .producto-documento-abrir {
        flex-shrink: 0;
        min-width: 2.75rem;
    }
}

@media (max-width: 575.98px) {
    .producto-configurador {
        --producto-margen: .75rem;
    }

    .producto-cabecera label,
    .producto-configuracion label {
        overflow-wrap: anywhere;
    }

    .producto-documento-panel .CatalogoElementoDocumento > div {
        width: 100%;
    }
}
