.carrossel {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--background);
}

.carrossel__slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.carrossel__slides picture {
    position: absolute;
    inset: 0;
}

.carrossel__slides img {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: none;
    object-fit: contain;
    object-position: center;
}

.carrossel__slides img.esta-ativo {
    display: block;
}

.botao-carrossel {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: #000000;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.botao-carrossel:hover:not(:disabled) {
    background: #000000;
}

.botao-carrossel:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.botao-carrossel:disabled {
    color: #666666;
    background: #d9d9d9;
    cursor: not-allowed;
}

:root[data-theme="dark"] .botao-carrossel {
    color: #000000;
    background: #ffffff;
}

:root[data-theme="dark"] .botao-carrossel:hover:not(:disabled) {
    background: #ffffff;
}

:root[data-theme="dark"] .botao-carrossel:disabled {
    color: #999999;
    background: #333333;
}

.carrossel__botao {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
}

.carrossel__botao--anterior { left: 10px; }
.carrossel__botao--proximo { right: 10px; }

@media (max-width: 700px) {
    .carrossel {
        aspect-ratio: 9 / 16;
    }

    .carrossel__slides img {
        object-fit: contain;
        object-position: center;
    }

    .botao-carrossel {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .carrossel__botao--anterior { left: 8px; }
    .carrossel__botao--proximo { right: 8px; }
}
