/* Evitar scroll horizontal */
.row {
    margin-right: 0;
    margin-left: 0;
    overflow-x: hidden; /* corta el scroll lateral */
}

body {
    overflow-x: hidden;
}

.foto-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.375rem;
}

    .foto-container img {
        width: 100%;
        height: auto; /* mantiene proporción original */
        display: block;
        border-radius: 0.375rem;
    }

/* Contenedor de los botones (overlay al pie de la foto) */
.foto-buttons {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 5;
}

/* Botones circulares transparentes */
.foto-button {
    width: 36px;
    height: 36px;
    border: 2px solid white;
    border-radius: 50%;
    background-color: transparent;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 5;
}

    /* Hover con color y glow */
    .foto-button.trash:hover {
        background-color: red;
        color: white;
        box-shadow: 0 0 8px red;
    }

    .foto-button.cart:hover {
        background-color: blue;
        color: white;
        box-shadow: 0 0 8px blue;
    }

    /* Foco accesible para botones circulares */
    .foto-button:focus {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }

/* Estilos para inputs con sombra y bordes redondeados */
.styled-input {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background-color: #f8f9fa;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

    .styled-input:focus {
        border-color: #0d6efd;
        background-color: #ffffff;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    }

/* Botón estilizado con sombra y transición */
.stylish-button {
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .stylish-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }

/* Modal con scroll solo en el body y altura máxima */
.modal-dialog {
    max-height: 90vh;
}

.modal-content {
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    padding: 2rem;
}

/* Ajuste de padding para móviles */
@media (max-width: 576px) {
    .modal-body {
        padding: 1rem;
    }
}

/* Marca de agua sutil y contenida */
.marca-de-agua-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    object-fit: contain;
    pointer-events: none;
}

/* Para el contenedor de la imagen con marca de agua, asegurar inline-block con max-width */
.position-relative.d-inline-block {
    display: inline-block;
    max-width: 100%;
}
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1055;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-container {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
}

.progress-bar {
    width: 0%;
    height: 20px;
    background-color: #0d6efd;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: width 0.2s;
    position: relative;
    color: white;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

    .progress-bar .progress-label {
        position: absolute;
        width: 100%;
        left: 0;
        top: 0;
    }

#totalProgress {
    width: 0%;
    height: 20px;
    background-color: #198754; /* color verde para total */
    border-radius: 5px;
    margin-top: 5px;
    transition: width 0.2s;
}

/* Efecto escáner para fotos y protección */
.fdph-photo-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    overflow: hidden;
    background-color: #111;
}

.fdph-photo-container .img-blur {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px);
    transform: scale(1.05);
}

.fdph-photo-container .img-clear {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: scan-effect 3s infinite alternate ease-in-out;
}

@keyframes scan-effect {
    0% {
        clip-path: inset(0% 0 75% 0);
    }
    100% {
        clip-path: inset(75% 0 0% 0);
    }
}

.fdph-photo-container .watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    pointer-events: none;
}

/* Ensure the action buttons are above everything else */
.action-overlay {
    z-index: 20;
    pointer-events: none; /* Let the container itself pass clicks through */
}

.action-overlay .btn {
    pointer-events: auto; /* But make the buttons themselves clickable */
}