/* Visor de despieces JPG y PDF */

.despiece-viewer {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

.despiece-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: 0;
}

.despiece-toolbar button {
    min-width: 38px;
    height: 36px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.despiece-toolbar button:hover {
    background: #e8e8e8;
}

.despiece-zoom-label {
    min-width: 55px;
    text-align: center;
    font-size: 14px;
}

.despiece-viewport {
    width: 100%;
    height: 300px;
    overflow: auto;
    position: relative;
    border: 1px solid #ddd;
    background: #eee;
    text-align: center;
}

.despiece-content {
    display: inline-block;
    min-width: 100%;
    min-height: 100%;
}

.despiece-content img {
    display: block;
    max-width: none;
    height: auto;
    margin: 0 auto;
}

.despiece-content canvas {
    display: block;
    margin: 0 auto;
}

.despiece-error {
    padding: 25px;
    color: #a94442;
    text-align: center;
}

@media (max-width: 767px) {
    .despiece-viewport {
        height: 300px;
    }
}