/* Produto Carousel Styles */
.produto-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Centralizar a imagem */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.carousel-image.active {
    opacity: 1;
}

.carousel-controls {
    top: 50%;
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.carousel-controls.visible {
    pointer-events: auto;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}


.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.indicator.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Show controls on hover - Desktop */
@media (min-width: 769px) {

    .produto-carousel:hover .carousel-controls,
    .produto-carousel:hover .carousel-indicators {
        opacity: 1;
    }

    .produto-carousel.auto-rotating .carousel-controls,
    .produto-carousel.auto-rotating .carousel-indicators {
        opacity: 1;
    }

    /* Centralizar imagens do carousel no desktop */
    .carousel-image {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

/* Always show controls on mobile */
@media (max-width: 768px) {

    .carousel-controls,
    .carousel-indicators {
        opacity: 1 !important;
    }

    .carousel-controls {
        padding: 0 8px;
        /* top: auto; */
        /* bottom: 5px; */
    }

    .carousel-indicators {
        opacity: 0 !important;
    }

    .carousel-btn {
        width: 16px;
        height: 16px;
        background: #fff;
        color: rgba(0, 0, 0, 0.7);
        padding: 0;
    }

    .carousel-btn:hover {
        background: rgba(0, 0, 0, 0.9);
    }

    .carousel-btn svg {
        width: 15px;
        height: 15px;
    }

    .indicator {
        width: 6px;
        height: 6px;
    }

    .carousel-indicators {
        bottom: 8px;
        gap: 4px;
    }
}

/* Disable old hover behavior */
.img-hover-out {
    pointer-events: none;
}

/* Ensure carousel images work correctly */
.produto-carousel .carousel-image {
    pointer-events: none;
}

.produto-carousel .carousel-controls,
.produto-carousel .carousel-indicators {
    pointer-events: auto;
    opacity: 0;
}

.produto-carousel .carousel-btn,
.produto-carousel .indicator {
    pointer-events: auto;
}