.producto-imagen {
    position: relative;
}
.vista-rapida {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(23, 33, 43, 0.9);
    color: white;

    border-radius: 50%;
    font-size: 18px;

    opacity: 0;
    transition: 0.2s;
    pointer-events: auto;
cursor: pointer;
}

.producto-imagen:hover .vista-rapida,
.product-image:hover .vista-rapida {
    opacity: 1;
}
.carrito-rapido {
    position: absolute;
    top: 58px;
    right: 12px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(23, 33, 43, 0.9);
    color: white;

    border-radius: 50%;
    font-size: 18px;

    opacity: 0;
    transition: 0.2s;
    cursor: pointer;
    z-index: 10;
}

.product-image:hover .carrito-rapido,
.producto-imagen:hover .carrito-rapido {
    opacity: 1;
}
#modalVistaRapida {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 25px;
}

#modalVistaRapida.activo {
    display: flex;
}

.modal-vista-contenido {
    position: relative;
    width: min(900px, 95vw);
    max-height: 90vh;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;

    background: white;
    border-radius: 12px;
    padding: 35px;

    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.modal-vista-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-vista-imagen img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.modal-vista-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-marca {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 8px;
}

.modal-vista-info h2 {
    margin: 0 0 15px;
    font-size: 28px;
}

.modal-precio {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-vista-info p {
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-vista-info button {
    border: 0;
    border-radius: 6px;
    padding: 14px 20px;

    background: #17212b;
    color: white;

    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.cerrar-vista {
    position: absolute;
    top: 12px;
    right: 16px;

    background: transparent !important;
    color: #17212b !important;

    font-size: 30px !important;
    padding: 0 !important;
    line-height: 1;
}

@media (max-width: 700px) {
    .modal-vista-contenido {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 25px;
    }

    .modal-vista-imagen img {
        max-height: 300px;
    }
}
.modal-cantidad {
    margin-top: 20px;
    margin-bottom: 15px;
}
.modal-vista-contenido {
    width: min(1100px, 96vw);
    max-height: 92vh;
    padding: 28px;
    gap: 28px;
    grid-template-columns: 42% 58%;
    align-items: start;
}

.modal-vista-imagen {
    position: sticky;
    top: 0;
    align-self: start;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 20px;
}

.modal-imagen-principal {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-imagen-principal img {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
}

.modal-vista-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.modal-marca {
    font-size: 14px;
    font-weight: 700;
    color: #2f8f2f;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.modal-vista-info h2 {
    font-size: 30px;
    line-height: 1.15;
    margin: 0 0 14px;
    color: #111;
}

.modal-sku {
    display: inline-block;
    width: fit-content;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    margin-bottom: 18px;
}

.modal-precio {
    font-size: 30px;
    font-weight: 700;
    color: #2f8f2f;
    margin-bottom: 6px;
}

.modal-precio-iva {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #777;
    margin-top: 3px;
}

.modal-stock {
    font-size: 15px;
    font-weight: 600;
    color: #2f8f2f;
    margin: 14px 0 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-descripcion {
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 24px;
    color: #333;
}

.modal-seccion {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e5;
}

.modal-seccion h3 {
    margin: 0 0 16px;
    font-size: 17px;
    color: #17212b;
}

.modal-dato {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 5px 0;
    font-size: 14px;
}

.modal-dato span {
    color: #444;
}

.modal-dato strong {
    color: #222;
    font-weight: 500;
    text-align: right;
}

.modal-compra {
    display: flex;
    align-items: end;
    gap: 18px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e5e5e5;
}

.modal-cantidad {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.modal-cantidad label {
    font-size: 14px;
    color: #333;
}

.modal-cantidad input {
    width: 78px;
    height: 46px;
    text-align: center;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    font-size: 16px;
}

.modal-boton-carrito {
    flex: 1;
    height: 46px;
    border: 0;
    border-radius: 6px;
    background: #2f8f2f;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.modal-boton-carrito:hover {
    filter: brightness(0.95);
}

.cerrar-vista {
    z-index: 20;
}

@media (max-width: 800px) {
    .modal-vista-contenido {
        grid-template-columns: 1fr;
        width: 96vw;
        padding: 20px;
    }

    .modal-vista-imagen {
        position: relative;
    }

    .modal-imagen-principal img {
        max-height: 360px;
    }

    .modal-compra {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-cantidad input {
        width: 100%;
    }

    .modal-boton-carrito {
        width: 100%;
    }
}
.modal-vista-contenido {
    overflow: hidden;
}

.modal-vista-info {
    max-height: calc(92vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 12px;
}
body.modal-abierto {
    overflow: hidden;
}