#modalImagensProduto {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
}

.product-images-modal {
    border: 0;
    border-radius: 14px;
}

.product-images-heading {
    position: relative;
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 20px;
}

.product-images-heading h2 {
    margin: 0;
    color: #252525;
    font-size: 1.25rem;
    font-weight: 600;
}

.product-images-heading p {
    margin: 5px 0 0;
    color: #888;
    font-size: 0.78rem;
}

#contadorImagens {
    position: absolute;
    top: 0;
    left: 50%;
    padding: 7px 15px;
    border-radius: 20px;
    background: #f2f2f2;
    color: #555;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
}

.product-image-dropzone {
    position: relative;
    display: grid;
    min-height: 240px;
    place-items: center;
    margin-top: 10px;
    padding: 35px;
    border: 2px dashed #ed1c24;
    border-radius: 10px;
    background: #fcfcfc;
    transition: background 0.2s ease;
}

.product-image-dropzone.is-dragging {
    background: rgba(237, 28, 36, 0.05);
}

.product-image-dropzone-title {
    position: absolute;
    top: 14px;
    left: 16px;
    color: #8b8b8b;
    font-size: 0.72rem;
}

.product-image-dropzone-content {
    text-align: center;
}

.product-image-dropzone-icon {
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
    pointer-events: none;
}

.product-image-dropzone-content p {
    margin: 0 0 10px;
    color: #555;
    font-size: 0.8rem;
}

.btn-product-image-select,
.btn-product-image-save {
    border: 0;
    background: #ed1c24;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}

.btn-product-image-select:hover,
.btn-product-image-save:hover {
    background: #c9141b;
    color: #fff;
}

.btn-product-image-select.disabled {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

.product-image-editor {
    margin-top: 10px;
}

.product-image-editor-layout {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.product-image-editor-actions {
    display: flex;
    width: 44px;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 8px 4px;
    border-radius: 9px;
    background: #f5f5f5;
}

.product-image-editor-actions button {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}

.product-image-editor-actions button:hover {
    background: #e7e7e7;
}

.product-image-editor-actions button.tool-danger {
    margin-top: auto;
}

.product-image-editor-actions button img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.product-image-editor-preview {
    flex: 1;
    height: 430px;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #f5f5f5;
}

.product-image-editor-preview img {
    display: block;
    max-width: 100%;
}

.btn-product-image-save {
    width: 100%;
    margin-top: 12px;
}

.product-images-help {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 12px 0;
    color: #888;
    font-size: 0.7rem;
}

.product-images-added h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-images-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.product-images-list-empty,
.product-images-loading {
    grid-column: 1 / -1;
    padding: 25px;
    color: #888;
    text-align: center;
}

.product-image-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    cursor: grab;
    user-select: none;
}

.product-image-item:active {
    cursor: grabbing;
}

.product-image-item.is-dragging {
    opacity: 0.35;
}

.product-image-item.is-drag-over {
    border-color: #999;
    background: #f3f3f3;
    transform: scale(0.98);
}

.product-image-thumbnail {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 5px;
    background: #fff;
    object-fit: contain;
    pointer-events: none;
}

.product-image-number {
    display: block;
    padding: 6px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.65rem;
    text-align: center;
}

.product-image-item-actions {
    display: grid;
    gap: 5px;
    padding: 0 6px 6px;
}

.product-image-item-actions .btn {
    padding: 4px;
    font-size: 0.62rem;
}

.product-image-badge {
    display: none;
}

.btn-product-images-save-all {
    padding: 8px 18px;
    border: 0;
    border-radius: 7px;
    background: #ed1c24;
    color: #fff;
    font-family: "Orbitron", Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-product-images-save-all:hover {
    background: #c9141b;
    color: #fff;
}

.btn-product-images-save-all:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}